Interface JettyWebSocketServletFactory

  • All Superinterfaces:
    org.eclipse.jetty.websocket.api.WebSocketPolicy

    public interface JettyWebSocketServletFactory
    extends org.eclipse.jetty.websocket.api.WebSocketPolicy
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void addMapping​(java.lang.String pathSpec, JettyWebSocketCreator creator)
      Add a WebSocket mapping to a provided JettyWebSocketCreator.
      java.util.Set<java.lang.String> getAvailableExtensionNames()
      Get the names of all available WebSocket Extensions.
      default org.eclipse.jetty.websocket.api.WebSocketBehavior getBehavior()  
      JettyWebSocketCreator getMapping​(java.lang.String pathSpec)
      Returns the creator for the given path spec.
      void register​(java.lang.Class<?> endpointClass)
      Add a WebSocket mapping at PathSpec "/" for a creator which creates the endpointClass
      boolean removeMapping​(java.lang.String pathSpec)
      Removes the mapping based on the given path spec.
      void setCreator​(JettyWebSocketCreator creator)
      Add a WebSocket mapping at PathSpec "/" for a creator
      • Methods inherited from interface org.eclipse.jetty.websocket.api.WebSocketPolicy

        getIdleTimeout, getInputBufferSize, getMaxBinaryMessageSize, getMaxFrameSize, getMaxTextMessageSize, getOutputBufferSize, isAutoFragment, setAutoFragment, setIdleTimeout, setInputBufferSize, setMaxBinaryMessageSize, setMaxFrameSize, setMaxTextMessageSize, setOutputBufferSize
    • Method Detail

      • addMapping

        void addMapping​(java.lang.String pathSpec,
                        JettyWebSocketCreator creator)
        Add a WebSocket mapping to a provided JettyWebSocketCreator.

        If mapping is added before this configuration is started, then it is persisted through stop/start of this configuration's lifecycle. Otherwise it will be removed when this configuration is stopped.

        Parameters:
        pathSpec - the pathspec to respond on
        creator - the WebSocketCreator to use
        Since:
        10.0
      • register

        void register​(java.lang.Class<?> endpointClass)
        Add a WebSocket mapping at PathSpec "/" for a creator which creates the endpointClass
        Parameters:
        endpointClass - the WebSocket class to use
      • setCreator

        void setCreator​(JettyWebSocketCreator creator)
        Add a WebSocket mapping at PathSpec "/" for a creator
        Parameters:
        creator - the WebSocketCreator to use
      • getMapping

        JettyWebSocketCreator getMapping​(java.lang.String pathSpec)
        Returns the creator for the given path spec.
        Parameters:
        pathSpec - the pathspec to respond on
        Returns:
        the websocket creator if path spec exists, or null
      • removeMapping

        boolean removeMapping​(java.lang.String pathSpec)
        Removes the mapping based on the given path spec.
        Parameters:
        pathSpec - the pathspec to respond on
        Returns:
        true if underlying mapping were altered, false otherwise
      • getAvailableExtensionNames

        java.util.Set<java.lang.String> getAvailableExtensionNames()
        Get the names of all available WebSocket Extensions.
        Returns:
        a set the available extension names.
      • getBehavior

        default org.eclipse.jetty.websocket.api.WebSocketBehavior getBehavior()
        Specified by:
        getBehavior in interface org.eclipse.jetty.websocket.api.WebSocketPolicy