## com.sun.jersey.spi.container
Interface ContainerProvider<T>

Type Parameters:
  `T` - the type of the container.

    public interface ContainerProvider<T>

Service-provider interface for creating container instances.

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.

Author:
  Paul.Sandoz@Sun.Com

Method Summary
`T` | `createContainer(java.lang.Class<T> type, ResourceConfig resourceConfig, WebApplication application)` Create an container of type T.

Method Detail

### createContainer

    T createContainer(java.lang.Class<T> type,
                      ResourceConfig resourceConfig,
                      WebApplication application)
                      throws ContainerException

  Create an container of type T.

  The container provider SHOULD NOT initiate the Web application. The container provider MAY modify the resource configuraton.

  Parameters:
    `type` - the type of the container.
    `resourceConfig` - the resource configuration.
    `application` - the Web application the container delegates to for the handling of HTTP requests.
  Returns:
    the container, otherwise null if the provider does not support the requested `type`.
  Throws:
    `ContainerException` - if there is an error creating the container.

Copyright © 2017 Oracle Corporation. All Rights Reserved.