All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.apache.tomcat.core.Container

java.lang.Object
   |
   +----org.apache.tomcat.core.Container

public class Container
extends Object
implements Cloneable
A group of resources, with some common properties. Container is similar with Apache "dir_conf" structue. In Servlet terminology there are many types of containers: virtual host, context, prefix map, extension map, security prefix and extension maps. The most expensive operation is parsing the request and finding the match. With ad-literam interpreation of the spec, we need to parse at least 3 times: find context, find servlet, check security constraints. There is no difference in those steps - except the result of the mapping. Each Interceptor has the chance to alter the Container for a particular map via addMapping() callback. It can set private informations as attributes ( the Mapper or security interceptors will probably do so ).


Constructor Index

 o Container()

Method Index

 o addContextInterceptor(ContextInterceptor)
 o addRequestInterceptor(RequestInterceptor)
 o getAttribute(String)
 o getAttributeNames()
 o getClone()
 o getContext()
 o getContextInterceptors()
Return the context interceptors as an array.
 o getContextManager()
 o getHandler()
 o getPath()
 o getProtocol()
 o getRequestInterceptors()
Return the context interceptors as an array.
 o getRoles()
If not null, this container can only be accessed by users in roles.
 o getTransport()
 o removeAttribute(String)
 o setAttribute(String, Object)
 o setContext(Context)
 o setContextManager(ContextManager)
 o setHandler(ServletWrapper)
 o setPath(String)
 o setProtocol(String)
 o setRoles(String[])
If not null, this container can only be accessed by users in roles.
 o setTransport(String)
 o toString()

Constructors

 o Container
 public Container()

Methods

 o getContextManager
 public ContextManager getContextManager()
 o setContextManager
 public void setContextManager(ContextManager cm)
 o setContext
 public void setContext(Context ctx)
 o getContext
 public Context getContext()
 o setPath
 public void setPath(String path)
 o getPath
 public String getPath()
 o setProtocol
 public void setProtocol(String protocol)
 o getProtocol
 public String getProtocol()
 o addContextInterceptor
 public void addContextInterceptor(ContextInterceptor ci)
 o getContextInterceptors
 public ContextInterceptor[] getContextInterceptors()
Return the context interceptors as an array. For performance reasons we use an array instead of returning the vector - the interceptors will not change at runtime and array access is faster and easier than vector access

 o addRequestInterceptor
 public void addRequestInterceptor(RequestInterceptor ci)
 o getRequestInterceptors
 public RequestInterceptor[] getRequestInterceptors()
Return the context interceptors as an array. For performance reasons we use an array instead of returning the vector - the interceptors will not change at runtime and array access is faster and easier than vector access

 o getAttribute
 public Object getAttribute(String name)
 o getAttributeNames
 public Enumeration getAttributeNames()
 o setAttribute
 public void setAttribute(String name,
                          Object object)
 o removeAttribute
 public void removeAttribute(String name)
 o getHandler
 public ServletWrapper getHandler()
 o setHandler
 public void setHandler(ServletWrapper h)
 o setTransport
 public void setTransport(String transport)
 o getTransport
 public String getTransport()
 o getRoles
 public String[] getRoles()
If not null, this container can only be accessed by users in roles.

 o setRoles
 public void setRoles(String roles[])
If not null, this container can only be accessed by users in roles.

 o toString
 public String toString()
Overrides:
toString in class Object
 o getClone
 public Container getClone()

All Packages  Class Hierarchy  This Package  Previous  Next  Index