public class EndpointWrapper extends SPIEndpoint
EndpointWrapper for each application class, which handles all the methods.| Constructor and Description |
|---|
EndpointWrapper(Class<?> endpointClass,
javax.websocket.EndpointConfig configuration,
ComponentProviderService componentProvider,
BaseContainer container,
String contextPath,
ErrorCollector collector,
javax.websocket.server.ServerEndpointConfig.Configurator configurator)
Create
EndpointWrapper for class that extends Endpoint. |
EndpointWrapper(javax.websocket.Endpoint endpoint,
javax.websocket.EndpointConfig configuration,
ComponentProviderService componentProvider,
BaseContainer container,
String contextPath,
ErrorCollector collector,
javax.websocket.server.ServerEndpointConfig.Configurator configurator)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkHandshake(SPIHandshakeRequest hr) |
javax.websocket.Session |
createSessionForRemoteEndpoint(SPIRemoteEndpoint re,
String subprotocol,
List<javax.websocket.Extension> extensions) |
javax.websocket.EndpointConfig |
getEndpointConfig() |
String |
getEndpointPath() |
List<javax.websocket.Extension> |
getNegotiatedExtensions(List<javax.websocket.Extension> clientExtensions) |
String |
getNegotiatedProtocol(List<String> clientProtocols) |
Set<javax.websocket.Session> |
getOpenSessions() |
javax.websocket.WebSocketContainer |
getWebSocketContainer() |
void |
onClose(SPIRemoteEndpoint gs,
javax.websocket.CloseReason closeReason) |
void |
onConnect(SPIRemoteEndpoint gs,
String subprotocol,
List<javax.websocket.Extension> extensions) |
void |
onMessage(SPIRemoteEndpoint gs,
ByteBuffer messageBytes) |
void |
onMessage(SPIRemoteEndpoint gs,
String messageString) |
void |
onPartialMessage(SPIRemoteEndpoint gs,
ByteBuffer partialBytes,
boolean last) |
void |
onPartialMessage(SPIRemoteEndpoint gs,
String partialString,
boolean last) |
void |
onPing(SPIRemoteEndpoint gs,
ByteBuffer bytes) |
void |
onPong(SPIRemoteEndpoint gs,
ByteBuffer bytes) |
void |
remove() |
String |
toString() |
public EndpointWrapper(Class<?> endpointClass, javax.websocket.EndpointConfig configuration, ComponentProviderService componentProvider, BaseContainer container, String contextPath, ErrorCollector collector, javax.websocket.server.ServerEndpointConfig.Configurator configurator)
EndpointWrapper for class that extends Endpoint.endpointClass - endpoint class for which the wrapper is created.configuration - endpoint configuration.componentProvider - component provider.container - container where the wrapper is running.contextPath - context path.collector - error collector.public EndpointWrapper(javax.websocket.Endpoint endpoint,
javax.websocket.EndpointConfig configuration,
ComponentProviderService componentProvider,
BaseContainer container,
String contextPath,
ErrorCollector collector,
javax.websocket.server.ServerEndpointConfig.Configurator configurator)
endpoint - endpoint instance for which the wrapper is created.configuration - endpoint configuration.componentProvider - component provider.container - container where the wrapper is running.contextPath - context path.collector - error collector.public boolean checkHandshake(SPIHandshakeRequest hr)
checkHandshake in class SPIEndpointpublic String getEndpointPath()
getEndpointPath in class SPIEndpointpublic javax.websocket.WebSocketContainer getWebSocketContainer()
getWebSocketContainer in class SPIEndpointpublic List<javax.websocket.Extension> getNegotiatedExtensions(List<javax.websocket.Extension> clientExtensions)
getNegotiatedExtensions in class SPIEndpointpublic String getNegotiatedProtocol(List<String> clientProtocols)
getNegotiatedProtocol in class SPIEndpointpublic Set<javax.websocket.Session> getOpenSessions()
getOpenSessions in class SPIEndpointpublic javax.websocket.Session createSessionForRemoteEndpoint(SPIRemoteEndpoint re, String subprotocol, List<javax.websocket.Extension> extensions)
createSessionForRemoteEndpoint in class SPIEndpointpublic void remove()
remove in class SPIEndpointpublic void onConnect(SPIRemoteEndpoint gs, String subprotocol, List<javax.websocket.Extension> extensions)
onConnect in class SPIEndpointpublic void onMessage(SPIRemoteEndpoint gs, ByteBuffer messageBytes)
onMessage in class SPIEndpointpublic void onMessage(SPIRemoteEndpoint gs, String messageString)
onMessage in class SPIEndpointpublic void onPartialMessage(SPIRemoteEndpoint gs, String partialString, boolean last)
onPartialMessage in class SPIEndpointpublic void onPartialMessage(SPIRemoteEndpoint gs, ByteBuffer partialBytes, boolean last)
onPartialMessage in class SPIEndpointpublic void onPong(SPIRemoteEndpoint gs, ByteBuffer bytes)
onPong in class SPIEndpointpublic void onPing(SPIRemoteEndpoint gs, ByteBuffer bytes)
onPing in class SPIEndpointpublic void onClose(SPIRemoteEndpoint gs, javax.websocket.CloseReason closeReason)
onClose in class SPIEndpointpublic javax.websocket.EndpointConfig getEndpointConfig()
getEndpointConfig in class SPIEndpointCopyright © 2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.