## com.sun.jersey.api.container.grizzly
Class GrizzlyWebContainerFactory

    java.lang.Object
      com.sun.jersey.api.container.grizzly.GrizzlyWebContainerFactory

    public final class GrizzlyWebContainerFactory

extends java.lang.Object

Factory for creating and starting Grizzly `SelectorThread` instances for deploying a Servlet.

The default deployed server is an instance of `ServletContainer`.

If no initialization parameters are declared (or is null) then root resource and provider classes will be found by searching the classes referenced in the java classpath.

Author:
  Paul.Sandoz@Sun.Com

Method Summary
`static com.sun.grizzly.http.SelectorThread` | `create(java.lang.String u)` Create a `SelectorThread` that registers the `ServletContainer`.
`static com.sun.grizzly.http.SelectorThread` | `create(java.lang.String u, java.lang.Class<? extends javax.servlet.Servlet> c)` Create a `SelectorThread` that registers the declared servlet class.
`static com.sun.grizzly.http.SelectorThread` | `create(java.lang.String u, java.lang.Class<? extends javax.servlet.Servlet> c, java.util.Map<java.lang.String,java.lang.String> initParams)` Create a `SelectorThread` that registers the declared servlet class.
`static com.sun.grizzly.http.SelectorThread` | `create(java.lang.String u, java.util.Map<java.lang.String,java.lang.String> initParams)` Create a `SelectorThread` that registers the `ServletContainer`.
`static com.sun.grizzly.http.SelectorThread` | `create(java.net.URI u)` Create a `SelectorThread` that registers the `ServletContainer`.
`static com.sun.grizzly.http.SelectorThread` | `create(java.net.URI u, java.lang.Class<? extends javax.servlet.Servlet> c)` Create a `SelectorThread` that registers the declared servlet class.
`static com.sun.grizzly.http.SelectorThread` | `create(java.net.URI u, java.lang.Class<? extends javax.servlet.Servlet> c, java.util.Map<java.lang.String,java.lang.String> initParams)` Create a `SelectorThread` that registers the declared servlet class.
`static com.sun.grizzly.http.SelectorThread` | `create(java.net.URI u, java.util.Map<java.lang.String,java.lang.String> initParams)` Create a `SelectorThread` that registers the `ServletContainer`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### create

    public static com.sun.grizzly.http.SelectorThread create(java.lang.String u)
                                                      throws java.io.IOException,
                                                             java.lang.IllegalArgumentException

  Create a `SelectorThread` that registers the `ServletContainer`.

  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 com.sun.grizzly.http.SelectorThread create(java.lang.String u,
                                                             java.util.Map<java.lang.String,java.lang.String> initParams)
                                                      throws java.io.IOException,
                                                             java.lang.IllegalArgumentException

  Create a `SelectorThread` that registers the `ServletContainer`.

  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.
    `initParams` - the servlet initialization parameters.
  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 com.sun.grizzly.http.SelectorThread create(java.net.URI u)
                                                      throws java.io.IOException,
                                                             java.lang.IllegalArgumentException

  Create a `SelectorThread` that registers the `ServletContainer`.

  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 com.sun.grizzly.http.SelectorThread create(java.net.URI u,
                                                             java.util.Map<java.lang.String,java.lang.String> initParams)
                                                      throws java.io.IOException

  Create a `SelectorThread` that registers the `ServletContainer`.

  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.
    `initParams` - the servlet initialization parameters.
  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 com.sun.grizzly.http.SelectorThread create(java.lang.String u,
                                                             java.lang.Class<? extends javax.servlet.Servlet> c)
                                                      throws java.io.IOException

  Create a `SelectorThread` that registers the declared servlet class.

  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.
    `c` - the servlet class
  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 com.sun.grizzly.http.SelectorThread create(java.lang.String u,
                                                             java.lang.Class<? extends javax.servlet.Servlet> c,
                                                             java.util.Map<java.lang.String,java.lang.String> initParams)
                                                      throws java.io.IOException

  Create a `SelectorThread` that registers the declared servlet class.

  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.
    `c` - the servlet class
    `initParams` - the servlet initialization parameters.
  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 com.sun.grizzly.http.SelectorThread create(java.net.URI u,
                                                             java.lang.Class<? extends javax.servlet.Servlet> c)
                                                      throws java.io.IOException

  Create a `SelectorThread` that registers the declared servlet class.

  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.
    `c` - the servlet class
  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 com.sun.grizzly.http.SelectorThread create(java.net.URI u,
                                                             java.lang.Class<? extends javax.servlet.Servlet> c,
                                                             java.util.Map<java.lang.String,java.lang.String> initParams)
                                                      throws java.io.IOException

  Create a `SelectorThread` that registers the declared servlet class.

  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.
    `c` - the servlet class
    `initParams` - the servlet initialization parameters.
  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 © 2017 Oracle Corporation. All Rights Reserved.