Search in sources :

Example 1 with InstanceModelRefinement

use of org.eclipse.winery.model.adaptation.instance.InstanceModelRefinement in project winery by eclipse.

the class InstanceModelWebSocket method startInstanceModelRefinement.

private void startInstanceModelRefinement(QName serviceTemplate) {
    Thread thread = new Thread(() -> {
        this.instanceModelRefiner = new InstanceModelRefinement(this);
        DataToSend dataToSend = new DataToSend();
        dataToSend.topologyTemplate = this.instanceModelRefiner.refine(new ServiceTemplateId(serviceTemplate));
        try {
            this.sendAsync(dataToSend);
            this.onClose(this.session);
        } catch (JsonProcessingException e) {
            logger.error("Error while sending final topology template!", e);
        } catch (IOException e) {
            logger.error("Error while closing web socket!", e);
        }
    });
    thread.start();
}
Also used : InstanceModelRefinement(org.eclipse.winery.model.adaptation.instance.InstanceModelRefinement) IOException(java.io.IOException) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException)

Aggregations

JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 IOException (java.io.IOException)1 InstanceModelRefinement (org.eclipse.winery.model.adaptation.instance.InstanceModelRefinement)1 ServiceTemplateId (org.eclipse.winery.model.ids.definitions.ServiceTemplateId)1