Search in sources :

Example 1 with SessionConnectionLostException

use of org.openkilda.floodlight.error.SessionConnectionLostException in project open-kilda by telstra.

the class Session method disconnect.

void disconnect() {
    // must be safe to be called multiple times
    if (completed) {
        return;
    }
    completed = true;
    // Setup correlationId (because this method called asynchronously by FL core).
    try (CorrelationContext.CorrelationContextClosable closable = CorrelationContext.create(context.getCorrelationId())) {
        SessionConnectionLostException e = new SessionConnectionLostException(sw.getId());
        incompleteRequestsStream().forEach(entry -> entry.completeExceptionally(e));
    }
}
Also used : CorrelationContext(org.openkilda.floodlight.utils.CorrelationContext) SessionConnectionLostException(org.openkilda.floodlight.error.SessionConnectionLostException)

Aggregations

SessionConnectionLostException (org.openkilda.floodlight.error.SessionConnectionLostException)1 CorrelationContext (org.openkilda.floodlight.utils.CorrelationContext)1