Package org.glassfish.tyrus.server
Class TyrusServerConfiguration
java.lang.Object
org.glassfish.tyrus.server.TyrusServerConfiguration
- All Implemented Interfaces:
ServerApplicationConfig
Container for either deployed
ServerApplicationConfig
s, if any, or deployed classes.- Author:
- Stepan Kopriva
-
Constructor Summary
ConstructorDescriptionTyrusServerConfiguration
(Set<Class<?>> classes, Set<ServerEndpointConfig> serverEndpointConfigs) Create newTyrusServerConfiguration
.TyrusServerConfiguration
(Set<Class<?>> classes, Set<Class<?>> dynamicallyAddedClasses, Set<ServerEndpointConfig> serverEndpointConfigs, ErrorCollector errorCollector) Create newTyrusServerConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotatedEndpointClasses
(Set<Class<?>> scanned) Gets all the classes annotated withServerEndpoint
annotation which should be deployed.getEndpointConfigs
(Set<Class<? extends Endpoint>> scanned) Gets all theServerEndpointConfig
classes which should be deployed.
-
Constructor Details
-
TyrusServerConfiguration
public TyrusServerConfiguration(Set<Class<?>> classes, 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:
IllegalArgumentException
- when any of the arguments isnull
.
-
TyrusServerConfiguration
public TyrusServerConfiguration(Set<Class<?>> classes, Set<Class<?>> dynamicallyAddedClasses, 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:
IllegalArgumentException
- when any of the arguments isnull
.
-
-
Method Details
-
getEndpointConfigs
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
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.
-