use of org.eclipse.jetty.websocket.jsr356.client.EmptyClientEndpointConfig in project jetty.project by eclipse.
the class ClientContainer method doStart.
@Override
protected void doStart() throws Exception {
super.doStart();
// Initialize the default decoder / encoder factories
EmptyClientEndpointConfig empty = new EmptyClientEndpointConfig();
this.decoderFactory.init(empty);
this.encoderFactory.init(empty);
}
use of org.eclipse.jetty.websocket.jsr356.client.EmptyClientEndpointConfig in project jetty.project by eclipse.
the class ClientContainer method newClientEndpointInstance.
public EndpointInstance newClientEndpointInstance(Object endpoint, ClientEndpointConfig config) {
EndpointMetadata metadata = getClientEndpointMetadata(endpoint.getClass(), config);
ClientEndpointConfig cec = config;
if (config == null) {
if (metadata instanceof AnnotatedClientEndpointMetadata) {
cec = ((AnnotatedClientEndpointMetadata) metadata).getConfig();
} else {
cec = new EmptyClientEndpointConfig();
}
}
return new EndpointInstance(endpoint, cec, metadata);
}
use of org.eclipse.jetty.websocket.jsr356.client.EmptyClientEndpointConfig in project jetty.project by eclipse.
the class JsrSessionTest method initSession.
@Before
public void initSession() {
container = new ClientContainer();
String id = JsrSessionTest.class.getSimpleName();
URI requestURI = URI.create("ws://localhost/" + id);
WebSocketPolicy policy = WebSocketPolicy.newClientPolicy();
ClientEndpointConfig config = new EmptyClientEndpointConfig();
DummyEndpoint websocket = new DummyEndpoint();
SimpleEndpointMetadata metadata = new SimpleEndpointMetadata(websocket.getClass());
// Executor executor = null;
EndpointInstance ei = new EndpointInstance(websocket, config, metadata);
EventDriver driver = new JsrEndpointEventDriver(policy, ei);
DummyConnection connection = new DummyConnection();
session = new JsrSession(container, id, requestURI, driver, connection);
}
Aggregations