public class EndpointWrapper extends SPIEndpoint
EndpointWrapper for each application class, which handles all the methods.| Constructor and Description |
|---|
EndpointWrapper(String path,
Model model,
EndpointConfiguration configuration)
Creates new endpoint wrapper.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkHandshake(SPIHandshakeRequest hr) |
protected boolean |
doesPathMatch(String remoteUri,
String dynamicPath)
Checks whether the provided dynamicPath matches with this endpoint, i.e.
|
protected RemoteEndpointWrapper |
getPeer(RemoteEndpoint gs) |
List<String> |
getSupportedProtocols(List<String> subProtocol) |
void |
handleGeneratedBeanException(RemoteEndpoint peer,
Exception e) |
void |
onClose(RemoteEndpoint gs) |
void |
onConnect(RemoteEndpoint gs) |
void |
onGeneratedBeanClose(RemoteEndpointWrapper peer) |
void |
onGeneratedBeanConnect(RemoteEndpointWrapper peer) |
void |
onMessage(RemoteEndpoint gs,
ByteBuffer messageBytes) |
void |
onMessage(RemoteEndpoint gs,
String messageString) |
void |
remove() |
onOpenpublic EndpointWrapper(String path, Model model, EndpointConfiguration configuration)
path - address of this endpoint as annotated by WebSocketEndpoint annotation.model - model of the application class.protected boolean doesPathMatch(String remoteUri, String dynamicPath)
remoteUri - path to be checked.dynamicPath - taken from the WebSocketMessage method annotation.true if the paths match, false otherwise.public boolean checkHandshake(SPIHandshakeRequest hr)
checkHandshake in class SPIEndpointpublic List<String> getSupportedProtocols(List<String> subProtocol)
getSupportedProtocols in class SPIEndpointpublic void remove()
remove in class SPIEndpointpublic void onConnect(RemoteEndpoint gs)
onConnect in class SPIEndpointpublic void onMessage(RemoteEndpoint gs, ByteBuffer messageBytes)
onMessage in class SPIEndpointpublic void onMessage(RemoteEndpoint gs, String messageString)
onMessage in class SPIEndpointpublic void onClose(RemoteEndpoint gs)
onClose in class SPIEndpointpublic void handleGeneratedBeanException(RemoteEndpoint peer, Exception e)
public void onGeneratedBeanConnect(RemoteEndpointWrapper peer)
public void onGeneratedBeanClose(RemoteEndpointWrapper peer)
protected final RemoteEndpointWrapper getPeer(RemoteEndpoint gs)
Copyright © 2012. All Rights Reserved.