io.netty.channel.socket.ServerSocketChannel implementation which uses
NIO selector based implementation to accept new connections.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final ServerSocketChannelConfig | |
| private static final SelectorProvider | |
| private static final InternalLogger | |
| private static final ChannelMetadata | |
| private static final Method |
| Access | Constructor and Description |
|---|---|
| public | |
| public | NioServerSocketChannel(SelectorProvider provider)
Create a new instance using the given |
| public | NioServerSocketChannel(SelectorProvider provider, InternetProtocolFamily family)
Create a new instance using the given |
| public | NioServerSocketChannel(ServerSocketChannel channel)
Create a new instance using the given |
| config | back to summary |
|---|---|
| private final ServerSocketChannelConfig config | |
| DEFAULT_SELECTOR_PROVIDER | back to summary |
|---|---|
| private static final SelectorProvider DEFAULT_SELECTOR_PROVIDER | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| METADATA | back to summary |
|---|---|
| private static final ChannelMetadata METADATA | |
| OPEN_SERVER_SOCKET_CHANNEL_WITH_FAMILY | back to summary |
|---|---|
| private static final Method OPEN_SERVER_SOCKET_CHANNEL_WITH_FAMILY | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel() Create a new instance | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel(SelectorProvider provider) Create a new instance using the given | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel(SelectorProvider provider, InternetProtocolFamily family) Create a new instance using the given | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel(ServerSocketChannel channel) Create a new instance using the given | |
| closeOnReadError | back to summary |
|---|---|
| protected boolean closeOnReadError(Throwable cause) Overrides io.
| |
| config | back to summary |
|---|---|
| public ServerSocketChannelConfig 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
| |
| 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
| |
| doReadMessages | back to summary |
|---|---|
| protected int doReadMessages(List<Object> buf) throws Exception Implements abstract io. Doc from io. Read messages into the given array and return the amount which was read.
| |
| doWriteMessage | back to summary |
|---|---|
| protected boolean doWriteMessage(Object msg, ChannelOutboundBuffer in) throws Exception Implements abstract io. Doc from io. Write a message to the underlying
| |
| filterOutboundMessage | back to summary |
|---|---|
| protected final Object filterOutboundMessage(Object msg) throws Exception Overrides io. Doc from io. Invoked when a new message is added to a
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements io. Doc from io. Return
| |
| javaChannel | back to summary |
|---|---|
| protected ServerSocketChannel 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
| |
| metadata | back to summary |
|---|---|
| public ChannelMetadata metadata() Implements io. Doc from io. Return the
| |
| newChannel | back to summary |
|---|---|
| private static ServerSocketChannel newChannel(SelectorProvider provider, InternetProtocolFamily family) | |
| 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
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected void | autoReadCleared()
Overrides io. setAutoRead(boolean) is called with false and isAutoRead() was
true before.
|
| public <T> T | getOption(ChannelOption<T> option)
Overrides io. Implements io. ChannelOption
|
| public Map | getOptions()
Overrides io. Implements io. ChannelOption's.
|
| private ServerSocketChannel | |
| public <T> boolean | setOption(ChannelOption<T> option, T value)
Overrides io. Implements io. |
| NioServerSocketChannelConfig | back to summary |
|---|---|
| private NioServerSocketChannelConfig(NioServerSocketChannel channel, ServerSocket javaSocket) | |
| autoReadCleared | back to summary |
|---|---|
| protected void autoReadCleared() Overrides io. Doc from io. Is called once
| |
| 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 ServerSocketChannel jdkChannel() | |
| 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;
}
| |