T
- the type of the container.public interface ContainerProvider<T>
A container instance will be created according to the the supporting generic type of the container.
A provider shall support a one-to-one mapping between a type that is not of the type Object. A provider may support more than one one-to-one mapping or a mapping of sub-types of a type (that is not of the type Object). A provider shall not conflict with other providers.
An implementation (a service-provider) identifies itself by placing a provider-configuration file (if not already present), "com.sun.jersey.spi.container.ContainerProvider" in the resource directory META-INF/services, and including the fully qualified service-provider-class of the implementation in the file.
Modifier and Type | Method and Description |
---|---|
T |
createContainer(java.lang.Class<T> type,
ResourceConfig resourceConfig,
WebApplication application)
Create an container of type T.
|
T createContainer(java.lang.Class<T> type, ResourceConfig resourceConfig, WebApplication application) throws ContainerException
The container provider SHOULD NOT initiate the Web application. The container provider MAY modify the resource configuraton.
type
- the type of the container.resourceConfig
- the resource configuration.application
- the Web application the container delegates to for
the handling of HTTP requests.type
.ContainerException
- if there is an error creating the container.Copyright © 2016 Oracle Corporation. All Rights Reserved.