Class TyrusServerConfiguration

  • All Implemented Interfaces:
    jakarta.websocket.server.ServerApplicationConfig

    public class TyrusServerConfiguration
    extends java.lang.Object
    implements jakarta.websocket.server.ServerApplicationConfig
    Container for either deployed ServerApplicationConfigs, if any, or deployed classes.
    Author:
    Stepan Kopriva
    • Constructor Summary

      Constructors 
      Constructor Description
      TyrusServerConfiguration​(java.util.Set<java.lang.Class<?>> classes, java.util.Set<jakarta.websocket.server.ServerEndpointConfig> serverEndpointConfigs)
      TyrusServerConfiguration​(java.util.Set<java.lang.Class<?>> classes, java.util.Set<java.lang.Class<?>> dynamicallyAddedClasses, java.util.Set<jakarta.websocket.server.ServerEndpointConfig> serverEndpointConfigs, org.glassfish.tyrus.core.ErrorCollector errorCollector)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.Class<?>> getAnnotatedEndpointClasses​(java.util.Set<java.lang.Class<?>> scanned)
      Gets all the classes annotated with ServerEndpoint annotation which should be deployed.
      java.util.Set<jakarta.websocket.server.ServerEndpointConfig> getEndpointConfigs​(java.util.Set<java.lang.Class<? extends jakarta.websocket.Endpoint>> scanned)
      Gets all the ServerEndpointConfig classes which should be deployed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TyrusServerConfiguration

        public TyrusServerConfiguration​(java.util.Set<java.lang.Class<?>> classes,
                                        java.util.Set<jakarta.websocket.server.ServerEndpointConfig> serverEndpointConfigs)
        Parameters:
        classes - classes to be included in this application instance. Can contain any combination of annotated endpoints (see ServerEndpoint). Cannot be null.
        serverEndpointConfigs - List of instances of ServerEndpointConfig to be deployed.
        Throws:
        java.lang.IllegalArgumentException - when any of the arguments is null.
      • TyrusServerConfiguration

        public TyrusServerConfiguration​(java.util.Set<java.lang.Class<?>> classes,
                                        java.util.Set<java.lang.Class<?>> dynamicallyAddedClasses,
                                        java.util.Set<jakarta.websocket.server.ServerEndpointConfig> serverEndpointConfigs,
                                        org.glassfish.tyrus.core.ErrorCollector errorCollector)
        Parameters:
        classes - classes to be included in this application instance. Can contain any combination of annotated endpoints (see ServerEndpoint).
        dynamicallyAddedClasses - dynamically deployed classes. See .ServerContainer#addEndpoint(Class).
        serverEndpointConfigs - List of instances of ServerEndpointConfig to be deployed.
        errorCollector - model errors are reported to this instance. Cannot be null.
        Throws:
        java.lang.IllegalArgumentException - when any of the arguments is null.
    • Method Detail

      • getEndpointConfigs

        public java.util.Set<jakarta.websocket.server.ServerEndpointConfig> getEndpointConfigs​(java.util.Set<java.lang.Class<? extends jakarta.websocket.Endpoint>> scanned)
        Gets all the ServerEndpointConfig classes which should be deployed.
        Specified by:
        getEndpointConfigs in interface jakarta.websocket.server.ServerApplicationConfig
        Parameters:
        scanned - is unused.
        Returns:
        all the ServerEndpointConfig classes which should be deployed.
      • getAnnotatedEndpointClasses

        public java.util.Set<java.lang.Class<?>> getAnnotatedEndpointClasses​(java.util.Set<java.lang.Class<?>> scanned)
        Gets all the classes annotated with ServerEndpoint annotation which should be deployed.
        Specified by:
        getAnnotatedEndpointClasses in interface jakarta.websocket.server.ServerApplicationConfig
        Parameters:
        scanned - is unused.
        Returns:
        all the classes annotated with ServerEndpoint annotation which should be deployed.