use of org.eclipse.winery.model.adaptation.substitution.refinement.topologyrefinement.TopologyFragmentRefinement in project winery by eclipse.
the class RefinementWebSocket method onOpen.
protected void onOpen() throws IOException {
Map<String, List<String>> requestParameterMap = this.session.getRequestParameterMap();
List<String> refinementType = requestParameterMap.get("type");
if (Objects.nonNull(refinementType)) {
String type = refinementType.get(0);
if ("patterns".equals(type)) {
this.refinement = new PatternRefinement(this);
} else if ("topology".equals(type)) {
this.refinement = new TopologyFragmentRefinement(this);
} else if ("tests".equals(type)) {
this.refinement = new TestRefinement(this);
} else if ("patternDetection".equals(type)) {
this.refinement = new PatternDetection(this);
}
if (Objects.nonNull(this.refinement)) {
LOGGER.info("Opened consistency check web-socket with id: " + session.getId());
return;
}
}
this.onClose(this.session);
LOGGER.debug("Closed session due to missing or incompatible refinement type!");
}
Aggregations