public final class ContainerFactory extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
createContainer(Class<T> type,
Application application)
Create a container according to the class requested.
|
public static <T> T createContainer(Class<T> type, 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.IllegalArgumentException
- if no container provider supports the type.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.