Class AFTIPCSocketChannel
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, NetworkChannel, ReadableByteChannel, ScatteringByteChannel, WritableByteChannel, AFSocketExtensions, AFSomeSocket, AFSomeSocketChannel, AFSomeSocketThing, FileDescriptorAccess, AFTIPCSocketExtensions
public final class AFTIPCSocketChannel
extends AFSocketChannel<AFTIPCSocketAddress>
implements AFTIPCSocketExtensions
A selectable channel for stream-oriented connecting sockets.
- Author:
- Christian Kohlschütter
-
Nested Class Summary
Nested classes/interfaces inherited from class AFSocketChannel
AFSocketChannel.AFSocketSupplier<A>Modifier and TypeClassDescriptionprotected static interfaceA reference to a method that provides anAFSocketinstance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the TIPC "DestName" information from the ancillary receive buffer (if any was set), ornullif no DestName was retrieved.Returns the TIPC "ErrInfo" information from the ancillary receive buffer (if any was set), ornullif no error was retrieved.static AFTIPCSocketChannelopen()Opens a datagram channel.Methods inherited from class AFSocketChannel
bind, connect, ensureAncillaryReceiveBufferSize, finishConnect, getAFSocket, getAncillaryReceiveBufferSize, getFileDescriptor, getLocalAddress, getLocalSocketAddress, getOption, getRemoteAddress, getRemoteSocketAddress, implCloseSelectableChannel, implConfigureBlocking, isConnected, isConnectionPending, open, open, open, read, read, setAncillaryReceiveBufferSize, setOption, setShutdownOnClose, shutdownInput, shutdownOutput, socket, supportedOptions, toString, write, writeModifier and TypeMethodDescriptionbind(SocketAddress local) final booleanconnect(SocketAddress remote) final voidensureAncillaryReceiveBufferSize(int minSize) Ensures a minimum ancillary receive buffer size.final booleanprotected final AFSocket<AFTIPCSocketAddress> Returns the correspondingAFSocket.final intReturns the size of the receive buffer for ancillary messages (in bytes).final FileDescriptorReturns the correspondingFileDescriptor.final AFTIPCSocketAddressfinal AFTIPCSocketAddressReturns the socket's local socket address, ornullif unavailable or if there was a problem retrieving it.final <T> TgetOption(SocketOption<T> name) final AFTIPCSocketAddressfinal AFTIPCSocketAddressReturns the socket's remote socket address, ornullif unavailable/not connected, or if there was a problem retrieving it.protected final voidprotected final voidimplConfigureBlocking(boolean block) final booleanfinal booleanstatic SocketChannelopen(ProtocolFamily family) Opens a socket channel.protected static final <A extends AFSocketAddress>
AFSocketChannel<A> open(AFSocketChannel.AFSocketSupplier<A> supplier) Opens a socket channel.protected static final <A extends AFSocketAddress>
AFSocketChannel<A> open(AFSocketChannel.AFSocketSupplier<A> supplier, SocketAddress remote) Opens a socket channel, connecting to the given socket address.final intread(ByteBuffer dst) final longread(ByteBuffer[] dsts, int offset, int length) final voidsetAncillaryReceiveBufferSize(int size) Sets the size of the receive buffer for ancillary messages (in bytes).final <T> AFSocketChannel<AFTIPCSocketAddress> setOption(SocketOption<T> name, T value) voidsetShutdownOnClose(boolean enabled) Configures whether the socket should be shutdown uponCloseable.close(), which is the default.final AFSocket<AFTIPCSocketAddress> socket()final Set<SocketOption<?>> final StringtoString()final intwrite(ByteBuffer src) final longwrite(ByteBuffer[] srcs, int offset, int length) Methods inherited from class SocketChannel
open, read, validOps, writeMethods inherited from class AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, registerMethods inherited from class SelectableChannel
registerMethods inherited from class AbstractInterruptibleChannel
begin, close, end, isOpenMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AFSomeSocketChannel
configureBlocking, isBlockingModifier and TypeMethodDescriptionconfigureBlocking(boolean block) Adjusts this channel's blocking mode.booleanChecks if the channel is configured blocking.
-
Method Details
-
getErrInfo
Description copied from interface:AFTIPCSocketExtensionsReturns the TIPC "ErrInfo" information from the ancillary receive buffer (if any was set), ornullif no error was retrieved.- Specified by:
getErrInfoin interfaceAFTIPCSocketExtensions- Returns:
- The ErrInfo.
-
getDestName
Description copied from interface:AFTIPCSocketExtensionsReturns the TIPC "DestName" information from the ancillary receive buffer (if any was set), ornullif no DestName was retrieved.- Specified by:
getDestNamein interfaceAFTIPCSocketExtensions- Returns:
- The service address or range (without scope) that was specified by the sender of the message.
-
open
Opens a datagram channel.- Returns:
- The new channel
- Throws:
IOException- if an I/O error occurs
-