org.glassfish.tyrus.spi.Writer implementation used in Servlet integration.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private static final Logger | |
| private final Deque | |
| private ServletOutputStream | servletOutputStream
ServletOutputStream is not thread safe, must be synchronized. |
| private final TyrusHttpUpgradeHandler |
| Access | Constructor and Description |
|---|---|
| public | TyrusServletWriter(TyrusHttpUpgradeHandler
encapsulated tyrusHttpUpgradeHandler)TyrusHttpUpgradeHandler instance.Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public synchronized void | onError(Throwable
the throwable to indicate why the write operation failed t)Implements jakarta. Invoked when an error occurs writing data using the non-blocking APIs. |
| public synchronized void | onWritePossible()
Implements jakarta. When an instance of the WriteListener is registered with a |
| public synchronized void | write(final ByteBuffer
bytes to write. buffer, CompletionHandler<ByteBuffer> completion handler to know the write status. completionHandler)Implements abstract org.
A backward compatible method called from |
| isListenerSet | back to summary |
|---|---|
| private boolean isListenerSet | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| queue | back to summary |
|---|---|
| private final Deque<TyrusServletWriter. | |
| servletOutputStream | back to summary |
|---|---|
| private ServletOutputStream servletOutputStream ServletOutputStream is not thread safe, must be synchronized. Access synchronized via "this" - Tyrus creates one instance of TyrusServletWriter per WebSocket connection, so that should be ok. | |
| tyrusHttpUpgradeHandler | back to summary |
|---|---|
| private final TyrusHttpUpgradeHandler tyrusHttpUpgradeHandler | |
| TyrusServletWriter | back to summary |
|---|---|
| public TyrusServletWriter(TyrusHttpUpgradeHandler tyrusHttpUpgradeHandler) Constructor.
| |
| _write | back to summary |
|---|---|
| private void _write(ByteBuffer buffer, CompletionHandler<ByteBuffer> completionHandler) | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| onError | back to summary |
|---|---|
| public synchronized void onError(Throwable t) Implements jakarta. Doc from jakarta. Invoked when an error occurs writing data using the non-blocking APIs. | |
| onWritePossible | back to summary |
|---|---|
| public synchronized void onWritePossible() throws IOException Implements jakarta. Doc from jakarta. When an instance of the WriteListener is registered with a
| |
| write | back to summary |
|---|---|
| public synchronized void write(final ByteBuffer buffer, CompletionHandler<ByteBuffer> completionHandler) Implements abstract org. Doc from org.
A backward compatible method called from The method will be removed in the next major version.
| |
| Modifier and Type | Field and Description |
|---|---|
| public final CompletionHandler | |
| public final ByteBuffer |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| completionHandler | back to summary |
|---|---|
| public final CompletionHandler<ByteBuffer> completionHandler | |
| dataFrame | back to summary |
|---|---|
| public final ByteBuffer dataFrame | |
| QueuedFrame | back to summary |
|---|---|
| pack-priv QueuedFrame(CompletionHandler<ByteBuffer> completionHandler, ByteBuffer dataFrame) | |