|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ContainerProvider
Service-provider interface for creating container instances. If supported by the provider, a container instance of the requested Java type will be created.
The created container is responsible for listening on a communication chanel for new client requests, dispatching these requests to the registeredJersey application using the application's
apply(request, responseWriter) method and sending the responses provided by the
application back to the client.
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 registering a proper
HK2 ContainterProvider contract binding in a custom HK2 module configured
in the Jersey application.
Alternatively, the implementation can identify itself by placing a provider-configuration
file (if not already present), org.glassfish.jersey.server.spi.ContainerProvider
in the resource directory META-INF/services, and adding the fully
qualified service-provider-class of the implementation in the file.
| Method Summary | ||
|---|---|---|
|
createContainer(Class<T> type,
Application application)
Create an container of a given type. |
|
| Method Detail |
|---|
<T> T createContainer(Class<T> type,
Application application)
throws ProcessingException
The container provider SHOULD NOT initiate the web application. The container provider MAY modify the resource configuration.
T - the type of the container.type - the type of the container.application - the Web application the container delegates to for
the handling of HTTP requests.
type.
ProcessingException - if there is an error creating the container.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||