use of io.joynr.messaging.websocket.jetty.client.WebSocketJettyClientFactory in project joynr by bmwcarit.
the class WebSocketTest method configure.
private void configure(int maxMessageSize, long reconnectDelay, long websocketIdleTimeout, Set<JoynrMessageProcessor> messageProcessor) {
ObjectMapper objectMapper = new ObjectMapper();
WebSocketEndpointFactory webSocketJettyServerFactory = new WebSocketJettyServerFactory(maxMessageSize, objectMapper);
ccWebSocketMessagingSkeleton = new WebSocketMessagingSkeleton(serverAddress, webSocketJettyServerFactory, messageRouterMock, new WebSocketMessagingSkeleton.MainTransportFlagBearer(), messageProcessor);
ownAddress = new WebSocketClientAddress(UUID.randomUUID().toString());
webSocketJettyClientFactory = new WebSocketJettyClientFactory(ownAddress, maxMessageSize, reconnectDelay, websocketIdleTimeout, objectMapper);
webSocketMessagingStub = new WebSocketMessagingStub(serverAddress, webSocketJettyClientFactory.create(serverAddress));
libWebSocketMessagingSkeleton = new WebSocketMessagingSkeleton(serverAddress, webSocketJettyClientFactory, messageRouterMock, new WebSocketMessagingSkeleton.MainTransportFlagBearer(), messageProcessor);
ccWebSocketMessagingSkeleton.init();
libWebSocketMessagingSkeleton.init();
}
Aggregations