Package jnr.unixsocket.impl
Class AbstractNativeSocketChannel
java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.SelectableChannel
java.nio.channels.spi.AbstractSelectableChannel
java.nio.channels.SocketChannel
jnr.unixsocket.impl.AbstractNativeSocketChannel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ByteChannel
,Channel
,GatheringByteChannel
,InterruptibleChannel
,NetworkChannel
,ReadableByteChannel
,ScatteringByteChannel
,WritableByteChannel
,jnr.enxio.channels.NativeSelectableChannel
- Direct Known Subclasses:
UnixSocketChannel
public abstract class AbstractNativeSocketChannel
extends SocketChannel
implements ByteChannel, jnr.enxio.channels.NativeSelectableChannel
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractNativeSocketChannel
(int fd) AbstractNativeSocketChannel
(SelectorProvider provider, int fd) -
Method Summary
Modifier and TypeMethodDescriptionfinal int
getFD()
protected void
protected void
implConfigureBlocking
(boolean block) int
read
(ByteBuffer dst) long
read
(ByteBuffer[] dsts, int offset, int length) void
setFD
(int fd) int
write
(ByteBuffer src) long
write
(ByteBuffer[] srcs, int offset, int length) Methods inherited from class java.nio.channels.SocketChannel
bind, connect, finishConnect, getLocalAddress, getRemoteAddress, isConnected, isConnectionPending, open, open, read, setOption, socket, validOps, write
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
Methods inherited from class java.nio.channels.SelectableChannel
register
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.nio.channels.NetworkChannel
getOption, supportedOptions
-
Field Details
-
common
-
SHUT_RD
private static final int SHUT_RD -
SHUT_WR
private static final int SHUT_WR
-
-
Constructor Details
-
AbstractNativeSocketChannel
public AbstractNativeSocketChannel(int fd) -
AbstractNativeSocketChannel
AbstractNativeSocketChannel(SelectorProvider provider, int fd)
-
-
Method Details
-
setFD
public void setFD(int fd) -
getFD
public final int getFD()- Specified by:
getFD
in interfacejnr.enxio.channels.NativeSelectableChannel
-
implCloseSelectableChannel
- Specified by:
implCloseSelectableChannel
in classAbstractSelectableChannel
- Throws:
IOException
-
implConfigureBlocking
- Specified by:
implConfigureBlocking
in classAbstractSelectableChannel
- Throws:
IOException
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Specified by:
read
in classSocketChannel
- Throws:
IOException
-
read
- Specified by:
read
in interfaceScatteringByteChannel
- Specified by:
read
in classSocketChannel
- Throws:
IOException
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Specified by:
write
in classSocketChannel
- Throws:
IOException
-
write
- Specified by:
write
in interfaceGatheringByteChannel
- Specified by:
write
in classSocketChannel
- Throws:
IOException
-
shutdownInput
- Specified by:
shutdownInput
in classSocketChannel
- Throws:
IOException
-
shutdownOutput
- Specified by:
shutdownOutput
in classSocketChannel
- Throws:
IOException
-