Interface MappedWebSocketCreator

All Known Implementing Classes:
NativeWebSocketConfiguration, WebSocketUpgradeFilter, WebSocketUpgradeHandlerWrapper

public interface MappedWebSocketCreator
Common interface for MappedWebSocketCreator
  • Method Details

    • addMapping

      void addMapping(String spec, WebSocketCreator creator)
      Add a mapping, of a pathspec to a WebSocketCreator.

      Recognized Path Spec syntaxes

      /path/to or / or *.ext or servlet|{spec}
      Servlet Syntax
      ^{spec} or regex|{spec}
      Regex Syntax
      uri-template|{spec}
      URI Template (see JSR356 and RFC6570 level 1)
      Parameters:
      spec - the path spec to use.
      creator - the websocket creator for this specific mapping
    • addMapping

      @Deprecated void addMapping(PathSpec spec, WebSocketCreator creator)
      Deprecated.
      use addMapping(org.eclipse.jetty.http.pathmap.PathSpec, WebSocketCreator) instead. (support classes moved to generic jetty-http project)
      Add a mapping.
      Parameters:
      spec - the path spec to use
      creator - the creator for the mapping
    • addMapping

      void addMapping(org.eclipse.jetty.http.pathmap.PathSpec spec, WebSocketCreator creator)
      Add a mapping.
      Parameters:
      spec - the path spec to use
      creator - the creator for the mapping
      Since:
      9.2.20
    • getMapping

      WebSocketCreator getMapping(String spec)
      /** Returns the creator for the given path spec.
      Parameters:
      spec - the spec to test for (using the same spec syntax as seen in addMapping(String, WebSocketCreator))
      Returns:
      the websocket creator if path spec exists, or null
    • removeMapping

      boolean removeMapping(String spec)
      Removes the mapping based on the given path spec.
      Parameters:
      spec - the path spec to remove (using the same spec syntax as seen in addMapping(String, WebSocketCreator))
      Returns:
      true if underlying mapping were altered, false otherwise