|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.tyrus.platform.WebSocketEndpointImpl
public class WebSocketEndpointImpl
Handles the registered application class. There is one WebSocketEndpoint for each application class, which handles all the methods (even for various dynamic paths).
| Constructor Summary | |
|---|---|
WebSocketEndpointImpl(ServerContainerImpl containerContext,
String path,
Model model,
Boolean server)
Creates new endpoint - see above. |
|
WebSocketEndpointImpl(ServerContainer containerContext,
String path,
Model model)
Creates new endpoint. |
|
| Method Summary | |
|---|---|
boolean |
checkHandshake(SPIHandshakeRequest hr)
|
protected boolean |
doesPathMatch(String remoteUri,
String dynamicPath)
Checks whether the provided dynamicPath matches with this endpoint, i.e. |
ServerContainer |
getContainerContext()
|
protected RemoteEndpointWrapper |
getPeer(SPIRemoteEndpoint gs)
|
List<String> |
getSupportedProtocols(List<String> subProtocol)
|
void |
handleGeneratedBeanException(RemoteEndpoint peer,
Exception e)
|
void |
onClose(SPIRemoteEndpoint gs)
|
void |
onConnect(SPIRemoteEndpoint gs)
|
void |
onGeneratedBeanClose(RemoteEndpointWrapper peer)
|
void |
onGeneratedBeanConnect(RemoteEndpointWrapper peer)
|
void |
onMessage(SPIRemoteEndpoint gs,
byte[] messageBytes)
|
void |
onMessage(SPIRemoteEndpoint gs,
String messageString)
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebSocketEndpointImpl(ServerContainer containerContext,
String path,
Model model)
containerContext - container context.path - address of this endpoint as annotated by WebSocketEndpoint annotation.model - model of the application class.
public WebSocketEndpointImpl(ServerContainerImpl containerContext,
String path,
Model model,
Boolean server)
containerContext - container context.path - address of this endpoint as annotated by WebSocketEndpoint annotation.model - model of the application class.server - server / client endpoint.| Method Detail |
|---|
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 interface SPIEndpointpublic List<String> getSupportedProtocols(List<String> subProtocol)
getSupportedProtocols in interface SPIEndpointpublic void remove()
remove in interface SPIEndpointpublic void onConnect(SPIRemoteEndpoint gs)
onConnect in interface SPIEndpoint
public void onMessage(SPIRemoteEndpoint gs,
byte[] messageBytes)
onMessage in interface SPIEndpoint
public void onMessage(SPIRemoteEndpoint gs,
String messageString)
onMessage in interface SPIEndpointpublic void onClose(SPIRemoteEndpoint gs)
onClose in interface SPIEndpoint
public void handleGeneratedBeanException(RemoteEndpoint peer,
Exception e)
public void onGeneratedBeanConnect(RemoteEndpointWrapper peer)
public void onGeneratedBeanClose(RemoteEndpointWrapper peer)
protected final RemoteEndpointWrapper getPeer(SPIRemoteEndpoint gs)
public ServerContainer getContainerContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||