Search in sources :

Example 1 with SessionReflectionHandler

use of org.apache.camel.component.http4.handler.SessionReflectionHandler in project camel by apache.

the class HttpProducerSessionTest method initServer.

@BeforeClass
public static void initServer() throws Exception {
    port = AvailablePortFinder.getNextAvailable(24000);
    localServer = new Server(new InetSocketAddress("127.0.0.1", port));
    ContextHandler contextHandler = new ContextHandler();
    contextHandler.setContextPath("/session");
    SessionHandler sessionHandler = new SessionHandler();
    sessionHandler.setHandler(new SessionReflectionHandler());
    contextHandler.setHandler(sessionHandler);
    localServer.setHandler(contextHandler);
    localServer.start();
}
Also used : ContextHandler(org.eclipse.jetty.server.handler.ContextHandler) SessionHandler(org.eclipse.jetty.server.session.SessionHandler) Server(org.eclipse.jetty.server.Server) InetSocketAddress(java.net.InetSocketAddress) SessionReflectionHandler(org.apache.camel.component.http4.handler.SessionReflectionHandler) BeforeClass(org.junit.BeforeClass)

Aggregations

InetSocketAddress (java.net.InetSocketAddress)1 SessionReflectionHandler (org.apache.camel.component.http4.handler.SessionReflectionHandler)1 Server (org.eclipse.jetty.server.Server)1 ContextHandler (org.eclipse.jetty.server.handler.ContextHandler)1 SessionHandler (org.eclipse.jetty.server.session.SessionHandler)1 BeforeClass (org.junit.BeforeClass)1