Package org.glassfish.tyrus.server
Class TyrusServerConfiguration
- java.lang.Object
-
- org.glassfish.tyrus.server.TyrusServerConfiguration
-
- All Implemented Interfaces:
ServerApplicationConfig
public class TyrusServerConfiguration extends java.lang.Object implements ServerApplicationConfig
Container for either deployedServerApplicationConfig
s, if any, or deployed classes.- Author:
- Stepan Kopriva
-
-
Constructor Summary
Constructors Constructor Description TyrusServerConfiguration(java.util.Set<java.lang.Class<?>> classes, java.util.Set<ServerEndpointConfig> serverEndpointConfigs)
Create newTyrusServerConfiguration
.TyrusServerConfiguration(java.util.Set<java.lang.Class<?>> classes, java.util.Set<java.lang.Class<?>> dynamicallyAddedClasses, java.util.Set<ServerEndpointConfig> serverEndpointConfigs, 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 withServerEndpoint
annotation which should be deployed.java.util.Set<ServerEndpointConfig>
getEndpointConfigs(java.util.Set<java.lang.Class<? extends Endpoint>> scanned)
Gets all theServerEndpointConfig
classes which should be deployed.
-
-
-
Constructor Detail
-
TyrusServerConfiguration
public TyrusServerConfiguration(java.util.Set<java.lang.Class<?>> classes, java.util.Set<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 ofServerEndpointConfig
to 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<ServerEndpointConfig> serverEndpointConfigs, 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 ofServerEndpointConfig
to 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<ServerEndpointConfig> getEndpointConfigs(java.util.Set<java.lang.Class<? extends Endpoint>> scanned)
Gets all theServerEndpointConfig
classes which should be deployed.- Specified by:
getEndpointConfigs
in interfaceServerApplicationConfig
- 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 withServerEndpoint
annotation which should be deployed.- Specified by:
getAnnotatedEndpointClasses
in interfaceServerApplicationConfig
- Parameters:
scanned
- is unused.- Returns:
- all the classes annotated with
ServerEndpoint
annotation which should be deployed.
-
-