Search in sources :

Example 1 with WebSocketJettyServerFactory

use of io.joynr.messaging.websocket.server.WebSocketJettyServerFactory 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();
}
Also used : WebSocketEndpointFactory(io.joynr.messaging.websocket.WebSocketEndpointFactory) WebSocketJettyServerFactory(io.joynr.messaging.websocket.server.WebSocketJettyServerFactory) WebSocketJettyClientFactory(io.joynr.messaging.websocket.jetty.client.WebSocketJettyClientFactory) WebSocketMessagingStub(io.joynr.messaging.websocket.WebSocketMessagingStub) WebSocketClientAddress(joynr.system.RoutingTypes.WebSocketClientAddress) WebSocketMessagingSkeleton(io.joynr.messaging.websocket.WebSocketMessagingSkeleton) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 WebSocketEndpointFactory (io.joynr.messaging.websocket.WebSocketEndpointFactory)1 WebSocketMessagingSkeleton (io.joynr.messaging.websocket.WebSocketMessagingSkeleton)1 WebSocketMessagingStub (io.joynr.messaging.websocket.WebSocketMessagingStub)1 WebSocketJettyClientFactory (io.joynr.messaging.websocket.jetty.client.WebSocketJettyClientFactory)1 WebSocketJettyServerFactory (io.joynr.messaging.websocket.server.WebSocketJettyServerFactory)1 WebSocketClientAddress (joynr.system.RoutingTypes.WebSocketClientAddress)1