APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.nio.ch

pack-priv Class UnixAsynchronousSocketChannelImpl

extends AsynchronousSocketChannelImpl
implements PollableChannel
Class Inheritance
All Implemented Interfaces
sun.nio.ch.Port.PollableChannel, java.io.Closeable, java.lang.AutoCloseable
Imports
java.nio.channels.*, java.nio.ByteBuffer, java.net.*, java.util.concurrent.*, java.io.IOException, .FileDescriptor, jdk.internal.util.Exceptions, sun.net.ConnectionResetException

Unix implementation of AsynchronousSocketChannel

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private Object
private PendingFuture<Void, Object>
private CompletionHandler<Void, Object>
private boolean
private static final boolean
private final int
private boolean
private boolean
private static final NativeDispatcher
private SocketAddress
private final Port
private Object
private ByteBuffer
private ByteBuffer[]
private PendingFuture<Number, Object>
private CompletionHandler<Number, Object>
private boolean
private Runnable
private Runnable
private Future<?>
private final Object
private Object
private ByteBuffer
private ByteBuffer[]
private PendingFuture<Number, Object>
private CompletionHandler<Number, Object>
private boolean
private Runnable
private Runnable
private Future<?>
Inherited from sun.nio.ch.AsynchronousSocketChannelImpl:
fdlocalAddressremoteAddressST_CONNECTEDST_PENDINGST_UNCONNECTEDST_UNINITIALIZEDstatestateLock

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static native void
checkConnect(int fdVal)

private void
finish(boolean mayInvokeDirect, boolean readable, boolean writable)

private void
finishConnect(boolean mayInvokeDirect)

private void
finishRead(boolean mayInvokeDirect)

private void
finishWrite(boolean mayInvokeDirect)

public AsynchronousChannelGroupImpl
pack-priv void
implClose()

Implements abstract sun.nio.ch.AsynchronousSocketChannelImpl.implClose.

Invoked to close socket and release other resources.

pack-priv <A> Future<Void>
implConnect(SocketAddress remote, A attachment, CompletionHandler<Void, ? super A> handler)

Implements abstract sun.nio.ch.AsynchronousSocketChannelImpl.implConnect.

Invoked by connect to initiate the connect operation.

pack-priv <V extends Number, A> Future<V>
implRead(boolean isScatteringRead, ByteBuffer dst, ByteBuffer[] dsts, long timeout, TimeUnit unit, A attachment, CompletionHandler<V, ? super A> handler)

Implements abstract sun.nio.ch.AsynchronousSocketChannelImpl.implRead.

Initiates a read or scattering read operation

pack-priv <V extends Number, A> Future<V>
implWrite(boolean isGatheringWrite, ByteBuffer src, ByteBuffer[] srcs, long timeout, TimeUnit unit, A attachment, CompletionHandler<V, ? super A> handler)

Implements abstract sun.nio.ch.AsynchronousSocketChannelImpl.implWrite.

Initiates a read or scattering read operation

private void
public void
onCancel(PendingFuture<?, ?> task)

Implements sun.nio.ch.Cancellable.onCancel.

Invoked to notify channel that cancel has been invoked while holding the Future's lock.

public void
onEvent(int events, boolean mayInvokeDirect)

Implements sun.nio.ch.Port.PollableChannel.onEvent.

Invoked by event handler thread when file descriptor is polled

private void
private void
Inherited from sun.nio.ch.AsynchronousSocketChannelImpl:
beginbindcloseconnectconnectenableReadingenableReadingenableWritingenableWritingendgetLocalAddressgetOptiongetRemoteAddressisOpenkillConnectkillReadingkillWritingreadreadreadsetOptionshutdownInputshutdownOutputsupportedOptionstoStringwritewritewrite

Field Detail

connectAttachmentback to summary
private Object connectAttachment
connectFutureback to summary
private PendingFuture<Void, Object> connectFuture
connectHandlerback to summary
private CompletionHandler<Void, Object> connectHandler
connectPendingback to summary
private boolean connectPending
disableSynchronousReadback to summary
private static final boolean disableSynchronousRead
fdValback to summary
private final int fdVal
isGatheringWriteback to summary
private boolean isGatheringWrite
isScatteringReadback to summary
private boolean isScatteringRead
ndback to summary
private static final NativeDispatcher nd
pendingRemoteback to summary
private SocketAddress pendingRemote
portback to summary
private final Port port
readAttachmentback to summary
private Object readAttachment
readBufferback to summary
private ByteBuffer readBuffer
readBuffersback to summary
private ByteBuffer[] readBuffers
readFutureback to summary
private PendingFuture<Number, Object> readFuture
readHandlerback to summary
private CompletionHandler<Number, Object> readHandler
readPendingback to summary
private boolean readPending
readScopeHandleReleasersback to summary
private Runnable readScopeHandleReleasers
readTimeoutTaskback to summary
private Runnable readTimeoutTask
readTimerback to summary
private Future<?> readTimer
updateLockback to summary
private final Object updateLock
writeAttachmentback to summary
private Object writeAttachment
writeBufferback to summary
private ByteBuffer writeBuffer
writeBuffersback to summary
private ByteBuffer[] writeBuffers
writeFutureback to summary
private PendingFuture<Number, Object> writeFuture
writeHandlerback to summary
private CompletionHandler<Number, Object> writeHandler
writePendingback to summary
private boolean writePending
writeScopeHandleReleasersback to summary
private Runnable writeScopeHandleReleasers
writeTimeoutTaskback to summary
private Runnable writeTimeoutTask
writeTimerback to summary
private Future<?> writeTimer

Constructor Detail

UnixAsynchronousSocketChannelImplback to summary
pack-priv UnixAsynchronousSocketChannelImpl(Port port) throws IOException
UnixAsynchronousSocketChannelImplback to summary
pack-priv UnixAsynchronousSocketChannelImpl(Port port, FileDescriptor fd, InetSocketAddress remote) throws IOException

Method Detail

checkConnectback to summary
private static native void checkConnect(int fdVal) throws IOException
finishback to summary
private void finish(boolean mayInvokeDirect, boolean readable, boolean writable)
finishConnectback to summary
private void finishConnect(boolean mayInvokeDirect)
finishReadback to summary
private void finishRead(boolean mayInvokeDirect)
finishWriteback to summary
private void finishWrite(boolean mayInvokeDirect)
groupback to summary
public AsynchronousChannelGroupImpl group()

Implements sun.nio.ch.Groupable.group.

Annotations
@Override
implCloseback to summary
pack-priv void implClose() throws IOException

Implements abstract sun.nio.ch.AsynchronousSocketChannelImpl.implClose.

Doc from sun.nio.ch.AsynchronousSocketChannelImpl.implClose.

Invoked to close socket and release other resources.

Annotations
@Override
implConnectback to summary
pack-priv <A> Future<Void> implConnect(SocketAddress remote, A attachment, CompletionHandler<Void, ? super A> handler)

Implements abstract sun.nio.ch.AsynchronousSocketChannelImpl.implConnect.

Doc from sun.nio.ch.AsynchronousSocketChannelImpl.implConnect.

Invoked by connect to initiate the connect operation.

Annotations
@Override
@SuppressWarnings:unchecked
implReadback to summary
pack-priv <V extends Number, A> Future<V> implRead(boolean isScatteringRead, ByteBuffer dst, ByteBuffer[] dsts, long timeout, TimeUnit unit, A attachment, CompletionHandler<V, ? super A> handler)

Implements abstract sun.nio.ch.AsynchronousSocketChannelImpl.implRead.

Initiates a read or scattering read operation

Annotations
@Override
@SuppressWarnings:unchecked
implWriteback to summary
pack-priv <V extends Number, A> Future<V> implWrite(boolean isGatheringWrite, ByteBuffer src, ByteBuffer[] srcs, long timeout, TimeUnit unit, A attachment, CompletionHandler<V, ? super A> handler)

Implements abstract sun.nio.ch.AsynchronousSocketChannelImpl.implWrite.

Initiates a read or scattering read operation

Annotations
@Override
@SuppressWarnings:unchecked
lockAndUpdateEventsback to summary
private void lockAndUpdateEvents()
onCancelback to summary
public void onCancel(PendingFuture<?, ?> task)

Implements sun.nio.ch.Cancellable.onCancel.

Doc from sun.nio.ch.Cancellable.onCancel.

Invoked to notify channel that cancel has been invoked while holding the Future's lock.

Annotations
@Override
onEventback to summary
public void onEvent(int events, boolean mayInvokeDirect)

Implements sun.nio.ch.Port.PollableChannel.onEvent.

Invoked by event handler thread when file descriptor is polled

Annotations
@Override
setConnectedback to summary
private void setConnected() throws IOException
updateEventsback to summary
private void updateEvents()
sun.nio.ch back to summary

private final Enum UnixAsynchronousSocketChannelImpl.OpType

extends Enum<UnixAsynchronousSocketChannelImpl.OpType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final UnixAsynchronousSocketChannelImpl.OpType
public static final UnixAsynchronousSocketChannelImpl.OpType
public static final UnixAsynchronousSocketChannelImpl.OpType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static UnixAsynchronousSocketChannelImpl.OpType
public static UnixAsynchronousSocketChannelImpl.OpType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CONNECTback to summary
public static final UnixAsynchronousSocketChannelImpl.OpType CONNECT
READback to summary
public static final UnixAsynchronousSocketChannelImpl.OpType READ
WRITEback to summary
public static final UnixAsynchronousSocketChannelImpl.OpType WRITE

Constructor Detail

OpTypeback to summary
private OpType()

Method Detail

valueOfback to summary
public static UnixAsynchronousSocketChannelImpl.OpType valueOf(String name)
valuesback to summary
public static UnixAsynchronousSocketChannelImpl.OpType[] values()