public abstract class VibeWebSocketApplication
extends org.glassfish.grizzly.websockets.WebSocketApplication
WebSocket into
GrizzlyServerWebSocket.
NetworkListener listener = httpServer.getListener("grizzly");
listener.registerAddOn(new WebSocketAddOn());
WebSocketEngine.getEngine().register("", "/vibe", new VibeWebSocketApplication() {
@Override
protected Action<ServerWebSocket> wsAction() {
return server.wsAction();
}
});
| Constructor and Description |
|---|
VibeWebSocketApplication() |
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(org.glassfish.grizzly.websockets.WebSocket socket,
org.glassfish.grizzly.websockets.DataFrame frame) |
void |
onConnect(org.glassfish.grizzly.websockets.WebSocket socket) |
protected boolean |
onError(org.glassfish.grizzly.websockets.WebSocket webSocket,
Throwable t) |
protected abstract Action<ServerWebSocket> |
wsAction()
An
Action to consume ServerWebSocket. |
add, createSocket, createSocket, getSupportedExtensions, getSupportedProtocols, getWebSockets, handshake, isApplicationRequest, onExtensionNegotiation, remove, upgradepublic void onConnect(org.glassfish.grizzly.websockets.WebSocket socket)
onConnect in interface org.glassfish.grizzly.websockets.WebSocketListeneronConnect in class org.glassfish.grizzly.websockets.WebSocketApplicationprotected abstract Action<ServerWebSocket> wsAction()
Action to consume ServerWebSocket.public void onClose(org.glassfish.grizzly.websockets.WebSocket socket,
org.glassfish.grizzly.websockets.DataFrame frame)
onClose in interface org.glassfish.grizzly.websockets.WebSocketListeneronClose in class org.glassfish.grizzly.websockets.WebSocketApplicationprotected boolean onError(org.glassfish.grizzly.websockets.WebSocket webSocket,
Throwable t)
onError in class org.glassfish.grizzly.websockets.WebSocketApplicationCopyright 2014, The Vibe Project