Package org.apache.catalina.mapper
Class Mapper
- java.lang.Object
- 
- org.apache.catalina.mapper.Mapper
 
- 
 public final class Mapper extends java.lang.ObjectMapper, which implements the servlet API mapping rules (which are derived from the HTTP rules).- Author:
- Remy Maucherat
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classMapper.ContextListprotected static classMapper.ContextVersionprotected static classMapper.MapElement<T>protected static classMapper.MappedContextprotected static classMapper.MappedHostprotected static classMapper.MappedWrapper
 - 
Constructor SummaryConstructors Constructor Description Mapper()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContextVersion(java.lang.String hostName, Host host, java.lang.String path, java.lang.String version, Context context, java.lang.String[] welcomeResources, WebResourceRoot resources, java.util.Collection<WrapperMappingInfo> wrappers)Add a new Context to an existing Host.voidaddHost(java.lang.String name, java.lang.String[] aliases, Host host)Add a new host to the mapper.voidaddHostAlias(java.lang.String name, java.lang.String alias)Add an alias to an existing host.voidaddWelcomeFile(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String welcomeFile)Add a welcome file to the given context.voidaddWrapper(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String path, Wrapper wrapper, boolean jspWildCard, boolean resourceOnly)protected voidaddWrapper(Mapper.ContextVersion context, java.lang.String path, Wrapper wrapper, boolean jspWildCard, boolean resourceOnly)Adds a wrapper to the given context.voidaddWrappers(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.util.Collection<WrapperMappingInfo> wrappers)voidclearWelcomeFiles(java.lang.String hostName, java.lang.String contextPath, java.lang.String version)Clear the welcome files for the given context.voidmap(Context context, MessageBytes uri, MappingData mappingData)Map the specified URI relative to the context, mutating the given mapping data.voidmap(MessageBytes host, MessageBytes uri, java.lang.String version, MappingData mappingData)Map the specified host name and URI, mutating the given mapping data.voidpauseContextVersion(Context ctxt, java.lang.String hostName, java.lang.String contextPath, java.lang.String version)Mark a context as being reloaded.voidremoveContextVersion(Context ctxt, java.lang.String hostName, java.lang.String path, java.lang.String version)Remove a context from an existing host.voidremoveHost(java.lang.String name)Remove a host from the mapper.voidremoveHostAlias(java.lang.String alias)Remove a host aliasvoidremoveWelcomeFile(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String welcomeFile)Remove a welcome file from the given context.voidremoveWrapper(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String path)Remove a wrapper from an existing context.protected voidremoveWrapper(Mapper.ContextVersion context, java.lang.String path)voidsetDefaultHostName(java.lang.String defaultHostName)Set default host.
 
- 
- 
- 
Method Detail- 
setDefaultHostNamepublic void setDefaultHostName(java.lang.String defaultHostName) Set default host.- Parameters:
- defaultHostName- Default host name
 
 - 
addHostpublic void addHost(java.lang.String name, java.lang.String[] aliases, Host host)Add a new host to the mapper.- Parameters:
- name- Virtual host name
- aliases- Alias names for the virtual host
- host- Host object
 
 - 
removeHostpublic void removeHost(java.lang.String name) Remove a host from the mapper.- Parameters:
- name- Virtual host name
 
 - 
addHostAliaspublic void addHostAlias(java.lang.String name, java.lang.String alias)Add an alias to an existing host.- Parameters:
- name- The name of the host
- alias- The alias to add
 
 - 
removeHostAliaspublic void removeHostAlias(java.lang.String alias) Remove a host alias- Parameters:
- alias- The alias to remove
 
 - 
addContextVersionpublic void addContextVersion(java.lang.String hostName, Host host, java.lang.String path, java.lang.String version, Context context, java.lang.String[] welcomeResources, WebResourceRoot resources, java.util.Collection<WrapperMappingInfo> wrappers)Add a new Context to an existing Host.- Parameters:
- hostName- Virtual host name this context belongs to
- host- Host object
- path- Context path
- version- Context version
- context- Context object
- welcomeResources- Welcome files defined for this context
- resources- Static resources of the context
- wrappers- Information on wrapper mappings
 
 - 
removeContextVersionpublic void removeContextVersion(Context ctxt, java.lang.String hostName, java.lang.String path, java.lang.String version) Remove a context from an existing host.- Parameters:
- ctxt- The actual context
- hostName- Virtual host name this context belongs to
- path- Context path
- version- Context version
 
 - 
pauseContextVersionpublic void pauseContextVersion(Context ctxt, java.lang.String hostName, java.lang.String contextPath, java.lang.String version) Mark a context as being reloaded. Reversion of this state is performed by callingaddContextVersion(...)when context starts up.- Parameters:
- ctxt- The actual context
- hostName- Virtual host name this context belongs to
- contextPath- Context path
- version- Context version
 
 - 
addWrapperpublic void addWrapper(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String path, Wrapper wrapper, boolean jspWildCard, boolean resourceOnly)
 - 
addWrapperspublic void addWrappers(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.util.Collection<WrapperMappingInfo> wrappers)
 - 
addWrapperprotected void addWrapper(Mapper.ContextVersion context, java.lang.String path, Wrapper wrapper, boolean jspWildCard, boolean resourceOnly) Adds a wrapper to the given context.- Parameters:
- context- The context to which to add the wrapper
- path- Wrapper mapping
- wrapper- The Wrapper object
- jspWildCard- true if the wrapper corresponds to the JspServlet and the mapping path contains a wildcard; false otherwise
- resourceOnly- true if this wrapper always expects a physical resource to be present (such as a JSP)
 
 - 
removeWrapperpublic void removeWrapper(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String path)Remove a wrapper from an existing context.- Parameters:
- hostName- Virtual host name this wrapper belongs to
- contextPath- Context path this wrapper belongs to
- version- Context version this wrapper belongs to
- path- Wrapper mapping
 
 - 
removeWrapperprotected void removeWrapper(Mapper.ContextVersion context, java.lang.String path) 
 - 
addWelcomeFilepublic void addWelcomeFile(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String welcomeFile)Add a welcome file to the given context.- Parameters:
- hostName- The host where the given context can be found
- contextPath- The path of the given context
- version- The version of the given context
- welcomeFile- The welcome file to add
 
 - 
removeWelcomeFilepublic void removeWelcomeFile(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String welcomeFile)Remove a welcome file from the given context.- Parameters:
- hostName- The host where the given context can be found
- contextPath- The path of the given context
- version- The version of the given context
- welcomeFile- The welcome file to remove
 
 - 
clearWelcomeFilespublic void clearWelcomeFiles(java.lang.String hostName, java.lang.String contextPath, java.lang.String version)Clear the welcome files for the given context.- Parameters:
- hostName- The host where the context to be cleared can be found
- contextPath- The path of the context to be cleared
- version- The version of the context to be cleared
 
 - 
mappublic void map(MessageBytes host, MessageBytes uri, java.lang.String version, MappingData mappingData) throws java.io.IOException Map the specified host name and URI, mutating the given mapping data.- Parameters:
- host- Virtual host name
- uri- URI
- version- The version, if any, included in the request to be mapped
- mappingData- This structure will contain the result of the mapping operation
- Throws:
- java.io.IOException- if the buffers are too small to hold the results of the mapping.
 
 - 
mappublic void map(Context context, MessageBytes uri, MappingData mappingData) throws java.io.IOException Map the specified URI relative to the context, mutating the given mapping data.- Parameters:
- context- The actual context
- uri- URI
- mappingData- This structure will contain the result of the mapping operation
- Throws:
- java.io.IOException- if the buffers are too small to hold the results of the mapping.
 
 
- 
 
-