org.glassfish.jersey.server
Class ContainerFactory

java.lang.Object
  extended by org.glassfish.jersey.server.ContainerFactory

public final class ContainerFactory
extends Object

Factory for creating specific HTTP-based containers.

Author:
Paul Sandoz, Jakub Podlesak (jakub.podlesak at oracle.com), Marek Potociar (marek.potociar at oracle.com)

Method Summary
static
<T> T
createContainer(Class<T> type, Application application)
          Create a container according to the class requested.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createContainer

public static <T> T createContainer(Class<T> type,
                                    Application application)
Create a container according to the class requested.

The list of service-provider supporting the ContainerProvider service-provider will be iterated over until one returns a non-null container instance.

Type Parameters:
T - container type
Parameters:
type - Type of the container
application - Jersey application.
Returns:
the container.
Throws:
ContainerException - if there is an error creating the container.
IllegalArgumentException - if no container provider supports the type.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.