|
|||||||||||
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. Each Context has a default Container and one container for each URL property ( mapping handlers and security constraints ). The ContextManager has a defaultContainer containing global properties. Each time a container is added to a Context, addContainer() hook is called to notify all modules of a new URL property. Modules that implement contextMap/requestMap and security constraints ( authenticate/authorize hooks ) will construct specialized data structures. You can associate trees, hashtables or other data types with the context using notes - no application/module should assume any particular structure is in used, the user can choose any mapper. See SimpleMapper1 for an example of such structures. A container will be selected by best-matching a request using the alghoritms described in the servlet API.
Field Summary | |
---|---|
static int |
DEFAULT_MAP
|
static int |
EXTENSION_MAP
|
static int |
H_afterBody
|
static int |
H_authenticate
|
static int |
H_authorize
|
static int |
H_beforeBody
|
static int |
H_beforeCommit
|
static int |
H_contextMap
|
static int |
H_COUNT
|
static int |
H_engineInit
|
static int |
H_findSession
|
static int |
H_getInfo
|
static int |
H_handleError
|
static int |
H_postReadRequest
|
static int |
H_postRequest
|
static int |
H_postService
|
static int |
H_preService
|
static int |
H_requestMap
|
static int |
H_sessionState
|
static int |
H_setInfo
|
static int |
PATH_MAP
|
static int |
PREFIX_MAP
|
static int |
UNKNOWN_MAP
|
Constructor Summary | |
---|---|
Container()
|
Method Summary | |
---|---|
void |
addInterceptor(BaseInterceptor bi)
Add the interceptor to all the hook chains it's interested in |
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. |
ContextManager |
getContextManager()
Get the context manager |
Handler |
getHandler()
|
java.lang.String |
getHandlerName()
The handler name for this container. |
Hooks |
getHooks()
|
BaseInterceptor[] |
getInterceptors()
Get all interceptors |
BaseInterceptor[] |
getInterceptors(int type)
|
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.Object |
getNote(java.lang.String name)
|
java.lang.String |
getPath()
Return the path |
java.lang.String |
getProtocol()
Protocol matching. |
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 |
boolean |
isSpecial()
|
void |
removeAttribute(java.lang.String name)
Per container attributes. |
void |
removeInterceptor(BaseInterceptor bi)
|
void |
resetInterceptorCache(int id)
|
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(Handler h)
The handler ( servlet ) for this container |
void |
setHandlerName(java.lang.String hn)
|
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 |
setNote(java.lang.String name,
java.lang.Object value)
|
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 |
setSpecial(boolean b)
|
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
public static final int H_postReadRequest
public static final int H_requestMap
public static final int H_contextMap
public static final int H_authenticate
public static final int H_authorize
public static final int H_preService
public static final int H_beforeBody
public static final int H_findSession
public static final int H_sessionState
public static final int H_beforeCommit
public static final int H_afterBody
public static final int H_postService
public static final int H_postRequest
public static final int H_handleError
public static final int H_getInfo
public static final int H_setInfo
public static final int H_engineInit
public static final int H_COUNT
Constructor Detail |
public Container()
Method Detail |
public ContextManager getContextManager()
public void setContextManager(ContextManager cm)
public void setContext(Context ctx)
public Context getContext()
public void setSpecial(boolean b)
public boolean isSpecial()
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 Handler getHandler()
public void setHandler(Handler h)
public void setHandlerName(java.lang.String hn)
public java.lang.String getHandlerName()
public java.lang.String[] getRoles()
public void setRoles(java.lang.String[] roles)
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()
toString
in class java.lang.Object
public Container getClone()
public final void setNote(int pos, java.lang.Object value)
public final java.lang.Object getNote(int pos)
public java.lang.Object getNote(java.lang.String name) throws TomcatException
public void setNote(java.lang.String name, java.lang.Object value) throws TomcatException
public Hooks getHooks()
public void addInterceptor(BaseInterceptor bi)
public void removeInterceptor(BaseInterceptor bi)
public BaseInterceptor[] getInterceptors(int type)
public BaseInterceptor[] getInterceptors()
public void resetInterceptorCache(int id)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |