org.apache.tomcat.util.http.mapper
public final class Mapper extends Object
Nested Class Summary | |
---|---|
protected static class | Mapper.Context |
protected static class | Mapper.ContextList |
protected static class | Mapper.Host |
protected abstract 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. |
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 | 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 | addWrapper(String path, Object wrapper)
Add a wrapper to the context associated with this wrapper.
|
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)
Adds a wrapper to 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 host, MessageBytes uri, MappingData mappingData)
Map the specified host name and URI, mutating the given mapping data.
|
void | map(MessageBytes uri, MappingData mappingData)
Map the specified URI relative to the context,
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 | 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.
|
protected void | removeWrapper(Mapper.Context context, String path) |
void | setContext(String path, String[] welcomeResources, Context resources)
Set context, used for wrapper mapping (request dispatcher).
|
void | setDefaultHostName(String defaultHostName)
Set default host.
|
Parameters: hostName Virtual host name this context belongs to path Context path context Context object welcomeResources Welcome files defined for this context resources Static resources of the context
Parameters: name Virtual host name host Host object
Parameters: name The name of the host alias The alias to add
Parameters: hostName Virtual host name this wrapper belongs to contextPath Context path this wrapper belongs to path Wrapper mapping wrapper Wrapper object
Parameters: path Wrapper mapping wrapper The Wrapper object
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
Returns: The context names
Returns: Default host name
Parameters: host Virtual host name uri URI mappingData This structure will contain the result of the mapping operation
Parameters: uri URI mappingData This structure will contain the result of the mapping operation
Parameters: hostName Virtual host name this context belongs to path Context path
Parameters: name Virtual host name
Parameters: alias The alias to remove
Parameters: path Wrapper mapping
Parameters: hostName Virtual host name this wrapper belongs to contextPath Context path this wrapper belongs to path Wrapper mapping
Parameters: welcomeResources Welcome files defined for this context resources Static resources of the context
Parameters: defaultHostName Default host name