| Modifier and Type | Class and Description |
|---|---|
| public static interface | ClientEngine.
Upgrade process result. |
| public static enum | ClientEngine.
Status of upgrade process. |
| public static interface | ClientEngine.
Indicates to container that handshake timeout was reached. |
| Modifier and Type | Method and Description |
|---|---|
| public UpgradeRequest | Returns: request to be send on the wire ornull, when the request cannot be created. When null is
returned, client should free all resources tied to current connection.handshake timeout handler. timeoutHandlerTimeoutHandler#handleTimeout() is invoked if processResponse(UpgradeResponse, Writer, Connection. is not called within
handshake timeout.Create upgrade request and register |
| public void | |
| public ClientEngine. | Returns: info with upgrade status.response to be processed. upgradeResponse, final Writer used for sending dataframes from client endpoint. writer, final Connection.will be called when connection is closed, will be set as listener of returned closeListenerConnection.Process handshake and return |
| createUpgradeRequest | back to summary |
|---|---|
| public UpgradeRequest createUpgradeRequest(ClientEngine. Create upgrade request and register
| |
| processError | back to summary |
|---|---|
| public void processError(Throwable t) Process error.
This method can be called any time when client encounters an error which cannot be handled in the container
before
| |
| processResponse | back to summary |
|---|---|
| public ClientEngine. Process handshake and return
| |
Provides information about upgrade process. There are three possible states which can be reported:
ClientUpgradeStatus#ANOTHER_UPGRADE_REQUEST_REQUIREDClientUpgradeStatus#UPGRADE_REQUEST_FAILEDClientUpgradeStatus#SUCCESS
When getUpgradeStatus() returns ClientUpgradeStatus#SUCCESS, client container can create
Connection and start processing read events from the underlying connection and report them to Tyrus
runtime.
When getUpgradeStatus() returns ClientUpgradeStatus#UPGRADE_REQUEST_FAILED, client container
HAS TO close all resources related to currently processed UpgradeResponse.
When getUpgradeStatus() returns ClientUpgradeStatus#ANOTHER_UPGRADE_REQUEST_REQUIRED, client
container HAS TO close all resources related to currently processed UpgradeResponse, open new TCP
connection and send UpgradeRequest obtained from method createUpgradeRequest(TimeoutHandler).
| Modifier and Type | Method and Description |
|---|---|
| public Connection | Returns: newConnection instance or null, when getUpgradeStatus() does not return
ClientUpgradeStatus.Create new |
| public ClientEngine. |
| createConnection | back to summary |
|---|---|
| public Connection createConnection() Create new
| |
| getUpgradeStatus | back to summary |
|---|---|
| public ClientEngine. Get | |
Returned by processResponse(UpgradeResponse, Writer, Connection..
| Modifier and Type | Field and Description |
|---|---|
| public static final ClientEngine. | ANOTHER_UPGRADE_REQUEST_REQUIRED
Client engine needs to send another request. |
| public static final ClientEngine. | SUCCESS
Upgrade process was successful. |
| public static final ClientEngine. | UPGRADE_REQUEST_FAILED
Upgrade process failed. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ClientEngine. | |
| public static ClientEngine. |
| ANOTHER_UPGRADE_REQUEST_REQUIRED | back to summary |
|---|---|
| public static final ClientEngine. Client engine needs to send another request.
| |
| SUCCESS | back to summary |
|---|---|
| public static final ClientEngine. Upgrade process was successful.
| |
| UPGRADE_REQUEST_FAILED | back to summary |
|---|---|
| public static final ClientEngine. Upgrade process failed. | |
| ClientUpgradeStatus | back to summary |
|---|---|
| private ClientUpgradeStatus() | |
| valueOf | back to summary |
|---|---|
| public static ClientEngine. | |
| values | back to summary |
|---|---|
| public static ClientEngine. | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| handleTimeout | back to summary |
|---|---|
| public void handleTimeout() Invoked when timeout is reached. Container is supposed to clean all resources related to | |