/** * @return pretty print of this */ public String toString() { return getBoundAddress(); }
public void start(Task onCompleted) throws Exception { if( keyManagers!=null ) { sslContext.init(keyManagers, trustManagers, null); } else { sslContext = SSLContext.getDefault(); } super.start(onCompleted); }
@Override protected TcpTransport createTransport() { TcpTransport transport = super.createTransport(); IntrospectionSupport.setProperties(transport, new HashMap(options)); return transport; } };
public void run() { try { SocketChannel client = channel.accept(); while( client!=null ) { handleSocket(client); client = channel.accept(); } } catch (Exception e) { listener.onAcceptError(e); } } });
@Deprecated public void stop(Runnable onCompleted) throws Exception { stop(new TaskWrapper(onCompleted)); }
protected final void handleSocket(SocketChannel socket) throws Exception { TcpTransport transport = createTransport(); transport.connected(socket); listener.onAccept(transport); }
@Deprecated public void start(Runnable onCompleted) throws Exception { start(new TaskWrapper(onCompleted)); } @Deprecated