Class 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 org.cometd.server.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

        org.cometd.server.AbstractServerTransport.Scheduler
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractWebSocketTransport​(org.cometd.server.BayeuxServerImpl bayeux)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean checkProtocol​(java.util.List<java.lang.String> serverProtocols, java.util.List<java.lang.String> clientProtocols)  
      void destroy()  
      org.cometd.bayeux.server.BayeuxContext getContext()  
      int getMessagesPerFrame()  
      java.lang.String getProtocol()  
      java.util.concurrent.ScheduledExecutorService getScheduler()  
      protected void handleException​(S wsSession, org.cometd.bayeux.server.ServerSession session, java.lang.Throwable exception)  
      protected void handleJSONParseException​(S wsSession, org.cometd.bayeux.server.ServerSession session, java.lang.String json, java.lang.Throwable exception)  
      void init()  
      protected java.util.concurrent.ScheduledExecutorService newScheduledExecutor()  
      protected java.util.List<java.lang.String> normalizeURLMapping​(java.lang.String urlMapping)  
      protected void onClose​(int code, java.lang.String reason)  
      protected abstract void send​(S wsSession, org.cometd.bayeux.server.ServerSession session, java.lang.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
      • 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
    • Field Detail

      • MESSAGES_PER_FRAME_OPTION

        public static final java.lang.String MESSAGES_PER_FRAME_OPTION
        See Also:
        Constant Field Values
      • BUFFER_SIZE_OPTION

        public static final java.lang.String BUFFER_SIZE_OPTION
        See Also:
        Constant Field Values
      • IDLE_TIMEOUT_OPTION

        public static final java.lang.String IDLE_TIMEOUT_OPTION
        See Also:
        Constant Field Values
      • COMETD_URL_MAPPING_OPTION

        public static final java.lang.String COMETD_URL_MAPPING_OPTION
        See Also:
        Constant Field Values
      • REQUIRE_HANDSHAKE_PER_CONNECTION_OPTION

        public static final java.lang.String REQUIRE_HANDSHAKE_PER_CONNECTION_OPTION
        See Also:
        Constant Field Values
      • ENABLE_EXTENSION_PREFIX_OPTION

        public static final java.lang.String ENABLE_EXTENSION_PREFIX_OPTION
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractWebSocketTransport

        protected AbstractWebSocketTransport​(org.cometd.server.BayeuxServerImpl bayeux)
    • Method Detail

      • init

        public void init()
        Overrides:
        init in class org.cometd.server.AbstractServerTransport
      • destroy

        public void destroy()
        Overrides:
        destroy in class org.cometd.server.AbstractServerTransport
      • newScheduledExecutor

        protected java.util.concurrent.ScheduledExecutorService newScheduledExecutor()
      • getScheduler

        public java.util.concurrent.ScheduledExecutorService getScheduler()
      • getProtocol

        public java.lang.String getProtocol()
      • getMessagesPerFrame

        public int getMessagesPerFrame()
      • checkProtocol

        protected boolean checkProtocol​(java.util.List<java.lang.String> serverProtocols,
                                        java.util.List<java.lang.String> clientProtocols)
      • getContext

        public org.cometd.bayeux.server.BayeuxContext getContext()
      • normalizeURLMapping

        protected java.util.List<java.lang.String> normalizeURLMapping​(java.lang.String urlMapping)
      • handleJSONParseException

        protected void handleJSONParseException​(S wsSession,
                                                org.cometd.bayeux.server.ServerSession session,
                                                java.lang.String json,
                                                java.lang.Throwable exception)
      • handleException

        protected void handleException​(S wsSession,
                                       org.cometd.bayeux.server.ServerSession session,
                                       java.lang.Throwable exception)
      • send

        protected abstract void send​(S wsSession,
                                     org.cometd.bayeux.server.ServerSession session,
                                     java.lang.String data,
                                     org.eclipse.jetty.util.Callback callback)
      • onClose

        protected void onClose​(int code,
                               java.lang.String reason)