Interface JettyWebSocketServletFactory

All Superinterfaces:
Configurable

public interface JettyWebSocketServletFactory extends Configurable
  • 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.