use of org.eclipse.winery.repository.backend.consistencycheck.ConsistencyErrorLogger in project winery by eclipse.
the class ConsistencyCheckWebSocket method onMessage.
@OnMessage
public void onMessage(String message, Session session) throws IOException {
ObjectMapper mapper = new ObjectMapper();
ConsistencyCheckerConfiguration config = mapper.readValue(message, ConsistencyCheckerConfiguration.class);
ConsistencyErrorLogger errorList = ConsistencyChecker.checkCorruption(config, this);
// Transform object to JSON and send it.
this.session.getBasicRemote().sendText(mapper.writeValueAsString(errorList));
// Close the connection after the check has passed.
onClose(session);
}
Aggregations