@OnWebSocketConnect public void connect(Session session) { session.getPolicy().setMaxBinaryMessageSize(100_000_000); session.getPolicy().setMaxTextMessageSize(100_000_000); this.session = session; flush(); if (target != null) { target.flush(); } }
@OnWebSocketConnect public void onConnect(Session session) { LOG.info("{} connected.", session); }
@OnWebSocketConnect public void onWebSocketConnect(Session session) { this.delegateSession = this.sessionFactory.apply(session); this.delegateHandler.handle(this.delegateSession).subscribe(this.delegateSession); }
@OnWebSocketConnect public void onConnect(Session session) { this.session = session; LOGGER.debug("{} connected.", sessionName()); }
@OnWebSocketConnect public void onConnect(Session session) { if (param.onConnect != null) { param.onConnect.callAny(session); } }
@OnWebSocketConnect public void onWebSocketConnect(Session session) { try { this.wsSession.initializeNativeSession(session); this.webSocketHandler.afterConnectionEstablished(this.wsSession); } catch (Throwable ex) { ExceptionWebSocketHandlerDecorator.tryCloseWithError(this.wsSession, ex, logger); } }
@OnWebSocketConnect public void open(Session session) { ProgressHandlerImpl progressHandler = new ProgressHandlerImpl(session); progressHandlerMap.put(session, progressHandler); servlet.addProgressHandler(progressHandler); }
@OnWebSocketConnect public void onConnect(final Session session) { session.close(); latch.countDown(); }
@OnWebSocketConnect public void onConnect(Session session) throws Exception { this.session = session; socketHealthService.register(this); LOGGER.debug("{} connected", sessionName()); session.getRemote().sendString(consoleLogCharsetJSONMessage); long start = parseStartLine(session.getUpgradeRequest()); LOGGER.debug("{} sending logs for {} starting at line {}.", sessionName(), jobIdentifier, start); try { handler.process(this, jobIdentifier, start); } catch (IOException e) { if ("Connection output is closed".equals(e.getMessage())) { LOGGER.debug("{} client (likely, browser) closed connection prematurely.", sessionName()); close(); // for good measure } else { throw e; } } }
@OnWebSocketConnect public void onConnect(Session session) { wsSession = session; wsConnection = new WebSocketConnection(this, session.getRemoteAddress()); pingTask = new PingTask(); TaskEngine.getInstance().schedule(pingTask, JiveConstants.MINUTE, JiveConstants.MINUTE); }
@OnWebSocketConnect public void onConnect(Session session) throws IOException { System.out.printf("Got connect: %s%n", session); LOG.info("Got connect: %s%n", session); // Trivial MQTT Connect message // assertEquals(12, out.readByte()); //remaining length // verifyString("MQIsdp", out); // assertEquals(0x03, out.readByte()); //protocol version // assertEquals(0x32, out.readByte()); //flags // assertEquals(2, out.readByte()); //keepAliveTimer msb // assertEquals(0, out.readByte()); //keepAliveTimer lsb ByteBuffer msg = ByteBuffer.wrap(new byte[]{0x10, // message type 0x0C, // remaining lenght 12 bytes 'M', 'Q', 'I', 's', 'd', 'p', 0x03, // protocol version 0x32, // flags 0x02, 0x00// keepAlive Timer, 2 seconds }); // try { session.getRemote().sendBytes(msg); this.connectSentLatch.countDown(); session.close(StatusCode.NORMAL, "I'm done"); // } catch (IOException t) { // LOG.error(null, t); // } }
@OnWebSocketConnect public void onConnect(Session session) { this.session = session; System.out.println("Connect"); }
@OnWebSocketConnect public void onConnect(Session theSession) { ourLog.info("Successfully connected"); this.session = theSession; try { String sending = "bind " + mySubsId; LOG_SEND.info("{}", sending); theSession.getRemote().sendString(sending); } catch (Throwable t) { ourLog.error("Failure", t); myQuit = true; } }
@OnWebSocketConnect public void onWebSocketConnect(Session session) { log.debug("Opening websocket"); this.session = session; }
@OnWebSocketConnect public void onOpen(Session session) { session.setIdleTimeout(-1); sessions.add(session); }
@OnWebSocketConnect public void onConnect(Session session) { System.out.printf("Got connect: %s%n", session); //this.session = session; remoteEndpoint = session.getRemote(); connected = true; }
@OnWebSocketConnect public void onConnect(Session session) { Logger.debug("New connection from: {}", session.getRemoteAddress().getHostName()); sessions.add(session); }
@OnWebSocketConnect public void onConnect(Session session) { this.session = session; connect.countDown(); }
@OnWebSocketConnect public void onConnect(Session session) { this.session = session; send(new SocketMessage.ConnectionEstablished(SOCKET_TIMEOUT_MS)); }
@OnWebSocketConnect public void onConnect(Session session) { wsSession = session; wsConnection = new WebSocketConnection(this, session.getRemoteAddress()); pingTask = new PingTask(); TaskEngine.getInstance().schedule(pingTask, JiveConstants.MINUTE, JiveConstants.MINUTE); }