Search in sources :

Example 6 with DolphinContext

use of com.canoo.dp.impl.server.context.DolphinContext in project dolphin-platform by canoo.

the class InterruptServlet method doPost.

@Override
protected void doPost(final HttpServletRequest req, final HttpServletResponse response) throws ServletException, IOException {
    Assert.requireNonNull(response, "response");
    final DolphinContext currentContext = dolphinContextProvider.getCurrentDolphinContext();
    if (currentContext == null) {
        response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Missing or wrong client session id");
    } else {
        currentContext.interrupt();
    }
}
Also used : DolphinContext(com.canoo.dp.impl.server.context.DolphinContext)

Aggregations

DolphinContext (com.canoo.dp.impl.server.context.DolphinContext)6 DolphinContextProvider (com.canoo.dp.impl.server.context.DolphinContextProvider)3 RemotingContextImpl (com.canoo.dp.impl.server.context.RemotingContextImpl)2 ClientSession (com.canoo.platform.server.client.ClientSession)2 ClientSessionLifecycleHandlerImpl (com.canoo.dp.impl.server.client.ClientSessionLifecycleHandlerImpl)1 Subscription (com.canoo.platform.core.functional.Subscription)1 MessageEventContext (com.canoo.platform.remoting.server.event.MessageEventContext)1 ClientScoped (com.canoo.platform.server.javaee.ClientScoped)1 ClientScope (com.canoo.platform.server.spring.ClientScope)1 Produces (javax.enterprise.inject.Produces)1 HttpSession (javax.servlet.http.HttpSession)1 Bean (org.springframework.context.annotation.Bean)1