-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.InterruptibleChannel,java.nio.channels.NetworkChannel
public class BaseDelegatingServerSocketChannel<T extends ServerSocketChannel> extends ServerSocketChannel
Implements a
ServerSocketChannelwhich delegates (its method calls) to anotherServerSocketChannel. In other words, the former wraps the latter.
-
-
Constructor Summary
Constructors Constructor Description BaseDelegatingServerSocketChannel(T delegate)Initializes a new BaseDelegatingServerSocketChannelinstance which is to delegate (its method calls) to a specificServerSocketChannel.
-
Method Summary
Modifier and Type Method Description SocketChannelaccept()Forwards to delegate. ServerSocketChannelbind(SocketAddress local, int backlog)Forwards to delegate and returns this.SocketAddressgetLocalAddress()Forwards to delegate. <U> UgetOption(SocketOption<U> name)Forwards to delegate. booleanisBound()Determines whether this BaseDelegatingServerSocketChannelis bound.<U> ServerSocketChannelsetOption(SocketOption<U> name, U value)Forwards to delegate and returns this.ServerSocketsocket()Allows wrapping the socketof delegate.Set<SocketOption<out Object>>supportedOptions()Forwards to delegate. -
Methods inherited from class java.nio.channels.ServerSocketChannel
bind, open, validOps -
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, isBlocking, isRegistered, keyFor, provider, register -
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
close, isOpen -
Methods inherited from class java.nio.channels.NetworkChannel
bind, setOption -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BaseDelegatingServerSocketChannel
BaseDelegatingServerSocketChannel(T delegate)
Initializes a newBaseDelegatingServerSocketChannelinstance which is to delegate (its method calls) to a specificServerSocketChannel.- Parameters:
delegate- theServerSocketChannelthe new instance is to delegate (its method calls) to
-
-
Method Detail
-
accept
SocketChannel accept()
Forwards to delegate.
-
bind
ServerSocketChannel bind(SocketAddress local, int backlog)
Forwards to delegate and returns
this.
-
getLocalAddress
SocketAddress getLocalAddress()
Forwards to delegate.
-
getOption
<U> U getOption(SocketOption<U> name)
Forwards to delegate.
-
isBound
boolean isBound()
Determines whether this
BaseDelegatingServerSocketChannelis bound.
-
setOption
<U> ServerSocketChannel setOption(SocketOption<U> name, U value)
Forwards to delegate and returns
this.
-
socket
ServerSocket socket()
Allows wrapping the
socketof delegate.
-
supportedOptions
Set<SocketOption<out Object>> supportedOptions()
Forwards to delegate.
-
-
-
-