Package org.glassfish.tyrus.spi
Interface WebSocketEngine
-
- All Known Implementing Classes:
TyrusWebSocketEngine
public interface WebSocketEngine
WebSocket engine is used for upgrading HTTP requests into websocket connections. A transport gets hold of the engine from theServerContainer
and upgrades HTTP handshake requests.- Author:
- Pavel Bucek
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
WebSocketEngine.UpgradeInfo
Upgrade info that includes status for HTTP request upgrading and connection creation details.static class
WebSocketEngine.UpgradeStatus
Upgrade Status for HTTP request upgrading.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
register(ServerEndpointConfig serverConfig, java.lang.String contextPath)
RegisterServerEndpointConfig
.void
register(java.lang.Class<?> endpointClass, java.lang.String contextPath)
Register endpoint class.WebSocketEngine.UpgradeInfo
upgrade(UpgradeRequest request, UpgradeResponse response)
A transport calls this method to upgrade a HTTP request.
-
-
-
Method Detail
-
upgrade
WebSocketEngine.UpgradeInfo upgrade(UpgradeRequest request, UpgradeResponse response)
A transport calls this method to upgrade a HTTP request.- Parameters:
request
- request to be upgraded.response
- response to the upgrade request.- Returns:
- info about upgrade status and connection details.
-
register
void register(java.lang.Class<?> endpointClass, java.lang.String contextPath) throws DeploymentException
Register endpoint class.- Parameters:
endpointClass
- endpoint class to be registered.contextPath
- context path of the registered endpoint.- Throws:
DeploymentException
- when the endpoint is invalid.
-
register
void register(ServerEndpointConfig serverConfig, java.lang.String contextPath) throws DeploymentException
RegisterServerEndpointConfig
.- Parameters:
serverConfig
- server endpoint to be registered.contextPath
- context path of the registered endpoint.- Throws:
DeploymentException
- when the endpoint is invalid.
-
-