Examples of WebSocketConnection


Examples of com.pusher.client.connection.websocket.WebSocketConnection

    @Before
    public void setUp() throws Exception {
        pusherOptions = new PusherOptions().setAuthorizer(mockAuthorizer).setEncrypted(false);

        connection = new WebSocketConnection(pusherOptions.buildUrl(API_KEY), ACTIVITY_TIMEOUT, PONG_TIMEOUT, factory);

        when(factory.getEventQueue()).thenReturn(new InstantExecutor());
        when(factory.getTimers()).thenReturn(new DoNothingExecutor());
        when(factory.newWebSocketClientWrapper(any(URI.class), any(WebSocketListener.class))).thenAnswer(new Answer<WebSocketClientWrapper>() {
            @Override
View Full Code Here

Examples of com.pusher.client.connection.websocket.WebSocketConnection

    private ScheduledExecutorService timers;

    public synchronized InternalConnection getConnection(String apiKey, PusherOptions options) {
        if (connection == null) {
            try {
                connection = new WebSocketConnection(options.buildUrl(apiKey),
                                                     options.getActivityTimeout(),
                                                     options.getPongTimeout(),
                                                     this);
            } catch (URISyntaxException e) {
                throw new IllegalArgumentException("Failed to initialise connection", e);
View Full Code Here

Examples of de.roderick.weberknecht.WebSocketConnection

   * @param connection the connection
   * @throws WebSocketException
   */
  public WebsocketTransport(URI uri, IOConnection connection) {
    try {
      websocket = new WebSocketConnection(uri);
    } catch (WebSocketException e) {
      connection.transportError(e);
      return;
    }
    this.connection = connection;
View Full Code Here

Examples of org.xlightweb.WebSocketConnection

                if (request.hasBody()) {
                    CompleteListener cl = new CompleteListener(exchange, webSocketHandler);
                    request.getNonBlockingBody().addCompleteListener(cl);
                    request.getNonBlockingBody().addDestroyListener(cl);
                } else {
                    new WebSocketConnection((HttpServerConnection) exchange.getConnection(), webSocketHandler, exchange);
                }
                return true;
            } else {
                return false;
            }
View Full Code Here

Examples of org.xlightweb.WebSocketConnection

            this.exchange = exchange;
            this.webSocketHandler = webSocketHandler;
        }
       
        public void onComplete() throws IOException {
            new WebSocketConnection((HttpServerConnection) exchange.getConnection(), webSocketHandler, exchange);
        }
View Full Code Here

Examples of org.xlightweb.WebSocketConnection

            } else {
                port = 80;
            }
        }
       
        return new WebSocketConnection(this, uri, protocol, webSocketHandler);
    }  
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.