write(java.nio.ByteBuffer, org.glassfish.tyrus.spi.CompletionHandler) , close()
and startSsl() method calls and passes them to a downstream filter one at a time. Both
org.glassfish.tyrus.container.jdk.client.SslFilter and org.glassfish.tyrus.container.jdk.client.TransportFilter allow write(java.nio.ByteBuffer,
org.glassfish.tyrus.spi.CompletionHandler) method call only after the previous one has completed. Queueing close() method calls ensures that write(java.nio.ByteBuffer, org.glassfish.tyrus.spi.CompletionHandler)
methods called before close() will be processed. Including startSsl() methods in the queue ensures
that no write(java.nio.ByteBuffer, org.glassfish.tyrus.spi.CompletionHandler) method will be passed to
org.glassfish.tyrus.container.jdk.client.SslFilter while it performs SSL handshake.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface | TaskQueueFilter.
A task to be queued in order to be processed one at a time. |
| pack-priv static class | TaskQueueFilter.
A task that writes data to the downstreamFilter. |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicBoolean | |
| private final Queue |
| Access | Constructor and Description |
|---|---|
| pack-priv | TaskQueueFilter(Filter
a filter that is positioned directly under this filter. downstreamFilter)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | close()
Overrides org. Close the filter, invokes close operation on the next filter in the filter chain. |
| pack-priv void | |
| private void | |
| pack-priv void | startSsl()
Overrides org. Signal to turn on SSL, it is passed on in the filter chain until a filter responsible for SSL is reached. |
| pack-priv void | write(ByteBuffer
on which write operation is performed. data, CompletionHandler<ByteBuffer> will be invoked when the write operation is completed or has failed. completionHandler)Overrides org. Perform write operation for this filter and invokes write method on the next filter in the filter chain. |
| taskLock | back to summary |
|---|---|
| private final AtomicBoolean taskLock | |
| taskQueue | back to summary |
|---|---|
| private final Queue<TaskQueueFilter. | |
| TaskQueueFilter | back to summary |
|---|---|
| pack-priv TaskQueueFilter(Filter downstreamFilter) Constructor.
| |
| close | back to summary |
|---|---|
| pack-priv void close() Overrides org. Doc from org. Close the filter, invokes close operation on the next filter in the filter chain. The filter is expected to clean up any allocated resources and pass the invocation to downstream filter.
| |
| processSslHandshakeCompleted | back to summary |
|---|---|
| pack-priv void processSslHandshakeCompleted() Overrides org. Doc from org. Process
| |
| processTask | back to summary |
|---|---|
| private void processTask() | |
| startSsl | back to summary |
|---|---|
| pack-priv void startSsl() Overrides org. Doc from org. Signal to turn on SSL, it is passed on in the filter chain until a filter responsible for SSL is reached.
| |
| write | back to summary |
|---|---|
| pack-priv void write(ByteBuffer data, CompletionHandler<ByteBuffer> completionHandler) Overrides org. Doc from org. Perform write operation for this filter and invokes write method on the next filter in the filter chain.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void | execute(TaskQueueFilter
write queue filter this task should be executed in. queueFilter)Execute the task. |
| execute | back to summary |
|---|---|
| public void execute(TaskQueueFilter queueFilter) Execute the task.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final CompletionHandler | |
| private final ByteBuffer |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | execute(final TaskQueueFilter
write queue filter this task should be executed in. queueFilter)Implements org. Execute the task. |
| pack-priv CompletionHandler | |
| pack-priv ByteBuffer | |
| public String |
| completionHandler | back to summary |
|---|---|
| private final CompletionHandler<ByteBuffer> completionHandler | |
| data | back to summary |
|---|---|
| private final ByteBuffer data | |
| WriteTask | back to summary |
|---|---|
| pack-priv WriteTask(ByteBuffer data, CompletionHandler<ByteBuffer> completionHandler) | |
| execute | back to summary |
|---|---|
| public void execute(final TaskQueueFilter queueFilter) Implements org. Doc from org. Execute the task.
| |
| getCompletionHandler | back to summary |
|---|---|
| pack-priv CompletionHandler | |
| getData | back to summary |
|---|---|
| pack-priv ByteBuffer getData() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |