|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tomcat.core.Container
A group of resources, with some common properties. Container is similar with Apache "dir_conf" structue. A container will be selected by best-matching using the alghoritms described in the servlet API. The matching container will determine the handler and the security properties associated with the request. It will also have a chance to add a number of per/container interceptors. In Servlet terminology there are many types of containers: virtual host, context, prefix map, extension map, security prefix and extension maps. It is possible to add/remove containers at runtime (usefull for Invoker or Jsp servlet - if they want to avoid double servlet call overhead ). To make this possible for Jsps we also need to factor out the dependency check and reloading.
Field Summary | |
static int |
DEFAULT_MAP
|
static int |
EXTENSION_MAP
|
static int |
PATH_MAP
|
static int |
PREFIX_MAP
|
static int |
UNKNOWN_MAP
|
Constructor Summary | |
Container()
|
Method Summary | |
void |
addContextInterceptor(ContextInterceptor ci)
Add a per/container context interceptor. |
void |
addRequestInterceptor(RequestInterceptor ci)
Add a per/container request interceptor. |
java.lang.Object |
getAttribute(java.lang.String name)
Per container attributes. |
java.util.Enumeration |
getAttributeNames()
Per container attributes. |
Container |
getClone()
|
Context |
getContext()
The parent web application, if any. |
ContextInterceptor[] |
getContextInterceptors()
Return the context interceptors as an array. |
ContextManager |
getContextManager()
Get the context manager |
ServletWrapper |
getHandler()
The handler for this container |
int |
getMapType()
Return the type of the mapping ( extension, prefix, default, etc) |
java.lang.String[] |
getMethods()
If not null, this container can only be accessed by users in roles. |
java.lang.Object |
getNote(int pos)
|
java.lang.String |
getPath()
Return the path |
java.lang.String |
getProtocol()
Protocol matching. |
RequestInterceptor[] |
getRequestInterceptors()
Return the context interceptors as an array. |
java.lang.String[] |
getRoles()
If not null, this container can only be accessed by users in roles. |
java.lang.String |
getTransport()
The transport - another component of the matching. |
java.lang.String[] |
getVhosts()
Any alias that can match a particular vhost |
void |
removeAttribute(java.lang.String name)
Per container attributes. |
void |
setAttribute(java.lang.String name,
java.lang.Object object)
Per container attributes. |
void |
setContext(Context ctx)
Set the context, if this container is part of a web application. |
void |
setContextManager(ContextManager cm)
|
void |
setHandler(ServletWrapper h)
The handler ( servlet ) for this container |
void |
setMethods(java.lang.String[] m)
If not null, this container can only be accessed by users in roles. |
void |
setNote(int pos,
java.lang.Object value)
See ContextManager comments. |
void |
setPath(java.lang.String path)
The mapping string that creates this Container. |
void |
setProtocol(java.lang.String protocol)
Set the protocol - if it's set it will be used in mapping |
void |
setRoles(java.lang.String[] roles)
If not null, this container can only be accessed by users in roles. |
void |
setTransport(java.lang.String transport)
The transport - another component of the matching. |
void |
setVhosts(java.lang.String[] vhosts)
Any alias that can match a particular vhost |
java.lang.String |
toString()
Print a short string describing the mapping |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int UNKNOWN_MAP
public static final int PATH_MAP
public static final int PREFIX_MAP
public static final int EXTENSION_MAP
public static final int DEFAULT_MAP
Constructor Detail |
public Container()
Method Detail |
public ContextManager getContextManager()
public void setContextManager(ContextManager cm)
public void setContext(Context ctx)
public Context getContext()
public int getMapType()
public void setPath(java.lang.String path)
public java.lang.String getPath()
public void setProtocol(java.lang.String protocol)
public java.lang.String getProtocol()
public void setTransport(java.lang.String transport)
public java.lang.String getTransport()
public java.lang.String[] getVhosts()
public void setVhosts(java.lang.String[] vhosts)
public java.lang.String[] getMethods()
public void setMethods(java.lang.String[] m)
public ServletWrapper getHandler()
public void setHandler(ServletWrapper h)
public java.lang.String[] getRoles()
public void setRoles(java.lang.String[] roles)
public void addContextInterceptor(ContextInterceptor ci)
public ContextInterceptor[] getContextInterceptors()
public void addRequestInterceptor(RequestInterceptor ci)
public RequestInterceptor[] getRequestInterceptors()
public java.lang.Object getAttribute(java.lang.String name)
public java.util.Enumeration getAttributeNames()
public void setAttribute(java.lang.String name, java.lang.Object object)
public void removeAttribute(java.lang.String name)
public java.lang.String toString()
public Container getClone()
public void setNote(int pos, java.lang.Object value)
public java.lang.Object getNote(int pos)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |