public class WebSocketTransport extends HttpTransport implements org.eclipse.jetty.websocket.WebSocketFactory.Acceptor
| Modifier and Type | Class and Description |
|---|---|
protected class |
WebSocketTransport.WebSocketContext |
protected class |
WebSocketTransport.WebSocketScheduler |
AbstractServerTransport.OneTimeScheduler, AbstractServerTransport.Scheduler| Modifier and Type | Field and Description |
|---|---|
static String |
BUFFER_SIZE_OPTION |
static String |
IDLE_TIMEOUT_OPTION |
static String |
MAX_MESSAGE_SIZE_OPTION |
static String |
MESSAGES_PER_FRAME_OPTION |
static String |
NAME |
static String |
PREFIX |
static String |
PROTOCOL_OPTION |
static String |
THREAD_POOL_MAX_SIZE |
JSON_DEBUG_OPTION, MESSAGE_PARAM_logger, INTERVAL_OPTION, MAX_INTERVAL_OPTION, MAX_LAZY_TIMEOUT_OPTION, MAX_QUEUE_OPTION, META_CONNECT_DELIVERY_OPTION, RANDOMIZE_LAZY_TIMEOUT_OPTION, TIMEOUT_OPTION| Constructor and Description |
|---|
WebSocketTransport(BayeuxServerImpl bayeux) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(javax.servlet.http.HttpServletRequest request) |
boolean |
checkOrigin(javax.servlet.http.HttpServletRequest request,
String origin) |
protected void |
destroy() |
org.eclipse.jetty.websocket.WebSocket |
doWebSocketConnect(javax.servlet.http.HttpServletRequest request,
String protocol) |
org.cometd.bayeux.server.BayeuxContext |
getContext() |
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleException(org.eclipse.jetty.websocket.WebSocket.Connection connection,
Throwable exception) |
protected void |
handleJSONParseException(org.eclipse.jetty.websocket.WebSocket.Connection connection,
String json,
Throwable exception) |
void |
init() |
protected Executor |
newExecutor() |
protected ScheduledExecutorService |
newScheduledExecutor() |
protected void |
onClose(int code,
String message) |
protected void |
send(org.eclipse.jetty.websocket.WebSocket.Connection connection,
List<org.cometd.bayeux.server.ServerMessage> messages) |
protected void |
send(org.eclipse.jetty.websocket.WebSocket.Connection connection,
org.cometd.bayeux.server.ServerMessage message) |
protected void |
send(org.eclipse.jetty.websocket.WebSocket.Connection connection,
String data) |
getCurrentRequest, setCurrentRequestdebug, getAdvice, getBayeux, getInterval, getMaxInterval, getMaxLazyTimeout, getTimeout, isMetaConnectDeliveryOnly, parseMessages, parseMessages, setAdvice, setInterval, setMaxInterval, setMaxLazyTimeout, setMetaConnectDeliveryOnly, setTimeout, sweepgetName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefixpublic static final String PREFIX
public static final String NAME
public static final String PROTOCOL_OPTION
public static final String MESSAGES_PER_FRAME_OPTION
public static final String BUFFER_SIZE_OPTION
public static final String MAX_MESSAGE_SIZE_OPTION
public static final String IDLE_TIMEOUT_OPTION
public static final String THREAD_POOL_MAX_SIZE
public WebSocketTransport(BayeuxServerImpl bayeux)
public void init()
init in class AbstractServerTransportprotected void destroy()
destroy in class AbstractServerTransportprotected Executor newExecutor()
protected ScheduledExecutorService newScheduledExecutor()
public boolean accept(javax.servlet.http.HttpServletRequest request)
accept in class HttpTransportpublic void handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
handle in class HttpTransportIOExceptionjavax.servlet.ServletExceptionpublic org.eclipse.jetty.websocket.WebSocket doWebSocketConnect(javax.servlet.http.HttpServletRequest request,
String protocol)
doWebSocketConnect in interface org.eclipse.jetty.websocket.WebSocketFactory.Acceptorpublic boolean checkOrigin(javax.servlet.http.HttpServletRequest request,
String origin)
checkOrigin in interface org.eclipse.jetty.websocket.WebSocketFactory.Acceptorprotected void handleJSONParseException(org.eclipse.jetty.websocket.WebSocket.Connection connection,
String json,
Throwable exception)
protected void handleException(org.eclipse.jetty.websocket.WebSocket.Connection connection,
Throwable exception)
public org.cometd.bayeux.server.BayeuxContext getContext()
getContext in interface org.cometd.bayeux.server.ServerTransportgetContext in class HttpTransportprotected void send(org.eclipse.jetty.websocket.WebSocket.Connection connection,
List<org.cometd.bayeux.server.ServerMessage> messages)
throws IOException
IOExceptionprotected void send(org.eclipse.jetty.websocket.WebSocket.Connection connection,
org.cometd.bayeux.server.ServerMessage message)
throws IOException
IOExceptionprotected void send(org.eclipse.jetty.websocket.WebSocket.Connection connection,
String data)
throws IOException
IOExceptionprotected void onClose(int code,
String message)
Copyright © 2008–2014 Dojo Foundation. All rights reserved.