io.netty.channel.socket.SocketChannel which uses NIO selector based implementation.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final SocketChannelConfig | |
| private static final SelectorProvider | |
| private static final InternalLogger | |
| private static final Method |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | NioSocketChannel(SelectorProvider provider, InternetProtocolFamily family)
Create a new instance using the given |
| public | |
| public | NioSocketChannel(Channel
the parent, SocketChannel Channel which created this instance or null if it was created by the userthe socket)SocketChannel which will be usedCreate a new instance |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public SocketChannelConfig | config()
Implements io. |
| protected void | doBind(SocketAddress localAddress)
Implements abstract io. Channel to the SocketAddress
|
| private void | |
| protected void | |
| protected boolean | doConnect(SocketAddress remoteAddress, SocketAddress localAddress)
Implements abstract io. |
| protected void | doDisconnect()
Implements abstract io. Channel from its remote peer
|
| protected void | doFinishConnect()
Implements abstract io. |
| protected int | doReadBytes(ByteBuf byteBuf)
Implements abstract io. ByteBuf and return the amount.
|
| protected final void | doShutdownOutput()
Overrides io. |
| protected void | doWrite(ChannelOutboundBuffer in)
Overrides io. |
| protected int | doWriteBytes(ByteBuf
the buf)ByteBuf from which the bytes should be writtenImplements abstract io. ByteBuf to the underlying java..
|
| protected long | doWriteFileRegion(FileRegion
the region)FileRegion from which the bytes should be writtenImplements abstract io. FileRegion
|
| public boolean | isActive()
Implements io. true if the Channel is active and so connected.
|
| public boolean | isInputShutdown()
Implements io. true if and only if the remote peer shut down its output so that no more
data is received from this channel.
|
| protected boolean | |
| public boolean | |
| public boolean | isShutdown()
Implements io. |
| protected SocketChannel | |
| public InetSocketAddress | localAddress()
Overrides io. Implements io. |
| protected SocketAddress | localAddress0()
Implements abstract io. SocketAddress which is bound locally.
|
| private static SocketChannel | |
| protected AbstractNioChannel. | newUnsafe()
Overrides io. AbstractUnsafe instance which will be used for the life-time of the Channel
|
| public ServerSocketChannel | parent()
Overrides io. Implements io. |
| public InetSocketAddress | remoteAddress()
Overrides io. Implements io. |
| protected SocketAddress | remoteAddress0()
Implements abstract io. SocketAddress which the Channel is connected to.
|
| public ChannelFuture | shutdown()
Implements io. |
| public ChannelFuture | shutdown(final ChannelPromise
will be completed when both shutdown operations complete. promise)Implements io. |
| private static void | shutdownDone(ChannelFuture shutdownOutputFuture, ChannelFuture shutdownInputFuture, ChannelPromise promise)
|
| public ChannelFuture | shutdownInput()
Implements abstract io. Implements io. |
| public ChannelFuture | shutdownInput(final ChannelPromise promise)
Implements io. ChannelPromise.
|
| private void | |
| private void | |
| public ChannelFuture | |
| public ChannelFuture | shutdownOutput(final ChannelPromise promise)
Implements io. ChannelPromise.
|
| private void |
| config | back to summary |
|---|---|
| private final SocketChannelConfig config | |
| DEFAULT_SELECTOR_PROVIDER | back to summary |
|---|---|
| private static final SelectorProvider DEFAULT_SELECTOR_PROVIDER | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| OPEN_SOCKET_CHANNEL_WITH_FAMILY | back to summary |
|---|---|
| private static final Method OPEN_SOCKET_CHANNEL_WITH_FAMILY | |
| NioSocketChannel | back to summary |
|---|---|
| public NioSocketChannel() Create a new instance | |
| NioSocketChannel | back to summary |
|---|---|
| public NioSocketChannel(SelectorProvider provider) Create a new instance using the given | |
| NioSocketChannel | back to summary |
|---|---|
| public NioSocketChannel(SelectorProvider provider, InternetProtocolFamily family) Create a new instance using the given | |
| NioSocketChannel | back to summary |
|---|---|
| public NioSocketChannel(SocketChannel socket) Create a new instance using the given | |
| NioSocketChannel | back to summary |
|---|---|
| public NioSocketChannel(Channel parent, SocketChannel socket) Create a new instance
| |
| adjustMaxBytesPerGatheringWrite | back to summary |
|---|---|
| private void adjustMaxBytesPerGatheringWrite(int attempted, int written, int oldMaxBytesPerGatheringWrite) | |
| config | back to summary |
|---|---|
| public SocketChannelConfig config() Implements io. Doc from io. Returns the configuration of this channel.
| |
| doBind | back to summary |
|---|---|
| protected void doBind(SocketAddress localAddress) throws Exception Implements abstract io. Doc from io. Bind the
| |
| doBind0 | back to summary |
|---|---|
| private void doBind0(SocketAddress localAddress) throws Exception | |
| doClose | back to summary |
|---|---|
| protected void doClose() throws Exception Overrides io. Doc from io. Close the
| |
| doConnect | back to summary |
|---|---|
| protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception Implements abstract io. Doc from io. Connect to the remote peer
| |
| doDisconnect | back to summary |
|---|---|
| protected void doDisconnect() throws Exception Implements abstract io. Doc from io. Disconnect this
| |
| doFinishConnect | back to summary |
|---|---|
| protected void doFinishConnect() throws Exception Implements abstract io. Doc from io. Finish the connect
| |
| doReadBytes | back to summary |
|---|---|
| protected int doReadBytes(ByteBuf byteBuf) throws Exception Implements abstract io. Doc from io. Read bytes into the given
| |
| doShutdownOutput | back to summary |
|---|---|
| protected final void doShutdownOutput() throws Exception Overrides io. Doc from io. Called when conditions justify shutting down the output portion of the channel. This may happen if a write operation throws an exception.
| |
| doWrite | back to summary |
|---|---|
| protected void doWrite(ChannelOutboundBuffer in) throws Exception Overrides io. Doc from io. Flush the content of the given buffer to the remote peer.
| |
| doWriteBytes | back to summary |
|---|---|
| protected int doWriteBytes(ByteBuf buf) throws Exception Implements abstract io. Doc from io. Write bytes form the given | |
| doWriteFileRegion | back to summary |
|---|---|
| protected long doWriteFileRegion(FileRegion region) throws Exception Implements abstract io. Doc from io. Write a
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements io. Doc from io. Return
| |
| isInputShutdown | back to summary |
|---|---|
| public boolean isInputShutdown() Implements io. Doc from io. Returns
| |
| isInputShutdown0 | back to summary |
|---|---|
| protected boolean isInputShutdown0() Overrides io.
| |
| isOutputShutdown | back to summary |
|---|---|
| public boolean isOutputShutdown() Implements io.
| |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown() Implements io. Doc from io. Determine if both the input and output of this channel have been shutdown.
| |
| javaChannel | back to summary |
|---|---|
| protected SocketChannel javaChannel() Overrides io.
| |
| localAddress | back to summary |
|---|---|
| public InetSocketAddress localAddress() Overrides io. Implements io. Doc from io. Returns the local address where this channel is bound to. The returned
| |
| localAddress0 | back to summary |
|---|---|
| protected SocketAddress localAddress0() Implements abstract io. Doc from io. Returns the
| |
| newChannel | back to summary |
|---|---|
| private static SocketChannel newChannel(SelectorProvider provider, InternetProtocolFamily family) | |
| newUnsafe | back to summary |
|---|---|
| protected AbstractNioChannel. Overrides io. Doc from io. Create a new
| |
| parent | back to summary |
|---|---|
| public ServerSocketChannel parent() Overrides io. Implements io. Doc from io. Returns the parent of this channel.
| |
| remoteAddress | back to summary |
|---|---|
| public InetSocketAddress remoteAddress() Overrides io. Implements io. Doc from io. Returns the remote address where this channel is connected to. The
returned
| |
| remoteAddress0 | back to summary |
|---|---|
| protected SocketAddress remoteAddress0() Implements abstract io. Doc from io. Return the
| |
| shutdown | back to summary |
|---|---|
| public ChannelFuture shutdown() Implements io. Doc from io. Will shutdown the input and output sides of this channel.
| |
| shutdown | back to summary |
|---|---|
| public ChannelFuture shutdown(final ChannelPromise promise) Implements io. Doc from io. Will shutdown the input and output sides of this channel.
| |
| shutdownDone | back to summary |
|---|---|
| private static void shutdownDone(ChannelFuture shutdownOutputFuture, ChannelFuture shutdownInputFuture, ChannelPromise promise) | |
| shutdownInput | back to summary |
|---|---|
| public ChannelFuture shutdownInput() Implements abstract io. Implements io. Doc from io. Shutdown the input side of the channel.
| |
| shutdownInput | back to summary |
|---|---|
| public ChannelFuture shutdownInput(final ChannelPromise promise) Implements io. Doc from io. Will shutdown the input and notify
| |
| shutdownInput0 | back to summary |
|---|---|
| private void shutdownInput0(final ChannelPromise promise) | |
| shutdownInput0 | back to summary |
|---|---|
private void shutdownInput0() throws Exception
| |
| shutdownOutput | back to summary |
|---|---|
| public ChannelFuture shutdownOutput() Implements io.
| |
| shutdownOutput | back to summary |
|---|---|
| public ChannelFuture shutdownOutput(final ChannelPromise promise) Implements io. Doc from io. Will shutdown the output and notify
| |
| shutdownOutputDone | back to summary |
|---|---|
| private void shutdownOutputDone(final ChannelFuture shutdownOutputFuture, final ChannelPromise promise) | |
| Modifier and Type | Field and Description |
|---|---|
| private volatile int |
| Access | Constructor and Description |
|---|---|
| private |
| maxBytesPerGatheringWrite | back to summary |
|---|---|
| private volatile int maxBytesPerGatheringWrite | |
| NioSocketChannelConfig | back to summary |
|---|---|
| private NioSocketChannelConfig(NioSocketChannel channel, Socket javaSocket) | |
| autoReadCleared | back to summary |
|---|---|
| protected void autoReadCleared() Overrides io. Doc from io. Is called once
| |
| calculateMaxBytesPerGatheringWrite | back to summary |
|---|---|
| private void calculateMaxBytesPerGatheringWrite() | |
| getMaxBytesPerGatheringWrite | back to summary |
|---|---|
| pack-priv int getMaxBytesPerGatheringWrite() | |
| getOption | back to summary |
|---|---|
| public <T> T getOption(ChannelOption<T> option) Overrides io. Implements io. Doc from io. Return the value of the given
| |
| getOptions | back to summary |
|---|---|
| public Map Overrides io. Implements io. Doc from io. Return all set
| |
| jdkChannel | back to summary |
|---|---|
| private SocketChannel jdkChannel() | |
| setMaxBytesPerGatheringWrite | back to summary |
|---|---|
| pack-priv void setMaxBytesPerGatheringWrite(int maxBytesPerGatheringWrite) | |
| setOption | back to summary |
|---|---|
| public <T> boolean setOption(ChannelOption<T> option, T value) Overrides io. Implements io. Doc from io. Sets a configuration property with the specified name and value. To override this method properly, you must call the super class:
public boolean setOption(ChannelOption<T> option, T value) {
if (super.setOption(option, value)) {
return true;
}
if (option.equals(additionalOption)) {
....
return true;
}
return false;
}
| |
| setSendBufferSize | back to summary |
|---|---|
| public NioSocketChannel. Overrides io. Implements io. Doc from io. Sets the
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected Executor | prepareToClose()
Overrides io. Channel.
|
| NioSocketChannelUnsafe | back to summary |
|---|---|
| private NioSocketChannelUnsafe() | |
| prepareToClose | back to summary |
|---|---|
| protected Executor prepareToClose() Overrides io. Doc from io. Prepares to close the
| |