|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tomcat.util.http.mapper.Mapper
Mapper, which implements the servlet API mapping rules (which are derived from the HTTP rules).
Nested Class Summary | |
protected class |
Mapper.Context
|
protected class |
Mapper.Host
|
protected class |
Mapper.MapElement
|
protected class |
Mapper.Wrapper
|
Field Summary | |
protected java.lang.String |
defaultHostName
Default host name. |
protected Mapper.Host[] |
hosts
Array containing the virtual hosts definitions. |
protected boolean |
processWelcomeResources
Flag indicating if physical welcome files are to be processed by this mapper. |
protected boolean |
redirectDirectories
Flag indicating that we should redirect to a directory when the URL doesn't end in a '/'. |
Constructor Summary | |
Mapper()
|
Method Summary | |
void |
addContext(java.lang.String hostName,
java.lang.String path,
java.lang.Object context,
java.lang.String[] welcomeResources,
javax.naming.Context resources)
Add a new Context to an existing Host. |
void |
addHost(java.lang.String name,
java.lang.Object host)
Add a new host to the mapper. |
void |
addWrapper(java.lang.String hostName,
java.lang.String contextPath,
java.lang.String path,
java.lang.Object wrapper)
Add a new Wrapper to an existing Context. |
java.lang.String[] |
getContextNames()
Return all contexts, in //HOST/PATH form |
java.lang.String |
getDefaultHostName()
Get default host. |
java.lang.String[] |
getHosts()
|
boolean |
getProcessWelcomeResources()
Get flag value indicating whether or not welcome files are processed by the mapper. |
boolean |
getRedirectDirectories()
Get the flag that indicates if we redirect to directories that don't end a '/'. |
java.lang.String[] |
getWrapperNames(java.lang.String host,
java.lang.String context)
|
java.lang.String |
getWrappersString(java.lang.String host,
java.lang.String context)
|
static void |
main(java.lang.String[] args)
|
void |
map(MessageBytes host,
MessageBytes uri,
MappingData mappingData)
Map the specified host name and URI, mutating the given mapping data. |
void |
removeContext(java.lang.String hostName,
java.lang.String path)
Remove a context from an existing host. |
void |
removeHost(java.lang.String name)
Remove a host from the mapper. |
void |
removeWrapper(java.lang.String hostName,
java.lang.String contextPath,
java.lang.String path)
Remove a wrapper from an existing context. |
void |
setDefaultHostName(java.lang.String defaultHostName)
Set default host. |
void |
setProcessWelcomeResources(boolean processWelcomeResources)
Set the process flag indicating if welcome resources should be processed by the mapper. |
void |
setRedirectDirectories(boolean rd)
Set the flag that indicates if we redirect to directories that don't end in a '/'. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Mapper.Host[] hosts
protected java.lang.String defaultHostName
protected boolean processWelcomeResources
protected boolean redirectDirectories
Constructor Detail |
public Mapper()
Method Detail |
public java.lang.String getDefaultHostName()
public void setDefaultHostName(java.lang.String defaultHostName)
public boolean getProcessWelcomeResources()
public void setProcessWelcomeResources(boolean processWelcomeResources)
processWelcomeResources
- True if welcome files should be
fully processed by this mapper.public boolean getRedirectDirectories()
public void setRedirectDirectories(boolean rd)
public void addHost(java.lang.String name, java.lang.Object host)
name
- Virtual host namehost
- Host objectpublic void removeHost(java.lang.String name)
name
- Virtual host namepublic java.lang.String[] getHosts()
public void addContext(java.lang.String hostName, java.lang.String path, java.lang.Object context, java.lang.String[] welcomeResources, javax.naming.Context resources)
hostName
- Virtual host name this context belongs topath
- Context pathcontext
- Context objectwelcomeResources
- Welcome files defined for this contextresources
- Static resources of the contextpublic void removeContext(java.lang.String hostName, java.lang.String path)
hostName
- Virtual host name this context belongs topath
- Context pathpublic java.lang.String[] getContextNames()
public void addWrapper(java.lang.String hostName, java.lang.String contextPath, java.lang.String path, java.lang.Object wrapper)
hostName
- Virtual host name this wrapper belongs tocontextPath
- Context path this wrapper belongs topath
- Wrapper mappingwrapper
- Wrapper objectpublic void removeWrapper(java.lang.String hostName, java.lang.String contextPath, java.lang.String path)
hostName
- Virtual host name this wrapper belongs tocontextPath
- Context path this wrapper belongs topath
- Wrapper mappingpublic java.lang.String getWrappersString(java.lang.String host, java.lang.String context)
public java.lang.String[] getWrapperNames(java.lang.String host, java.lang.String context)
public void map(MessageBytes host, MessageBytes uri, MappingData mappingData) throws java.lang.Exception
host
- Virtual host nameuri
- URImappingData
- This structure will contain the result of the mapping
operation
java.lang.Exception
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |