Class WSSUtil

java.lang.Object
org.eclipse.net4j.ws.WSSUtil

public final class WSSUtil extends Object
Creates and describes secure WebSocket (WSS) connector and acceptor products.

WSS uses the same Net4j framing, provider selection, and connector ownership contracts as WS. The selected provider remains responsible for TLS and WebSocket transport details.

Since:
2.0
Author:
mporhel
  • Field Details

  • Method Details

    • prepareContainer

      @Deprecated public static void prepareContainer(org.eclipse.net4j.util.container.IManagedContainer container)
      Deprecated.
      Initialized containers are prepared automatically.
      Manually prepares a raw container with the WSS acceptor and connector factories. Initialized containers receive these factories automatically through declarative container initialization. Manual preparation remains appropriate for containers created with ContainerUtil.createContainer().
    • getAcceptor

      public static IWSAcceptor getAcceptor(org.eclipse.net4j.util.container.IManagedContainer container, String acceptorName)
      Gets the WSS acceptor product for the given route name. The container may create and activate the product if it does not already exist.
      Parameters:
      container - container that owns the acceptor product
      acceptorName - registered route name
      Returns:
      the acceptor product
      Throws:
      org.eclipse.net4j.util.container.FactoryNotFoundException - if the WSS acceptor factory is not registered
      org.eclipse.net4j.util.factory.ProductCreationException - if the container cannot create or activate the product
    • getConnector

      public static IWSConnector getConnector(org.eclipse.net4j.util.container.IManagedContainer container, String description)
      Creates or retrieves a secure WebSocket connector for a previously encoded description.
      Parameters:
      container - container that owns the connector and provider factories
      description - connector factory description
      Returns:
      the configured connector
    • getConnector

      public static IWSConnector getConnector(org.eclipse.net4j.util.container.IManagedContainer container, URI serviceURI, String acceptorName, String... arguments)
      Creates or retrieves a secure WebSocket connector for a service URI and acceptor route.
      Parameters:
      container - container that owns the connector and provider factories
      serviceURI - base WSS service URI
      acceptorName - target acceptor route
      arguments - optional provider or handshake arguments
      Returns:
      the configured connector
    • getConnectorDescription

      public static String getConnectorDescription(String serviceURI, String acceptorName, String... arguments) throws URISyntaxException
      Encodes a string URI and acceptor route as a WSS connector factory description.
      Parameters:
      serviceURI - base WSS service URI
      acceptorName - target acceptor route
      arguments - provider or handshake arguments
      Returns:
      connector factory description
      Throws:
      URISyntaxException - if serviceURI is not a valid URI
    • getConnectorDescription

      public static String getConnectorDescription(URI serviceURI, String acceptorName, String... arguments)
      Encodes a service URI and acceptor route as a WSS connector factory description.
      Parameters:
      serviceURI - base WSS service URI
      acceptorName - target acceptor route
      arguments - provider or handshake arguments
      Returns:
      connector factory description understood by the WSS connector factory