Search in sources :

Example 1 with DecoderFactory

use of org.eclipse.jetty.websocket.jsr356.DecoderFactory in project jetty.project by eclipse.

the class DecoderFactoryTest method initDecoderFactory.

@Before
public void initDecoderFactory() {
    WebSocketContainerScope containerScope = new SimpleContainerScope(WebSocketPolicy.newClientPolicy());
    DecoderFactory primitivesFactory = new DecoderFactory(containerScope, PrimitiveDecoderMetadataSet.INSTANCE);
    metadatas = new DecoderMetadataSet();
    factory = new DecoderFactory(containerScope, metadatas, primitivesFactory);
}
Also used : DecoderMetadataSet(org.eclipse.jetty.websocket.jsr356.metadata.DecoderMetadataSet) PrimitiveDecoderMetadataSet(org.eclipse.jetty.websocket.jsr356.decoders.PrimitiveDecoderMetadataSet) WebSocketContainerScope(org.eclipse.jetty.websocket.common.scopes.WebSocketContainerScope) SimpleContainerScope(org.eclipse.jetty.websocket.common.scopes.SimpleContainerScope) Before(org.junit.Before)

Example 2 with DecoderFactory

use of org.eclipse.jetty.websocket.jsr356.DecoderFactory in project jetty.project by eclipse.

the class MessageHandlerFactoryTest method init.

@Before
public void init() throws DeploymentException {
    WebSocketContainerScope containerScope = new SimpleContainerScope(WebSocketPolicy.newClientPolicy());
    DecoderFactory primitivesFactory = new DecoderFactory(containerScope, PrimitiveDecoderMetadataSet.INSTANCE);
    metadatas = new DecoderMetadataSet();
    decoders = new DecoderFactory(containerScope, metadatas, primitivesFactory);
    factory = new MessageHandlerFactory();
}
Also used : DecoderMetadataSet(org.eclipse.jetty.websocket.jsr356.metadata.DecoderMetadataSet) PrimitiveDecoderMetadataSet(org.eclipse.jetty.websocket.jsr356.decoders.PrimitiveDecoderMetadataSet) WebSocketContainerScope(org.eclipse.jetty.websocket.common.scopes.WebSocketContainerScope) SimpleContainerScope(org.eclipse.jetty.websocket.common.scopes.SimpleContainerScope) Before(org.junit.Before)

Aggregations

SimpleContainerScope (org.eclipse.jetty.websocket.common.scopes.SimpleContainerScope)2 WebSocketContainerScope (org.eclipse.jetty.websocket.common.scopes.WebSocketContainerScope)2 PrimitiveDecoderMetadataSet (org.eclipse.jetty.websocket.jsr356.decoders.PrimitiveDecoderMetadataSet)2 DecoderMetadataSet (org.eclipse.jetty.websocket.jsr356.metadata.DecoderMetadataSet)2 Before (org.junit.Before)2