Interface JettyWebSocketServletFactory

All Superinterfaces:
org.eclipse.jetty.websocket.api.Configurable

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

    Modifier and Type
    Method
    Description
    void
    Add a WebSocket mapping to a provided JettyWebSocketCreator.
    Get the names of all available WebSocket Extensions.
    getMapping(String pathSpec)
    Returns the creator for the given path spec.
    void
    register(Class<?> endpointClass)
    Add a WebSocket mapping at PathSpec "/" for a creator which creates the endpointClass
    boolean
    Removes the mapping based on the given path spec.
    void
    Add a WebSocket mapping at PathSpec "/" for a creator

    Methods inherited from interface org.eclipse.jetty.websocket.api.Configurable

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

    • addMapping

      void addMapping(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(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(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(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

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