protected static Selectable selectableTransport(Reactor reactor, Socket socket, Transport transport) { Selectable selectable = reactor.selectable(); selectable.setChannel(socket != null ? socket.getChannel() : null); selectable.onReadable(connectionReadable); selectable.onWritable(connectionWritable); selectable.onError(connectionError); selectable.onExpired(connectionExpired); selectable.onFree(connectionFree); ((SelectableImpl)selectable).setTransport(transport); ((TransportImpl)transport).setSelectable(selectable); ((TransportImpl)transport).setReactor(reactor); update(selectable); reactor.update(selectable); return selectable; }
protected static Selectable selectableTransport(Reactor reactor, Socket socket, Transport transport) { Selectable selectable = reactor.selectable(); selectable.setChannel(socket != null ? socket.getChannel() : null); selectable.onReadable(connectionReadable); selectable.onWritable(connectionWritable); selectable.onError(connectionError); selectable.onExpired(connectionExpired); selectable.onFree(connectionFree); ((SelectableImpl)selectable).setTransport(transport); ((TransportImpl)transport).setSelectable(selectable); ((TransportImpl)transport).setReactor(reactor); update(selectable); reactor.update(selectable); return selectable; }