Package org.glassfish.tyrus.server
Class TyrusServerConfiguration
java.lang.Object
org.glassfish.tyrus.server.TyrusServerConfiguration
- All Implemented Interfaces:
ServerApplicationConfig
Container for either deployed
ServerApplicationConfigs, if any, or deployed classes.- Author:
- Stepan Kopriva
-
Constructor Summary
ConstructorsConstructorDescriptionTyrusServerConfiguration(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 withServerEndpointannotation which should be deployed.getEndpointConfigs(Set<Class<? extends Endpoint>> scanned) Gets all theServerEndpointConfigclasses 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 ofServerEndpointConfigto 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 ofServerEndpointConfigto 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 theServerEndpointConfigclasses which should be deployed.- Specified by:
getEndpointConfigsin interfaceServerApplicationConfig- Parameters:
scanned- is unused.- Returns:
- all the
ServerEndpointConfigclasses which should be deployed.
-
getAnnotatedEndpointClasses
Gets all the classes annotated withServerEndpointannotation which should be deployed.- Specified by:
getAnnotatedEndpointClassesin interfaceServerApplicationConfig- Parameters:
scanned- is unused.- Returns:
- all the classes annotated with
ServerEndpointannotation which should be deployed.
-