Search in sources :

Example 6 with PerMessageDeflateHandshake

use of io.undertow.websockets.extensions.PerMessageDeflateHandshake in project undertow by undertow-io.

the class JsrWebsocketExtensionTestCase method setup.

@BeforeClass
public static void setup() throws Exception {
    final ServletContainer container = ServletContainer.Factory.newInstance();
    DeploymentInfo builder = new DeploymentInfo().setClassLoader(BinaryEndpointTest.class.getClassLoader()).setContextPath("/").setClassIntrospecter(TestClassIntrospector.INSTANCE).addServletContextAttribute(WebSocketDeploymentInfo.ATTRIBUTE_NAME, new WebSocketDeploymentInfo().setBuffers(DefaultServer.getBufferPool()).setWorker(DefaultServer.getWorker()).addExtension(new PerMessageDeflateHandshake()).addEndpoint(AutobahnAnnotatedEndpoint.class)).setDeploymentName("servletContext.war");
    DeploymentManager manager = container.addDeployment(builder);
    manager.deploy();
    debug = new DebugExtensionsHeaderHandler(manager.start());
    DefaultServer.setRootHandler(debug);
}
Also used : DebugExtensionsHeaderHandler(io.undertow.websockets.extensions.DebugExtensionsHeaderHandler) DeploymentManager(io.undertow.servlet.api.DeploymentManager) ServletContainer(io.undertow.servlet.api.ServletContainer) PerMessageDeflateHandshake(io.undertow.websockets.extensions.PerMessageDeflateHandshake) BinaryEndpointTest(io.undertow.websockets.jsr.test.BinaryEndpointTest) WebSocketDeploymentInfo(io.undertow.websockets.jsr.WebSocketDeploymentInfo) DeploymentInfo(io.undertow.servlet.api.DeploymentInfo) WebSocketDeploymentInfo(io.undertow.websockets.jsr.WebSocketDeploymentInfo) BeforeClass(org.junit.BeforeClass)

Aggregations

PerMessageDeflateHandshake (io.undertow.websockets.extensions.PerMessageDeflateHandshake)6 DeploymentInfo (io.undertow.servlet.api.DeploymentInfo)4 WebSocketDeploymentInfo (io.undertow.websockets.jsr.WebSocketDeploymentInfo)4 DeploymentManager (io.undertow.servlet.api.DeploymentManager)3 FilterInfo (io.undertow.servlet.api.FilterInfo)3 ServletContainer (io.undertow.servlet.api.ServletContainer)3 IOException (java.io.IOException)3 HashSet (java.util.HashSet)3 DefaultByteBufferPool (io.undertow.server.DefaultByteBufferPool)2 HttpOpenListener (io.undertow.server.protocol.http.HttpOpenListener)2 WebSocketExtension (io.undertow.websockets.WebSocketExtension)2 WebSocketClientNegotiation (io.undertow.websockets.client.WebSocketClientNegotiation)2 AbstractReceiveListener (io.undertow.websockets.core.AbstractReceiveListener)2 BufferedBinaryMessage (io.undertow.websockets.core.BufferedBinaryMessage)2 BinaryEndpointTest (io.undertow.websockets.jsr.test.BinaryEndpointTest)2 InetSocketAddress (java.net.InetSocketAddress)2 ChannelListener (org.xnio.ChannelListener)2 OptionMap (org.xnio.OptionMap)2 StreamConnection (org.xnio.StreamConnection)2 Xnio (org.xnio.Xnio)2