Top Inners Fields Constructors Methods
jdk.internal.net.http.websocket

public Class TransportImpl

extends Object
implements Transport
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.websocket.Transport
Imports
jdk.internal.net.http.common.Demand, .Logger, .MinimalFuture, .SequentialScheduler, .SequentialScheduler.CompleteRestartableTask, .Utils, java.io.IOException, java.nio.ByteBuffer, .CharBuffer, java.nio.channels.SelectionKey, java.util.concurrent.CompletableFuture, java.util.concurrent.atomic.AtomicLong, .AtomicReference, java.util.concurrent.locks.ReentrantLock, java.util.function.BiConsumer, .Supplier

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum
private class
private class
private class
private class

Field Summary

Modifier and TypeField and Description
private final RawChannel
private final ReentrantLock
private final AtomicLong
private ByteBuffer
private static final Logger
private final MessageDecoder
private final Demand
private final ByteBuffer
private final ByteBuffer[]
private final MessageEncoder
private boolean
private final MessageStreamConsumer
private boolean
private final MessageQueue
private final Frame.Reader
private final RawChannel.RawEvent
private volatile TransportImpl.ChannelState
private final SequentialScheduler
private final SequentialScheduler
private final RawChannel.RawEvent
private final AtomicReference<TransportImpl.ChannelState>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
private ByteBuffer
public void
public <T> CompletableFuture<T>
sendBinary(ByteBuffer message, boolean isLast, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendBinary.

public <T> CompletableFuture<T>
sendClose(int statusCode, String reason, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendClose.

public <T> CompletableFuture<T>
sendPing(ByteBuffer message, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendPing.

public <T> CompletableFuture<T>
sendPong(ByteBuffer message, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendPong.

public <T> CompletableFuture<T>
sendPong(Supplier<? extends ByteBuffer> message, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendPong.

public <T> CompletableFuture<T>
sendText(CharSequence message, boolean isLast, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendText.

private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

channelback to summary
private final RawChannel channel
closeLockback to summary
private final ReentrantLock closeLock
counterback to summary
private final AtomicLong counter
databack to summary
private ByteBuffer data
debugback to summary
private static final Logger debug
decoderback to summary
private final MessageDecoder decoder
demandback to summary
private final Demand demand
dstback to summary
private final ByteBuffer dst
dstArrayback to summary
private final ByteBuffer[] dstArray
encoderback to summary
private final MessageEncoder encoder
inputClosedback to summary
private boolean inputClosed
messageConsumerback to summary
private final MessageStreamConsumer messageConsumer
outputClosedback to summary
private boolean outputClosed
queueback to summary
private final MessageQueue queue
readerback to summary
private final Frame.Reader reader
readEventback to summary
private final RawChannel.RawEvent readEvent
readStateback to summary
private volatile TransportImpl.ChannelState readState
receiveSchedulerback to summary
private final SequentialScheduler receiveScheduler
sendSchedulerback to summary
private final SequentialScheduler sendScheduler
writeEventback to summary
private final RawChannel.RawEvent writeEvent
writeStateback to summary
private final AtomicReference<TransportImpl.ChannelState> writeState

Constructor Detail

TransportImplback to summary
public TransportImpl(MessageQueue queue, MessageStreamConsumer consumer, RawChannel channel)

Method Detail

acknowledgeReceptionback to summary
public void acknowledgeReception()

Implements jdk.internal.net.http.websocket.Transport.acknowledgeReception.

Annotations
@Override
closeInputback to summary
public void closeInput() throws IOException

Implements jdk.internal.net.http.websocket.Transport.closeInput.

Annotations
@Override
closeOutputback to summary
public void closeOutput() throws IOException

Implements jdk.internal.net.http.websocket.Transport.closeOutput.

Annotations
@Override
createWriteBufferback to summary
private ByteBuffer createWriteBuffer()
requestback to summary
public void request(long n)

Implements jdk.internal.net.http.websocket.Transport.request.

Annotations
@Override
sendBinaryback to summary
public <T> CompletableFuture<T> sendBinary(ByteBuffer message, boolean isLast, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendBinary.

Annotations
@Override
sendCloseback to summary
public <T> CompletableFuture<T> sendClose(int statusCode, String reason, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendClose.

Annotations
@Override
sendPingback to summary
public <T> CompletableFuture<T> sendPing(ByteBuffer message, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendPing.

Annotations
@Override
sendPongback to summary
public <T> CompletableFuture<T> sendPong(ByteBuffer message, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendPong.

Annotations
@Override
sendPongback to summary
public <T> CompletableFuture<T> sendPong(Supplier<? extends ByteBuffer> message, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendPong.

Annotations
@Override
sendTextback to summary
public <T> CompletableFuture<T> sendText(CharSequence message, boolean isLast, T attachment, BiConsumer<? super T, ? super Throwable> action)

Implements jdk.internal.net.http.websocket.Transport.sendText.

Annotations
@Override
writeback to summary
private boolean write() throws IOException
jdk.internal.net.http.websocket back to summary

pack-priv final Enum TransportImpl.ChannelState

extends Enum<TransportImpl.ChannelState>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final TransportImpl.ChannelState
public static final TransportImpl.ChannelState
public static final TransportImpl.ChannelState
public static final TransportImpl.ChannelState

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Field Detail

AVAILABLEback to summary
public static final TransportImpl.ChannelState AVAILABLE
CLOSEDback to summary
public static final TransportImpl.ChannelState CLOSED
UNREGISTEREDback to summary
public static final TransportImpl.ChannelState UNREGISTERED
WAITINGback to summary
public static final TransportImpl.ChannelState WAITING

Constructor Detail

ChannelStateback to summary
private ChannelState()

Method Detail

valueOfback to summary
public static TransportImpl.ChannelState valueOf(String name)
valuesback to summary
public static TransportImpl.ChannelState[] values()
jdk.internal.net.http.websocket back to summary

private Class TransportImpl.ReadEvent

extends Object
implements RawEvent
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.websocket.RawChannel.RawEvent

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ReadEventback to summary
private ReadEvent()

Method Detail

handleback to summary
public void handle()

Implements jdk.internal.net.http.websocket.RawChannel.RawEvent.handle.

Annotations
@Override
interestOpsback to summary
public int interestOps()

Implements jdk.internal.net.http.websocket.RawChannel.RawEvent.interestOps.

Annotations
@Override
jdk.internal.net.http.websocket back to summary

private Class TransportImpl.ReceiveTask

extends CompleteRestartableTask
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from jdk.internal.net.http.common.SequentialScheduler.CompleteRestartableTask:
run

Constructor Detail

ReceiveTaskback to summary
private ReceiveTask()

Method Detail

runback to summary
public void run()

Implements abstract jdk.internal.net.http.common.SequentialScheduler.CompleteRestartableTask.run.

Doc from jdk.internal.net.http.common.SequentialScheduler.CompleteRestartableTask.run.

The body of the task.

Annotations
@Override
jdk.internal.net.http.websocket back to summary

private Class TransportImpl.SendTask

extends CompleteRestartableTask
Class Inheritance
Annotations
@SuppressWarnings:rawtypes

Field Summary

Modifier and TypeField and Description
private BiConsumer<T, U>
private Object
private boolean
private final MessageQueue.QueueCallback<Boolean, IOException>
private boolean
private CompletableFuture<T>
private final MessageQueue.QueueCallback<Boolean, RuntimeException>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
public void
private boolean
Inherited from jdk.internal.net.http.common.SequentialScheduler.CompleteRestartableTask:
run

Field Detail

actionback to summary
private BiConsumer<T, U> action
attachmentback to summary
private Object attachment
encodedback to summary
private boolean encoded
encodingCallbackback to summary
private final MessageQueue.QueueCallback<Boolean, IOException> encodingCallback
firstPassback to summary
private boolean firstPass
futureback to summary
private CompletableFuture<T> future
loadCallbackback to summary
private final MessageQueue.QueueCallback<Boolean, RuntimeException> loadCallback

Constructor Detail

SendTaskback to summary
private SendTask()

Method Detail

removeAndCompleteback to summary
private void removeAndComplete(Throwable error)
Annotations
@SuppressWarnings:unchecked
runback to summary
public void run()

Implements abstract jdk.internal.net.http.common.SequentialScheduler.CompleteRestartableTask.run.

Doc from jdk.internal.net.http.common.SequentialScheduler.CompleteRestartableTask.run.

The body of the task.

Annotations
@Override
tryCompleteWriteback to summary
private boolean tryCompleteWrite() throws IOException
jdk.internal.net.http.websocket back to summary

private Class TransportImpl.WriteEvent

extends Object
implements RawEvent
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.websocket.RawChannel.RawEvent

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

WriteEventback to summary
private WriteEvent()

Method Detail

handleback to summary
public void handle()

Implements jdk.internal.net.http.websocket.RawChannel.RawEvent.handle.

Annotations
@Override
interestOpsback to summary
public int interestOps()

Implements jdk.internal.net.http.websocket.RawChannel.RawEvent.interestOps.

Annotations
@Override