com.caucho.server.dispatch
Class ServletConfigImpl

java.lang.Object
  extended by com.caucho.server.dispatch.ServletConfigImpl
All Implemented Interfaces:
AlarmListener, java.util.EventListener, ServletConfig
Direct Known Subclasses:
ServletMapping

public class ServletConfigImpl
extends java.lang.Object
implements ServletConfig, AlarmListener

Configuration for a servlet.


Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
ServletConfigImpl()
          Creates a new servlet configuration object.
 
Method Summary
 void addSecurityRoleRef(SecurityRoleRef ref)
          Adds a security role reference.
 void checkConstructor()
          Checks the class constructor for the public-zero arg.
 void close()
           
 InitParam createInitParam()
          Sets an init-param
 RunAt createRunAt()
          Creates the run-at configuration.
 FilterChain createServletChain()
           
protected  ConfigException error(java.lang.String msg)
           
protected  ConfigException error(java.lang.String msg, java.lang.Throwable e)
           
protected  java.lang.RuntimeException error(java.lang.Throwable e)
           
 java.lang.String getDisplayName()
          Gets the display name
 ContainerProgram getInit()
          Gets the init block
 java.lang.String getInitParameter(java.lang.String name)
          Gets the init params
 java.util.Enumeration getInitParameterNames()
          Gets the init params
 java.util.Map getInitParamMap()
          Gets the init params
 java.lang.String getJspFile()
          Gets the JSP file
 int getLoadOnStartup()
          Gets the load-on-startup value.
 java.util.HashMap<java.lang.String,java.lang.String> getRoleMap()
          Adds a security role reference.
 RunAt getRunAt()
          Returns the run-at configuration.
 java.lang.Object getServlet()
          Returns the servlet.
 java.lang.Class getServletClass()
          Gets the servlet name.
 java.lang.String getServletClassName()
          Gets the servlet name.
 ServletContext getServletContext()
          Returns the servlet context.
 ServletManager getServletManager()
          Returns the servlet manager.
 java.lang.String getServletName()
          Gets the servlet name.
 java.lang.String getServletNameDefault()
          Gets the servlet name default.
 void handleAlarm(Alarm alarm)
          Handles a cron alarm callback.
 void init()
          Initialize the servlet config.
 void setAllowEL(boolean allowEL)
          Sets the allow value.
 void setConfigLocation(java.lang.String location, int line)
          Sets the config location.
 void setDescription(java.lang.String description)
          Sets the description
 void setDisplayName(java.lang.String displayName)
          Sets the display name
 void setIcon(Icon icon)
          Sets the icon
 void setId(java.lang.String id)
          Sets the id attribute
 void setInit(ContainerProgram init)
          Sets the init block
 void setInitException(ServletException exn)
          Sets the init exception
 void setInitParam(InitParam initParam)
          Sets an init-param
 void setInitParam(java.lang.String param, java.lang.String value)
          Sets an init-param
 void setJndiName(java.lang.String jndiName)
           
 void setJspFile(java.lang.String jspFile)
          Sets the JSP file
 void setLoadOnStartup(int loadOnStartup)
          Sets the load-on-startup
 void setProtocol(ServletProtocolConfig protocol)
          Sets the web service protocol.
 void setServletClass(java.lang.String servletClassName)
          Sets the servlet class.
 void setServletContext(ServletContext app)
          Sets the servlet context.
 void setServletManager(ServletManager manager)
          Sets the servlet manager.
 void setServletName(java.lang.String name)
          Sets the servlet name.
 void setServletNameDefault(java.lang.String name)
          Sets the servlet name default when not specified
 void setVar(java.lang.String var)
           
 java.lang.String toString()
          Returns a printable representation of the servlet config object.
protected  void validateClass(boolean requireClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

ServletConfigImpl

public ServletConfigImpl()
Creates a new servlet configuration object.

Method Detail

setConfigLocation

public void setConfigLocation(java.lang.String location,
                              int line)
Sets the config location.


setId

public void setId(java.lang.String id)
Sets the id attribute


setServletName

public void setServletName(java.lang.String name)
Sets the servlet name.


getServletName

public java.lang.String getServletName()
Gets the servlet name.

Specified by:
getServletName in interface ServletConfig

setServletNameDefault

public void setServletNameDefault(java.lang.String name)
Sets the servlet name default when not specified


getServletNameDefault

public java.lang.String getServletNameDefault()
Gets the servlet name default.


getServletClassName

public java.lang.String getServletClassName()
Gets the servlet name.


setServletClass

public void setServletClass(java.lang.String servletClassName)
Sets the servlet class.


getServletClass

public java.lang.Class getServletClass()
Gets the servlet name.


setJspFile

public void setJspFile(java.lang.String jspFile)
Sets the JSP file


getJspFile

public java.lang.String getJspFile()
Gets the JSP file


setAllowEL

public void setAllowEL(boolean allowEL)
Sets the allow value.


setInitParam

public void setInitParam(java.lang.String param,
                         java.lang.String value)
Sets an init-param


createInitParam

public InitParam createInitParam()
Sets an init-param


setInitParam

public void setInitParam(InitParam initParam)
Sets an init-param


getInitParamMap

public java.util.Map getInitParamMap()
Gets the init params


getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Gets the init params

Specified by:
getInitParameter in interface ServletConfig
Parameters:
name - of the parameter
Returns:
the init parameter value

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Gets the init params

Specified by:
getInitParameterNames in interface ServletConfig

getServletContext

public ServletContext getServletContext()
Returns the servlet context.

Specified by:
getServletContext in interface ServletConfig

setServletContext

public void setServletContext(ServletContext app)
Sets the servlet context.


getServletManager

public ServletManager getServletManager()
Returns the servlet manager.


setServletManager

public void setServletManager(ServletManager manager)
Sets the servlet manager.


setInit

public void setInit(ContainerProgram init)
Sets the init block


getInit

public ContainerProgram getInit()
Gets the init block


setLoadOnStartup

public void setLoadOnStartup(int loadOnStartup)
Sets the load-on-startup


getLoadOnStartup

public int getLoadOnStartup()
Gets the load-on-startup value.


createRunAt

public RunAt createRunAt()
Creates the run-at configuration.


setJndiName

public void setJndiName(java.lang.String jndiName)

setVar

public void setVar(java.lang.String var)

getRunAt

public RunAt getRunAt()
Returns the run-at configuration.


addSecurityRoleRef

public void addSecurityRoleRef(SecurityRoleRef ref)
Adds a security role reference.


getRoleMap

public java.util.HashMap<java.lang.String,java.lang.String> getRoleMap()
Adds a security role reference.


setDisplayName

public void setDisplayName(java.lang.String displayName)
Sets the display name


getDisplayName

public java.lang.String getDisplayName()
Gets the display name


setDescription

public void setDescription(java.lang.String description)
Sets the description


setIcon

public void setIcon(Icon icon)
Sets the icon


setProtocol

public void setProtocol(ServletProtocolConfig protocol)
Sets the web service protocol.


setInitException

public void setInitException(ServletException exn)
Sets the init exception


getServlet

public java.lang.Object getServlet()
Returns the servlet.


init

public void init()
          throws ServletException
Initialize the servlet config.

Throws:
ServletException

validateClass

protected void validateClass(boolean requireClass)
                      throws ServletException
Throws:
ServletException

checkConstructor

public void checkConstructor()
                      throws ServletException
Checks the class constructor for the public-zero arg.

Throws:
ServletException

handleAlarm

public void handleAlarm(Alarm alarm)
Handles a cron alarm callback.

Specified by:
handleAlarm in interface AlarmListener

createServletChain

public FilterChain createServletChain()
                               throws ServletException
Throws:
ServletException

close

public void close()

error

protected ConfigException error(java.lang.String msg)

error

protected ConfigException error(java.lang.String msg,
                                java.lang.Throwable e)

error

protected java.lang.RuntimeException error(java.lang.Throwable e)

toString

public java.lang.String toString()
Returns a printable representation of the servlet config object.

Overrides:
toString in class java.lang.Object