Interface AFSomeSocketChannel
- All Superinterfaces:
AFSomeSocketThing, AutoCloseable, Channel, Closeable, FileDescriptorAccess, InterruptibleChannel
- All Known Implementing Classes:
AFDatagramChannel, AFServerSocketChannel, AFSocketChannel, AFUNIXDatagramChannel, AFUNIXServerSocketChannel, AFUNIXSocketChannel
public interface AFSomeSocketChannel
extends InterruptibleChannel, FileDescriptorAccess, AFSomeSocketThing
Marker interface that combines junixsocket-based
SocketChannels, DatagramChannels
or ServerSocketChannels.- Author:
- Christian Kohlschütter
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionconfigureBlocking(boolean block) Adjusts this channel's blocking mode.booleanChecks if the channel is configured blocking.Methods inherited from interface AFSomeSocketThing
getLocalSocketAddress, setShutdownOnCloseModifier and TypeMethodDescription@Nullable SocketAddressReturns the socket's local socket address, ornullif unavailable or if there was a problem retrieving it.voidsetShutdownOnClose(boolean enabled) Configures whether the socket should be shutdown uponCloseable.close(), which is the default.Methods inherited from interface FileDescriptorAccess
getFileDescriptorMethods inherited from interface InterruptibleChannel
close
-
Method Details
-
isBlocking
boolean isBlocking()Checks if the channel is configured blocking. The result may be cached, and therefore not invoke native code to check if the underlying socket is actually configured that way.- Returns:
trueif blocking.
-
configureBlocking
Adjusts this channel's blocking mode.If the given blocking mode is different from the currently cached blocking mode then this method native code to change it.
- Parameters:
block-trueif blocking is desired.- Returns:
- This channel.
- Throws:
IOException- on error.
-