@Override public Void run() throws IOException { socketChannel.bind(localAddress); return null; } });
@Override protected SocketAddress localAddress0() { return javaChannel().socket().getLocalSocketAddress(); }
@Override protected SocketAddress remoteAddress0() { return javaChannel().socket().getRemoteSocketAddress(); }
@Override public boolean isActive() { final SocketChannelUDT channelUDT = javaChannel(); return channelUDT.isOpen() && channelUDT.isConnectFinished(); }
/** * Convenience factory for {@link KindUDT#RENDEZVOUS} channels. */ static RendezvousChannelUDT newRendezvousChannelUDT( final TypeUDT type) { try { return SelectorProviderUDT.from(type).openRendezvousChannel(); } catch (final IOException e) { throw new ChannelException("failed to open a rendezvous channel", e); } }
/** * Convenience factory for {@link KindUDT#ACCEPTOR} channels. */ static ServerSocketChannelUDT newAcceptorChannelUDT( final TypeUDT type) { try { return SelectorProviderUDT.from(type).openServerSocketChannel(); } catch (final IOException e) { throw new ChannelException("failed to open a server socket channel", e); } }
/** * Convenience factory for {@link KindUDT#CONNECTOR} channels. */ static SocketChannelUDT newConnectorChannelUDT(final TypeUDT type) { try { return SelectorProviderUDT.from(type).openSocketChannel(); } catch (final IOException e) { throw new ChannelException("failed to open a socket channel", e); } }
@Override protected void doClose() throws Exception { javaChannel().close(); }
@Override protected void doClose() throws Exception { javaChannel().close(); }
/** * Expose underlying {@link SocketUDT} for debugging and monitoring. * <p> * @return underlying {@link SocketUDT} or null, if parameter is not * {@link UdtChannel} */ public static SocketUDT socketUDT(final Channel channel) { final ChannelUDT channelUDT = channelUDT(channel); if (channelUDT == null) { return null; } else { return channelUDT.socketUDT(); } }
@Override protected SocketAddress localAddress0() { return SocketUtils.localSocketAddress(javaChannel().socket()); }
@Override protected SocketAddress localAddress0() { return javaChannel().socket().getLocalSocketAddress(); }
@Override protected SocketAddress remoteAddress0() { return javaChannel().socket().getRemoteSocketAddress(); }
@Override public boolean isActive() { final SocketChannelUDT channelUDT = javaChannel(); return channelUDT.isOpen() && channelUDT.isConnectFinished(); }
@Override public Void run() throws IOException { socketChannel.bind(localAddress); return null; } });
@Override protected void doClose() throws Exception { javaChannel().close(); }
@Override public Void run() throws IOException { socketChannel.bind(localAddress); return null; } });
@Override public Void run() throws IOException { socketChannel.bind(localAddress); return null; } });