Package org.aoju.bus.socket.channel
Class EnhanceAsynchronousServerSocketChannel
java.lang.Object
java.nio.channels.AsynchronousServerSocketChannel
org.aoju.bus.socket.channel.EnhanceAsynchronousServerSocketChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,AsynchronousChannel,Channel,NetworkChannel
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptionaccept()<A> voidaccept(A attachment, CompletionHandler<AsynchronousSocketChannel, ? super A> handler) bind(SocketAddress local, int backlog) voidclose()voiddoAccept()<T> TgetOption(SocketOption<T> name) booleanisOpen()setOption(SocketOption<T> name, T value) Set<SocketOption<?>> Methods inherited from class java.nio.channels.AsynchronousServerSocketChannel
bind, open, open, provider
-
Method Details
-
bind
- Specified by:
bindin classAsynchronousServerSocketChannel- Throws:
IOException
-
setOption
public <T> AsynchronousServerSocketChannel setOption(SocketOption<T> name, T value) throws IOException - Specified by:
setOptionin interfaceNetworkChannel- Specified by:
setOptionin classAsynchronousServerSocketChannel- Throws:
IOException
-
getOption
- Throws:
IOException
-
supportedOptions
-
accept
public <A> void accept(A attachment, CompletionHandler<AsynchronousSocketChannel, ? super A> handler) - Specified by:
acceptin classAsynchronousServerSocketChannel
-
doAccept
public void doAccept() -
accept
- Specified by:
acceptin classAsynchronousServerSocketChannel
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceNetworkChannel- Specified by:
getLocalAddressin classAsynchronousServerSocketChannel- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Throws:
IOException
-