org.mortbay.jetty.servlet
Class ServletHolder
- Comparable, LifeCycle, Serializable
public class ServletHolder
implements Comparable
Servlet Instance and Context Holder.
Holds the name, params and some state of a javax.servlet.Servlet
instance. It implements the ServletConfig interface.
This class will organise the loading of the servlet when needed or
requested.
$Id: ServletHolder.java,v 1.53 2005/11/03 08:52:48 gregwilkins Exp $
entrySet , get , getClassName , getDisplayName , getHttpContext , getHttpHandler , getInitParameter , getInitParameterNames , getInitParameters , getName , isStarted , newInstance , put , setDisplayName , setInitParameter , start , stop , toString |
ServletHolder
public ServletHolder()
Constructor for Serialization.
ServletHolder
public ServletHolder(ServletHandler handler,
String name,
String className)
Constructor.
handler
- The ServletHandler instance for this servlet.name
- The name of the servlet.className
- The class name of the servlet.
ServletHolder
public ServletHolder(ServletHandler handler,
String name,
String className,
String forcedPath)
Constructor.
handler
- The ServletHandler instance for this servlet.name
- The name of the servlet.className
- The class name of the servlet.forcedPath
- If non null, the request attribute
javax.servlet.include.servlet_path will be set to this path before
service is called.
compareTo
public int compareTo(Object o)
Comparitor by init order.
equals
public boolean equals(Object o)
getInitOrder
public int getInitOrder()
getRunAs
public String getRunAs()
getUserRoleLink
public String getUserRoleLink(String name)
get a user role link.
name
- The name of the role
- The name as translated by the link. If no link exists,
the name is returned.
hashCode
public int hashCode()
setInitOrder
public void setInitOrder(int order)
Set the initialize order.
Holders with order<0, are initialized on use. Those with
order>=0 are initialized in increasing order when the handler
is started.
setRunAs
public void setRunAs(String role)
role
- Role name that is added to UserPrincipal when this servlet
is called.
setUserRoleLink
public void setUserRoleLink(String name,
String link)
Link a user role.
Translate the role name used by a servlet, to the link name
used by the container.
name
- The role name as used by the servletlink
- The role name as used by the container.
stop
public void stop()
Stop the LifeCycle.
The LifeCycle may wait for current activities to complete
normally, but it can be interrupted.
- stop in interface LifeCycle
- stop in interface Holder
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.