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 the
ServerContainer
and upgrades HTTP handshake requests.- Author:
- Pavel Bucek
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Upgrade info that includes status for HTTP request upgrading and connection creation details.static enum
Upgrade Status for HTTP request upgrading. -
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(ServerEndpointConfig serverConfig, String contextPath) RegisterServerEndpointConfig
.void
Register endpoint class.upgrade
(UpgradeRequest request, UpgradeResponse response) A transport calls this method to upgrade a HTTP request.
-
Method Details
-
upgrade
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
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
RegisterServerEndpointConfig
.- Parameters:
serverConfig
- server endpoint to be registered.contextPath
- context path of the registered endpoint.- Throws:
DeploymentException
- when the endpoint is invalid.
-