Package org.glassfish.jersey.server
Class ContainerFactory
- java.lang.Object
-
- org.glassfish.jersey.server.ContainerFactory
-
public final class ContainerFactory extends Object
Factory for creating specific HTTP-based containers.- Author:
- Paul Sandoz, Jakub Podlesak, Marek Potociar
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TcreateContainer(Class<T> type, Application application)Create a container according to the class requested.
-
-
-
Method Detail
-
createContainer
public static <T> T createContainer(Class<T> type, Application application)
Create a container according to the class requested.The list of service-provider supporting the
ContainerProviderservice-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.
-
-