public class EndpointWrapper
extends org.glassfish.tyrus.spi.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(org.glassfish.tyrus.spi.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() |
public 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(org.glassfish.tyrus.spi.SPIHandshakeRequest hr)
checkHandshake in class org.glassfish.tyrus.spi.SPIEndpointpublic List<String> getSupportedProtocols(List<String> subProtocol)
getSupportedProtocols in class org.glassfish.tyrus.spi.SPIEndpointpublic void remove()
remove in class org.glassfish.tyrus.spi.SPIEndpointpublic void onConnect(RemoteEndpoint gs)
onConnect in class org.glassfish.tyrus.spi.SPIEndpointpublic void onMessage(RemoteEndpoint gs, ByteBuffer messageBytes)
onMessage in class org.glassfish.tyrus.spi.SPIEndpointpublic void onMessage(RemoteEndpoint gs, String messageString)
onMessage in class org.glassfish.tyrus.spi.SPIEndpointpublic void onClose(RemoteEndpoint gs)
onClose in class org.glassfish.tyrus.spi.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.