com.sun.jersey.api.container.grizzly
Class GrizzlyServerFactory

java.lang.Object
  extended by com.sun.jersey.api.container.grizzly.GrizzlyServerFactory

public final class GrizzlyServerFactory
extends java.lang.Object

Factory for creating and starting Grizzly SelectorThread instances.

Author:
Paul.Sandoz@Sun.Com

Method Summary
static SelectorThread create(java.lang.String u)
          Create a SelectorThread that registers an Adapter that in turn manages all root resource and provder classes found by searching the classes referenced in the java classath.
static SelectorThread create(java.lang.String u, Adapter adapter)
          Create a SelectorThread that registers an Adapter that in turn manages all root resource and provder classes found by searching the classes referenced in the java classath.
static SelectorThread create(java.net.URI u)
          Create a SelectorThread that registers an Adapter that in turn manages all root resource and provder classes found by searching the classes referenced in the java classath.
static SelectorThread create(java.net.URI u, Adapter adapter)
          Create a SelectorThread that registers an Adapter that in turn manages all root resource and provder classes found by searching the classes referenced in the java classath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static SelectorThread create(java.lang.String u)
                             throws java.io.IOException,
                                    java.lang.IllegalArgumentException
Create a SelectorThread that registers an Adapter that in turn manages all root resource and provder classes found by searching the classes referenced in the java classath.

This implementation defers to the ContainerFactory.createContainer(Class) method for creating an Adapter that manages the root resources.

Parameters:
u - the URI to create the http server. The URI scheme must be equal to "http". The URI user information and host are ignored If the URI port is not present then port 80 will be used. The URI path, query and fragment components are ignored.
Returns:
the select thread, with the endpoint started
Throws:
java.io.IOException - if an error occurs creating the container.
java.lang.IllegalArgumentException - if u is null

create

public static SelectorThread create(java.net.URI u)
                             throws java.io.IOException,
                                    java.lang.IllegalArgumentException
Create a SelectorThread that registers an Adapter that in turn manages all root resource and provder classes found by searching the classes referenced in the java classath.

This implementation defers to the ContainerFactory.createContainer(Class) method for creating an Adapter that manages the root resources.

Parameters:
u - the URI to create the http server. The URI scheme must be equal to "http". The URI user information and host are ignored If the URI port is not present then port 80 will be used. The URI path, query and fragment components are ignored.
Returns:
the select thread, with the endpoint started
Throws:
java.io.IOException - if an error occurs creating the container.
java.lang.IllegalArgumentException - if u is null

create

public static SelectorThread create(java.lang.String u,
                                    Adapter adapter)
                             throws java.io.IOException,
                                    java.lang.IllegalArgumentException
Create a SelectorThread that registers an Adapter that in turn manages all root resource and provder classes found by searching the classes referenced in the java classath.

Parameters:
u - the URI to create the http server. The URI scheme must be equal to "http". The URI user information and host are ignored If the URI port is not present then port 80 will be used. The URI path, query and fragment components are ignored.
adapter - the Adapter
Returns:
the select thread, with the endpoint started
Throws:
java.io.IOException - if an error occurs creating the container.
java.lang.IllegalArgumentException - if u is null

create

public static SelectorThread create(java.net.URI u,
                                    Adapter adapter)
                             throws java.io.IOException,
                                    java.lang.IllegalArgumentException
Create a SelectorThread that registers an Adapter that in turn manages all root resource and provder classes found by searching the classes referenced in the java classath.

Parameters:
u - the URI to create the http server. The URI scheme must be equal to "http". The URI user information and host are ignored If the URI port is not present then port 80 will be used. The URI path, query and fragment components are ignored.
adapter - the Adapter
Returns:
the select thread, with the endpoint started
Throws:
java.io.IOException - if an error occurs creating the container.
java.lang.IllegalArgumentException - if u is null


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.