Search in sources :

Example 1 with ByteBufferPartialHandler

use of org.eclipse.jetty.websocket.jsr356.handlers.ByteBufferPartialHandler in project jetty.project by eclipse.

the class JsrSessionTest method testMessageHandlerBinary.

@Test
public void testMessageHandlerBinary() throws DeploymentException {
    session.addMessageHandler(new ByteBufferPartialHandler());
    MessageHandlerWrapper wrapper = session.getMessageHandlerWrapper(MessageType.BINARY);
    Assert.assertThat("Binary Handler", wrapper.getHandler(), instanceOf(ByteBufferPartialHandler.class));
    Assert.assertEquals("Message Class", wrapper.getMetadata().getMessageClass(), ByteBuffer.class);
}
Also used : ByteBufferPartialHandler(org.eclipse.jetty.websocket.jsr356.handlers.ByteBufferPartialHandler) Test(org.junit.Test)

Aggregations

ByteBufferPartialHandler (org.eclipse.jetty.websocket.jsr356.handlers.ByteBufferPartialHandler)1 Test (org.junit.Test)1