|
Apache Tomcat 7.0.0 | ||||||||
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
public final class Mapper
Mapper, which implements the servlet API mapping rules (which are derived from the HTTP rules).
Nested Class Summary | |
---|---|
protected static class |
Mapper.Context
|
protected static class |
Mapper.ContextList
|
protected static class |
Mapper.Host
|
protected static class |
Mapper.MapElement
|
protected static class |
Mapper.Wrapper
|
Field Summary | |
---|---|
protected Mapper.Context |
context
Context associated with this wrapper, used for wrapper mapping. |
protected String |
defaultHostName
Default host name. |
protected Mapper.Host[] |
hosts
Array containing the virtual hosts definitions. |
protected static StringManager |
sm
|
Constructor Summary | |
---|---|
Mapper()
|
Method Summary | |
---|---|
void |
addContext(String hostName,
String path,
Object context,
String[] welcomeResources,
Context resources)
Add a new Context to an existing Host. |
void |
addHost(String name,
String[] aliases,
Object host)
Add a new host to the mapper. |
void |
addHostAlias(String name,
String alias)
Add an alias to an existing host. |
void |
addWelcomeFile(String hostName,
String contextPath,
String welcomeFile)
Add a welcome file to the given context. |
protected void |
addWrapper(Mapper.Context context,
String path,
Object wrapper)
|
protected void |
addWrapper(Mapper.Context context,
String path,
Object wrapper,
boolean jspWildCard)
Adds a wrapper to the given context. |
void |
addWrapper(String path,
Object wrapper)
Add a wrapper to the context associated with this wrapper. |
void |
addWrapper(String path,
Object wrapper,
boolean jspWildCard)
|
void |
addWrapper(String hostName,
String contextPath,
String path,
Object wrapper)
Add a new Wrapper to an existing Context. |
void |
addWrapper(String hostName,
String contextPath,
String path,
Object wrapper,
boolean jspWildCard)
|
void |
clearWelcomeFiles(String hostName,
String contextPath)
Clear the welcome files for the given context. |
String[] |
getContextNames()
Return all contexts, in //HOST/PATH form |
String |
getDefaultHostName()
Get default host. |
String[] |
getHosts()
|
String[] |
getWrapperNames(String host,
String context)
|
String |
getWrappersString(String host,
String context)
|
void |
map(MessageBytes uri,
MappingData mappingData)
Map the specified URI relative to the context, mutating the given mapping data. |
void |
map(MessageBytes host,
MessageBytes uri,
MappingData mappingData)
Map the specified host name and URI, mutating the given mapping data. |
void |
removeContext(String hostName,
String path)
Remove a context from an existing host. |
void |
removeHost(String name)
Remove a host from the mapper. |
void |
removeHostAlias(String alias)
Remove a host alias |
void |
removeWelcomeFile(String hostName,
String contextPath,
String welcomeFile)
Remove a welcome file from the given context. |
protected void |
removeWrapper(Mapper.Context context,
String path)
|
void |
removeWrapper(String path)
Remove a wrapper from the context associated with this wrapper. |
void |
removeWrapper(String hostName,
String contextPath,
String path)
Remove a wrapper from an existing context. |
void |
setContext(String path,
String[] welcomeResources,
Context resources)
Set context, used for wrapper mapping (request dispatcher). |
void |
setDefaultHostName(String defaultHostName)
Set default host. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final StringManager sm
protected Mapper.Host[] hosts
protected String defaultHostName
protected Mapper.Context context
Constructor Detail |
---|
public Mapper()
Method Detail |
---|
public String getDefaultHostName()
public void setDefaultHostName(String defaultHostName)
defaultHostName
- Default host namepublic void addHost(String name, String[] aliases, Object host)
name
- Virtual host namehost
- Host objectpublic void removeHost(String name)
name
- Virtual host namepublic void addHostAlias(String name, String alias)
name
- The name of the hostalias
- The alias to addpublic void removeHostAlias(String alias)
alias
- The alias to removepublic String[] getHosts()
public void setContext(String path, String[] welcomeResources, Context resources)
welcomeResources
- Welcome files defined for this contextresources
- Static resources of the contextpublic void addContext(String hostName, String path, Object context, String[] welcomeResources, 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(String hostName, String path)
hostName
- Virtual host name this context belongs topath
- Context pathpublic String[] getContextNames()
public void addWrapper(String hostName, String contextPath, String path, Object wrapper)
hostName
- Virtual host name this wrapper belongs tocontextPath
- Context path this wrapper belongs topath
- Wrapper mappingwrapper
- Wrapper objectpublic void addWrapper(String hostName, String contextPath, String path, Object wrapper, boolean jspWildCard)
public void addWrapper(String path, Object wrapper)
path
- Wrapper mappingwrapper
- The Wrapper objectpublic void addWrapper(String path, Object wrapper, boolean jspWildCard)
protected void addWrapper(Mapper.Context context, String path, Object wrapper)
protected void addWrapper(Mapper.Context context, String path, Object wrapper, boolean jspWildCard)
context
- The context to which to add the wrapperpath
- Wrapper mappingwrapper
- The Wrapper objectjspWildCard
- true if the wrapper corresponds to the JspServlet
and the mapping path contains a wildcard; false otherwisepublic void removeWrapper(String path)
path
- Wrapper mappingpublic void removeWrapper(String hostName, String contextPath, String path)
hostName
- Virtual host name this wrapper belongs tocontextPath
- Context path this wrapper belongs topath
- Wrapper mappingprotected void removeWrapper(Mapper.Context context, String path)
public String getWrappersString(String host, String context)
public String[] getWrapperNames(String host, String context)
public void addWelcomeFile(String hostName, String contextPath, String welcomeFile)
hostName
- contextPath
- welcomeFile
- public void removeWelcomeFile(String hostName, String contextPath, String welcomeFile)
hostName
- contextPath
- welcomeFile
- public void clearWelcomeFiles(String hostName, String contextPath)
hostName
- contextPath
- public void map(MessageBytes host, MessageBytes uri, MappingData mappingData) throws Exception
host
- Virtual host nameuri
- URImappingData
- This structure will contain the result of the mapping
operation
Exception
public void map(MessageBytes uri, MappingData mappingData) throws Exception
uri
- URImappingData
- This structure will contain the result of the mapping
operation
Exception
|
Apache Tomcat 7.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |