HttpUpgradeHandler and ReadListener implementation.
Reads data from ServletInputStream and passes it further to the Tyrus runtime.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private ByteBuffer | |
| private volatile boolean | |
| private Connection | |
| private final CountDownLatch | |
| public static final String | FRAME_BUFFER_SIZE
The size to precede OutOfMemory Exception and potentially DDoS attacks when buffering incoming WebSocket frames. |
| private int | |
| private ServletInputStream | |
| private static final Logger | |
| private ServletOutputStream | |
| private WebSocketEngine. | |
| private WebConnection | |
| private Writer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | destroy()
Implements jakarta. It is called when the client is disconnected. |
| private int | Returns: legth of actually read data.length of data available to read. length)Fill the buf with some more websocket protocol data. |
| pack-priv WebConnection | |
| private void | |
| public void | init(WebConnection
the WebConnection object associated to this upgrade request wc)Implements jakarta. It is called once the HTTP Upgrade process has been completed and the upgraded connection is ready to start using the new protocol. |
| public void | onAllDataRead()
Implements jakarta. Invoked when all data for the current request has been read. |
| public void | onDataAvailable()
Implements jakarta. When an instance of the |
| public void | onError(Throwable
the throwable to indicate why the read operation failed t)Implements jakarta. Invoked when an error occurs processing the request. |
| public void | preInit(WebSocketEngine.
The WebSocket UpgradeInfo. upgradeInfo,The Tyrus SPI Writer. writer, boolean Whether the authentication has been used. authenticated)Sets the required information before |
| public void | |
| public void | setIncomingBufferSize(int
The new incoming frame buffer size value. incomingBufferSize)Override the default |
| public String |
| authenticated | back to summary |
|---|---|
| private boolean authenticated | |
| buf | back to summary |
|---|---|
| private ByteBuffer buf | |
| closed | back to summary |
|---|---|
| private volatile boolean closed | |
| connection | back to summary |
|---|---|
| private Connection connection | |
| connectionLatch | back to summary |
|---|---|
| private final CountDownLatch connectionLatch | |
| FRAME_BUFFER_SIZE | back to summary |
|---|---|
| public static final String FRAME_BUFFER_SIZE The size to precede OutOfMemory Exception and potentially DDoS attacks when buffering incoming WebSocket frames. The default value is 4194315 bytes, which correspond to 4M plus few bytes to frame headers. | |
| incomingBufferSize | back to summary |
|---|---|
| private int incomingBufferSize | |
| is | back to summary |
|---|---|
| private ServletInputStream is | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| os | back to summary |
|---|---|
| private ServletOutputStream os | |
| upgradeInfo | back to summary |
|---|---|
| private WebSocketEngine. | |
| wc | back to summary |
|---|---|
| private WebConnection wc | |
| writer | back to summary |
|---|---|
| private Writer writer | |
| TyrusHttpUpgradeHandler | back to summary |
|---|---|
| public TyrusHttpUpgradeHandler() | |
| close | back to summary |
|---|---|
| private void close(int closeCode, String closeReason) | |
| destroy | back to summary |
|---|---|
| public void destroy() Implements jakarta. Doc from jakarta. It is called when the client is disconnected.
| |
| fillBuf | back to summary |
|---|---|
| private int fillBuf(int length) throws IOException Fill the buf with some more websocket protocol data.
| |
| getWebConnection | back to summary |
|---|---|
| pack-priv WebConnection getWebConnection() | |
| httpSessionForcedClose | back to summary |
|---|---|
| private void httpSessionForcedClose(int closeCode, String closeReason) | |
| init | back to summary |
|---|---|
| public void init(WebConnection wc) Implements jakarta. Doc from jakarta. It is called once the HTTP Upgrade process has been completed and the upgraded connection is ready to start using the new protocol.
| |
| onAllDataRead | back to summary |
|---|---|
| public void onAllDataRead() Implements jakarta. Doc from jakarta. Invoked when all data for the current request has been read.
| |
| onDataAvailable | back to summary |
|---|---|
| public void onDataAvailable() Implements jakarta. Doc from jakarta. When an instance of the
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable t) Implements jakarta. Doc from jakarta. Invoked when an error occurs processing the request. | |
| preInit | back to summary |
|---|---|
| public void preInit(WebSocketEngine. Sets the required information before
| |
| sessionDestroyed | back to summary |
|---|---|
| public void sessionDestroyed() Called when related Implementation is required to call onClose() on server-side with corresponding close code (1008, see WebSocket spec 7.2) - only when there is an authorized user for this session. | |
| setIncomingBufferSize | back to summary |
|---|---|
| public void setIncomingBufferSize(int incomingBufferSize) Override the default
| |
| 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- | |