public class TyrusWebSocketEngine extends Object implements WebSocketEngine
WebSocketEngine
implementation, which handles server-side handshake, validation and data processing.TyrusWebSocket
,
TyrusEndpointWrapper
WebSocketEngine.UpgradeInfo, WebSocketEngine.UpgradeStatus
Modifier and Type | Field and Description |
---|---|
static String |
INCOMING_BUFFER_SIZE |
Constructor and Description |
---|
TyrusWebSocketEngine(WebSocketContainer webSocketContainer)
Create
WebSocketEngine instance based on passed WebSocketContainer . |
TyrusWebSocketEngine(WebSocketContainer webSocketContainer,
Integer incomingBufferSize,
ClusterContext clusterContext)
Create
WebSocketEngine instance based on passed WebSocketContainer and with configured maximal
incoming buffer size. |
Modifier and Type | Method and Description |
---|---|
void |
register(Class<?> endpointClass,
String contextPath) |
void |
register(ServerEndpointConfig serverConfig,
String contextPath) |
void |
setIncomingBufferSize(int incomingBufferSize) |
void |
unregister(TyrusEndpointWrapper endpointWrapper)
Un-registers the specified
TyrusEndpointWrapper with the
WebSocketEngine . |
WebSocketEngine.UpgradeInfo |
upgrade(UpgradeRequest request,
UpgradeResponse response)
A transport calls this method to upgrade a HTTP request.
|
public static final String INCOMING_BUFFER_SIZE
public TyrusWebSocketEngine(WebSocketContainer webSocketContainer)
WebSocketEngine
instance based on passed WebSocketContainer
.webSocketContainer
- used WebSocketContainer
instance.public TyrusWebSocketEngine(WebSocketContainer webSocketContainer, Integer incomingBufferSize, ClusterContext clusterContext)
WebSocketEngine
instance based on passed WebSocketContainer
and with configured maximal
incoming buffer size.webSocketContainer
- used WebSocketContainer
instance.incomingBufferSize
- maximal incoming buffer size (this engine won't be able to process messages bigger
than this number. If null, default value will be used).public WebSocketEngine.UpgradeInfo upgrade(UpgradeRequest request, UpgradeResponse response)
WebSocketEngine
upgrade
in interface WebSocketEngine
public void setIncomingBufferSize(int incomingBufferSize)
public void register(Class<?> endpointClass, String contextPath) throws DeploymentException
register
in interface WebSocketEngine
DeploymentException
public void register(ServerEndpointConfig serverConfig, String contextPath) throws DeploymentException
register
in interface WebSocketEngine
DeploymentException
public void unregister(TyrusEndpointWrapper endpointWrapper)
TyrusEndpointWrapper
with the
WebSocketEngine
.endpointWrapper
- the TyrusEndpointWrapper
to un-register.Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.