public final class ContainerFactory
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
ContainerFactory()
Prevents instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
createContainer(java.lang.Class<T> type,
javax.ws.rs.core.Application application)
Create a container according to the class requested.
|
public static <T> T createContainer(java.lang.Class<T> type,
javax.ws.rs.core.Application application)
The list of service-provider supporting the ContainerProvider
service-provider will be iterated over until one returns a non-null
container instance.
T - container typetype - type of the containerapplication - JAX-RS / Jersey application.ContainerException - if there was an error creating the container.java.lang.IllegalArgumentException - if no container provider supports the type.