Interface ClientEngine.ClientUpgradeInfo
- Enclosing interface:
ClientEngine
Provides information about upgrade process. There are three possible states which can be reported:
ClientEngine.ClientUpgradeStatus.ANOTHER_UPGRADE_REQUEST_REQUIRED
ClientEngine.ClientUpgradeStatus.UPGRADE_REQUEST_FAILED
ClientEngine.ClientUpgradeStatus.SUCCESS
When getUpgradeStatus()
returns ClientEngine.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 ClientEngine.ClientUpgradeStatus.UPGRADE_REQUEST_FAILED
, client container
HAS TO close all resources related to currently processed UpgradeResponse
.
When getUpgradeStatus()
returns ClientEngine.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 ClientEngine.createUpgradeRequest(TimeoutHandler)
.
-
Method Summary
Modifier and TypeMethodDescription
-
Method Details
-
getUpgradeStatus
ClientEngine.ClientUpgradeStatus getUpgradeStatus()- Returns:
ClientEngine.ClientUpgradeStatus
.
-
createConnection
Connection createConnection()- Returns:
- new
Connection
instance ornull
, whengetUpgradeStatus()
does not returnClientEngine.ClientUpgradeStatus
.
-