@Override public void failed(Throwable x) { failed.call(x); } };
@Override public void failed(Throwable x) { if (failed != null) { failed.call(x); } } };
@Override public void succeeded(TcpConnection result) { conn.call(result); } };
@Override public void acceptConnection(HTTPConnection connection) { if (acceptConnection != null) { acceptConnection.call(connection); } }
@Override public void succeeded(TcpConnection result) { conn.call(result); }
public void failed(Throwable x) { failed.call(x); } });
public void failed(Throwable x) { failed.call(x); } });
@Override public void acceptConnection(HTTPConnection connection) { if (acceptConnection != null) { acceptConnection.call(connection); } }
public void succeeded(HTTPOutputStream out) { reqBuilder.output.call(out); } };
public void failed(Throwable x) { failed.call(x); } });
@SuppressWarnings("unchecked") @Override public Void call(Object... args) { if (args.length != 1) { throw new RuntimeException("Action1 expecting 1 argument."); } f.call((T0) args[0]); return null; }
@SuppressWarnings("unchecked") @Override public Void call(Object... args) { if (args.length != 1) { throw new RuntimeException("Action1 expecting 1 argument."); } f.call((T0) args[0]); return null; }
public void notifyException(Throwable t) { exceptionListeners.forEach(e -> e.call(t)); }
@Override public void onConnect(WebSocketConnection webSocketConnection) { Optional.ofNullable(onConnect).ifPresent(c -> c.call(webSocketConnection)); }
public void notifyClose() { log.info("The handler called {} closed listener. Session: {}", this.getClass(), connection.getSessionId()); closedListeners.forEach(c -> c.call(connection)); }
@Override public void sessionOpened(Session session) throws Throwable { TcpConnectionImpl c = new TcpConnectionImpl(session); session.attachObject(c); if (accept != null) { accept.call(c); } }
@Override public void sessionOpened(Session session) throws Throwable { TcpConnectionImpl c = new TcpConnectionImpl(session); session.attachObject(c); if (accept != null) { accept.call(c); } }
@Override public void parse(ByteBuffer buf) { try { merge(buf); parse(); } catch (Throwable t) { exception.call(t); } }
@Override public void parse(ByteBuffer buf) { try { merge(buf); parse(); } catch (Throwable t) { exception.call(t); } }
@Override public void sessionOpened(Session session) throws Throwable { SecureSessionFactory factory = config.getSecureSessionFactory(); session.attachObject(new SecureTcpConnectionImpl(session, factory.create(session, false, ssl -> { Object o = session.getAttachment(); if (o != null && o instanceof SecureTcpConnectionImpl) { SecureTcpConnectionImpl c = (SecureTcpConnectionImpl) o; if (accept != null) { accept.call(c); } } }))); }