Class AbstractWebSocketTransport<S>
java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.server.AbstractServerTransport
org.cometd.websocket.server.common.AbstractWebSocketTransport<S>
- All Implemented Interfaces:
org.cometd.bayeux.server.ServerTransport
,org.cometd.bayeux.Transport
,org.eclipse.jetty.util.component.Dumpable
public abstract class AbstractWebSocketTransport<S> extends AbstractServerTransport
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractWebSocketTransport.AbstractWebSocketScheduler
Nested classes/interfaces inherited from class org.cometd.server.AbstractServerTransport
AbstractServerTransport.Scheduler
-
Field Summary
Fields Modifier and Type Field Description static String
BUFFER_SIZE_OPTION
static String
COMETD_URL_MAPPING_OPTION
static String
ENABLE_EXTENSION_PREFIX_OPTION
static String
IDLE_TIMEOUT_OPTION
static String
MESSAGES_PER_FRAME_OPTION
static String
NAME
static String
PREFIX
static String
PROTOCOL_OPTION
static String
REQUIRE_HANDSHAKE_PER_CONNECTION_OPTION
Fields inherited from class org.cometd.server.AbstractServerTransport
_logger, ALLOW_MESSAGE_DELIVERY_DURING_HANDSHAKE, HANDSHAKE_RECONNECT_OPTION, INTERVAL_OPTION, JSON_CONTEXT_OPTION, MAX_INTERVAL_OPTION, MAX_LAZY_TIMEOUT_OPTION, MAX_MESSAGE_SIZE_OPTION, MAX_PROCESSING_OPTION, MAX_QUEUE_OPTION, META_CONNECT_DELIVERY_OPTION, TIMEOUT_OPTION
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractWebSocketTransport(BayeuxServerImpl bayeux)
-
Method Summary
Modifier and Type Method Description protected boolean
checkProtocol(List<String> serverProtocols, List<String> clientProtocols)
void
destroy()
org.cometd.bayeux.server.BayeuxContext
getContext()
int
getMessagesPerFrame()
String
getProtocol()
ScheduledExecutorService
getScheduler()
protected void
handleException(S wsSession, org.cometd.bayeux.server.ServerSession session, Throwable exception)
protected void
handleJSONParseException(S wsSession, org.cometd.bayeux.server.ServerSession session, String json, Throwable exception)
void
init()
protected ScheduledExecutorService
newScheduledExecutor()
protected List<String>
normalizeURLMapping(String urlMapping)
protected void
onClose(int code, String reason)
protected abstract void
send(S wsSession, org.cometd.bayeux.server.ServerSession session, String data, org.eclipse.jetty.util.Callback callback)
Methods inherited from class org.cometd.server.AbstractServerTransport
allowMessageDeliveryDuringHandshake, dump, dump, getAdvice, getBayeux, getInterval, getMaxInterval, getMaxLazyTimeout, getMaxMessageSize, getTimeout, isAllowMessageDeliveryDuringHandshake, isHandshakeReconnect, isMetaConnectDeliveryOnly, parseMessages, parseMessages, processReply, scheduleExpiration, setAllowMessageDeliveryDuringHandshake, setHandshakeReconnect, setInterval, setMaxInterval, setMaxLazyTimeout, setMaxMessageSize, setMetaConnectDeliveryOnly, setTimeout, sweep, toJSONBytes, toString
Methods inherited from class org.cometd.common.AbstractTransport
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix
-
Field Details
-
NAME
- See Also:
- Constant Field Values
-
PREFIX
- See Also:
- Constant Field Values
-
PROTOCOL_OPTION
- See Also:
- Constant Field Values
-
MESSAGES_PER_FRAME_OPTION
- See Also:
- Constant Field Values
-
BUFFER_SIZE_OPTION
- See Also:
- Constant Field Values
-
IDLE_TIMEOUT_OPTION
- See Also:
- Constant Field Values
-
COMETD_URL_MAPPING_OPTION
- See Also:
- Constant Field Values
-
REQUIRE_HANDSHAKE_PER_CONNECTION_OPTION
- See Also:
- Constant Field Values
-
ENABLE_EXTENSION_PREFIX_OPTION
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
init
public void init()- Overrides:
init
in classAbstractServerTransport
-
destroy
public void destroy()- Overrides:
destroy
in classAbstractServerTransport
-
newScheduledExecutor
-
getScheduler
-
getProtocol
-
getMessagesPerFrame
public int getMessagesPerFrame() -
checkProtocol
-
getContext
public org.cometd.bayeux.server.BayeuxContext getContext() -
normalizeURLMapping
-
handleJSONParseException
-
handleException
-
send
-
onClose
-