public class Net4jWebSocket
extends java.lang.Object
implements org.eclipse.jetty.websocket.api.WebSocketListener
| Modifier and Type | Field and Description |
|---|---|
static short |
CONTROL_CHANNEL_ID |
static byte |
OPCODE_DEREGISTRATION |
static byte |
OPCODE_NEGOTIATION |
static byte |
OPCODE_REGISTRATION |
static byte |
OPCODE_REGISTRATION_ACK |
| Constructor and Description |
|---|
Net4jWebSocket()
Called by
Net4jWebSocketServlet. |
Net4jWebSocket(IWSConnector connector)
Called by
WSClientConnector. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
deregisterChannel(short channelID) |
IWSConnector |
getConnector() |
org.eclipse.jetty.websocket.api.Session |
getSession() |
boolean |
isClient() |
void |
onWebSocketBinary(byte[] payload,
int offset,
int len) |
void |
onWebSocketClose(int statusCode,
java.lang.String reason) |
void |
onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session) |
void |
onWebSocketError(java.lang.Throwable cause) |
void |
onWebSocketText(java.lang.String message) |
void |
registerChannel(short channelID,
long timeout,
IProtocol<?> protocol) |
void |
sendBuffer(IBuffer buffer) |
public static final short CONTROL_CHANNEL_ID
public static final byte OPCODE_NEGOTIATION
public static final byte OPCODE_REGISTRATION
public static final byte OPCODE_REGISTRATION_ACK
public static final byte OPCODE_DEREGISTRATION
public Net4jWebSocket()
Net4jWebSocketServlet.public Net4jWebSocket(IWSConnector connector)
WSClientConnector.public IWSConnector getConnector()
public org.eclipse.jetty.websocket.api.Session getSession()
public boolean isClient()
public void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)
onWebSocketConnect in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListenerpublic void close()
public void onWebSocketClose(int statusCode,
java.lang.String reason)
onWebSocketClose in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListenerpublic void registerChannel(short channelID,
long timeout,
IProtocol<?> protocol)
throws java.io.IOException
java.io.IOExceptionpublic void deregisterChannel(short channelID)
throws java.io.IOException
java.io.IOExceptionpublic void sendBuffer(IBuffer buffer)
public void onWebSocketBinary(byte[] payload,
int offset,
int len)
onWebSocketBinary in interface org.eclipse.jetty.websocket.api.WebSocketListenerpublic void onWebSocketText(java.lang.String message)
onWebSocketText in interface org.eclipse.jetty.websocket.api.WebSocketListenerpublic void onWebSocketError(java.lang.Throwable cause)
onWebSocketError in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListenerCopyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html