Package org.glassfish.jersey.server
Class ContainerFactory
java.lang.Object
org.glassfish.jersey.server.ContainerFactory
Factory for creating specific HTTP-based containers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
createContainer
(Class<T> type, javax.ws.rs.core.Application application) Create a container according to the class requested.
-
Constructor Details
-
ContainerFactory
private ContainerFactory()Prevents instantiation.
-
-
Method Details
-
createContainer
Create a container according to the class requested.The list of service-provider supporting the
ContainerProvider
service-provider will be iterated over until one returns a non-null container instance.- Type Parameters:
T
- container type- Parameters:
type
- type of the containerapplication
- JAX-RS / Jersey application.- Returns:
- the container.
- Throws:
ContainerException
- if there was an error creating the container.IllegalArgumentException
- if no container provider supports the type.
-