Package org.glassfish.tyrus.server
Class TyrusServerConfiguration
- java.lang.Object
-
- org.glassfish.tyrus.server.TyrusServerConfiguration
-
- All Implemented Interfaces:
jakarta.websocket.server.ServerApplicationConfig
public class TyrusServerConfiguration extends java.lang.Object implements jakarta.websocket.server.ServerApplicationConfigContainer for either deployedServerApplicationConfigs, 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)Create newTyrusServerConfiguration.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)Create newTyrusServerConfiguration.
-
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 withServerEndpointannotation 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 theServerEndpointConfigclasses which should be deployed.
-
-
-
Constructor Detail
-
TyrusServerConfiguration
public TyrusServerConfiguration(java.util.Set<java.lang.Class<?>> classes, java.util.Set<jakarta.websocket.server.ServerEndpointConfig> serverEndpointConfigs)Create newTyrusServerConfiguration.- Parameters:
classes- classes to be included in this application instance. Can contain any combination of annotated endpoints (seeServerEndpoint). Cannot benull.serverEndpointConfigs- List of instances ofServerEndpointConfigto be deployed.- Throws:
java.lang.IllegalArgumentException- when any of the arguments isnull.
-
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)Create newTyrusServerConfiguration.- Parameters:
classes- classes to be included in this application instance. Can contain any combination of annotated endpoints (seeServerEndpoint).dynamicallyAddedClasses- dynamically deployed classes. See.ServerContainer#addEndpoint(Class).serverEndpointConfigs- List of instances ofServerEndpointConfigto be deployed.errorCollector- model errors are reported to this instance. Cannot benull.- Throws:
java.lang.IllegalArgumentException- when any of the arguments isnull.
-
-
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 theServerEndpointConfigclasses which should be deployed.- Specified by:
getEndpointConfigsin interfacejakarta.websocket.server.ServerApplicationConfig- Parameters:
scanned- is unused.- Returns:
- all the
ServerEndpointConfigclasses 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 withServerEndpointannotation which should be deployed.- Specified by:
getAnnotatedEndpointClassesin interfacejakarta.websocket.server.ServerApplicationConfig- Parameters:
scanned- is unused.- Returns:
- all the classes annotated with
ServerEndpointannotation which should be deployed.
-
-