com.twitter.common.application.http
Class HttpServletConfig

java.lang.Object
  extended by com.twitter.common.application.http.HttpServletConfig

public class HttpServletConfig
extends Object

An HttpServlet configuration used to mount HTTP handlers via Registration.registerServlet(com.google.inject.Binder, HttpServletConfig). TODO(William Farner): Move this to a more appropriate package after initial AppLauncher check-in.


Field Summary
 Class<? extends javax.servlet.http.HttpServlet> handlerClass
           
 ImmutableMap<String,String> params
           
 String path
           
 boolean silent
           
 
Constructor Summary
HttpServletConfig(String path, Class<? extends javax.servlet.http.HttpServlet> servletClass, boolean silent)
          Creates a new servlet config.
HttpServletConfig(String path, Class<? extends javax.servlet.http.HttpServlet> servletClass, ImmutableMap<String,String> params, boolean silent)
          Registers a new servlet config with servlet initialization parameters.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

path

public final String path

handlerClass

public final Class<? extends javax.servlet.http.HttpServlet> handlerClass

params

public final ImmutableMap<String,String> params

silent

public final boolean silent
Constructor Detail

HttpServletConfig

public HttpServletConfig(String path,
                         Class<? extends javax.servlet.http.HttpServlet> servletClass,
                         boolean silent)
Creates a new servlet config.

Parameters:
path - the absolute path to mount the handler on
servletClass - the type of servlet that will render pages at path
silent - whether or not to display a link for this handler on the landing page

HttpServletConfig

public HttpServletConfig(String path,
                         Class<? extends javax.servlet.http.HttpServlet> servletClass,
                         ImmutableMap<String,String> params,
                         boolean silent)
Registers a new servlet config with servlet initialization parameters.

Parameters:
path - the absolute path to mount the handler on
servletClass - the type of servlet that will render pages at path
params - a map of servlet init parameters to initialize the servlet with
silent - whether or not to display a link for this handler on the landing page