Package org.cometd.websocket.server
Class JettyWebSocketTransport
java.lang.Object
org.cometd.common.AbstractTransport
org.cometd.server.AbstractServerTransport
org.cometd.websocket.server.common.AbstractWebSocketTransport<org.eclipse.jetty.websocket.api.Session>
org.cometd.websocket.server.JettyWebSocketTransport
- All Implemented Interfaces:
ServerTransport
,Transport
,org.eclipse.jetty.util.component.Dumpable
public class JettyWebSocketTransport extends AbstractWebSocketTransport<org.eclipse.jetty.websocket.api.Session>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cometd.websocket.server.common.AbstractWebSocketTransport
AbstractWebSocketTransport.AbstractWebSocketScheduler
Nested classes/interfaces inherited from class org.cometd.server.AbstractServerTransport
AbstractServerTransport.Scheduler
-
Field Summary
Fields inherited from class org.cometd.websocket.server.common.AbstractWebSocketTransport
BUFFER_SIZE_OPTION, COMETD_URL_MAPPING_OPTION, ENABLE_EXTENSION_PREFIX_OPTION, IDLE_TIMEOUT_OPTION, MESSAGES_PER_FRAME_OPTION, NAME, PREFIX, PROTOCOL_OPTION, 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 Constructor Description JettyWebSocketTransport(BayeuxServerImpl bayeux)
-
Method Summary
Modifier and Type Method Description protected boolean
checkOrigin(org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest request, String origin)
void
init()
Initializes the transport, resolving default and direct options.protected void
modifyUpgrade(org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest request, org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse response)
protected void
send(org.eclipse.jetty.websocket.api.Session wsSession, ServerSession session, String data, org.eclipse.jetty.util.Callback callback)
Methods inherited from class org.cometd.websocket.server.common.AbstractWebSocketTransport
checkProtocol, destroy, getContext, getMessagesPerFrame, getProtocol, getScheduler, handleException, handleJSONParseException, newScheduledExecutor, normalizeURLMapping, onClose
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.cometd.bayeux.Transport
getName, getOption, getOptionNames, getOptionPrefix
-
Constructor Details
-
Method Details
-
init
public void init()Description copied from class:AbstractServerTransport
Initializes the transport, resolving default and direct options.- Overrides:
init
in classAbstractWebSocketTransport<org.eclipse.jetty.websocket.api.Session>
-
modifyUpgrade
protected void modifyUpgrade(org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest request, org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse response) -
checkOrigin
protected boolean checkOrigin(org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest request, String origin) -
send
protected void send(org.eclipse.jetty.websocket.api.Session wsSession, ServerSession session, String data, org.eclipse.jetty.util.Callback callback)- Specified by:
send
in classAbstractWebSocketTransport<org.eclipse.jetty.websocket.api.Session>
-