Package org.glassfish.tyrus.spi
Interface WebSocketEngine.UpgradeInfo
- Enclosing interface:
WebSocketEngine
public static interface WebSocketEngine.UpgradeInfo
Upgrade info that includes status for HTTP request upgrading and connection creation details.
-
Method Summary
Modifier and TypeMethodDescriptioncreateConnection
(Writer writer, Connection.CloseListener closeListener) Creates a connection if the upgrade is successful.Returns the status of HTTP request upgrade.
-
Method Details
-
getStatus
WebSocketEngine.UpgradeStatus getStatus()Returns the status of HTTP request upgrade.- Returns:
- status of the upgrade.
-
createConnection
Creates a connection if the upgrade is successful. Tyrus would call onConnect lifecycle method on the endpoint during the invocation of this method.- Parameters:
writer
- transport writer that actually writes tyrus websocket data to underlying connection.closeListener
- transport listener for receiving tyrus close notifications.- Returns:
- upgraded connection if the upgrade is successful otherwise null.
-