@Contract @ConstrainedTo(value=SERVER) public interface ContainerProvider
The created container is responsible for listening on a communication chanel
for new client requests, dispatching these requests to the registered
Jersey application handler using the handler's
handle(requestContext)} 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, provided the type
Object. A provider may also support mapping of sub-types of a type
(provided the type is not
Object). It is expected that each provider
supports mapping for distinct set of types and subtypes so that different providers
do not conflict with each other.
An implementation can identify itself by placing a Java service provider configuration
file (if not already present) -
- in the resource directory
META-INF/services, and adding the fully
qualified service-provider-class of the implementation in the file.
<T> T createContainer(Class<T> type, jakarta.ws.rs.core.Application application) throws jakarta.ws.rs.ProcessingException
T- the type of the container.
type- the type of the container.
application- JAX-RS / Jersey application.
nullif the provider does not support the requested
jakarta.ws.rs.ProcessingException- if there is an error creating the container.
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.