public final class Mapper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Mapper.Context |
protected static class |
Mapper.ContextList |
protected static class |
Mapper.ContextVersion |
protected static class |
Mapper.Host |
protected static class |
Mapper.MapElement |
protected static class |
Mapper.Wrapper |
Modifier and Type | Field and Description |
---|---|
protected Mapper.ContextVersion |
context
ContextVersion associated with this Mapper, used for wrapper mapping.
|
protected java.lang.String |
defaultHostName
Default host name.
|
protected Mapper.Host[] |
hosts
Array containing the virtual hosts definitions.
|
protected static StringManager |
sm |
Constructor and Description |
---|
Mapper() |
Modifier and Type | Method and Description |
---|---|
void |
addContextVersion(java.lang.String hostName,
java.lang.Object host,
java.lang.String path,
java.lang.String version,
java.lang.Object context,
java.lang.String[] welcomeResources,
javax.naming.Context resources)
|
void |
addContextVersion(java.lang.String hostName,
java.lang.Object host,
java.lang.String path,
java.lang.String version,
java.lang.Object context,
java.lang.String[] welcomeResources,
javax.naming.Context resources,
java.util.Collection<WrapperMappingInfo> wrappers)
|
void |
addContextVersion(java.lang.String hostName,
java.lang.Object host,
java.lang.String path,
java.lang.String version,
java.lang.Object context,
java.lang.String[] welcomeResources,
javax.naming.Context resources,
java.util.Collection<WrapperMappingInfo> wrappers,
boolean mapperContextRootRedirectEnabled,
boolean mapperDirectoryRedirectEnabled)
Add a new Context to an existing Host.
|
void |
addHost(java.lang.String name,
java.lang.String[] aliases,
java.lang.Object host)
Add a new host to the mapper.
|
void |
addHostAlias(java.lang.String name,
java.lang.String alias)
Add an alias to an existing host.
|
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.
|
protected void |
addWrapper(Mapper.ContextVersion context,
java.lang.String path,
java.lang.Object wrapper,
boolean jspWildCard,
boolean resourceOnly)
Adds a wrapper to the given context.
|
void |
addWrapper(java.lang.String path,
java.lang.Object wrapper,
boolean jspWildCard,
boolean resourceOnly) |
void |
addWrapper(java.lang.String hostName,
java.lang.String contextPath,
java.lang.String version,
java.lang.String path,
java.lang.Object wrapper,
boolean jspWildCard,
boolean resourceOnly) |
void |
addWrappers(java.lang.String hostName,
java.lang.String contextPath,
java.lang.String version,
java.util.Collection<WrapperMappingInfo> wrappers) |
void |
clearWelcomeFiles(java.lang.String hostName,
java.lang.String contextPath,
java.lang.String version)
Clear the welcome files for the given 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,
java.lang.String version,
MappingData mappingData)
Map the specified host name and URI, mutating the given mapping data.
|
void |
pauseContextVersion(java.lang.Object ctxt,
java.lang.String hostName,
java.lang.String contextPath,
java.lang.String version)
Mark a context as being reloaded.
|
void |
removeContextVersion(java.lang.String hostName,
java.lang.String path,
java.lang.String version)
Remove a context from an existing host.
|
void |
removeHost(java.lang.String name)
Remove a host from the mapper.
|
void |
removeHostAlias(java.lang.String alias)
Remove a host alias
|
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.
|
protected void |
removeWrapper(Mapper.ContextVersion context,
java.lang.String path) |
void |
removeWrapper(java.lang.String path)
Remove a wrapper from the context associated with this wrapper.
|
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.
|
void |
setContext(java.lang.String path,
java.lang.String[] welcomeResources,
javax.naming.Context resources)
Set context, used for wrapper mapping (request dispatcher).
|
void |
setDefaultHostName(java.lang.String defaultHostName)
Set default host.
|
protected static final StringManager sm
protected Mapper.Host[] hosts
protected java.lang.String defaultHostName
protected Mapper.ContextVersion context
It is used only by Mapper in a Context. Is not used by Mapper in a Connector.
public void setDefaultHostName(java.lang.String defaultHostName)
defaultHostName
- Default host namepublic void addHost(java.lang.String name, java.lang.String[] aliases, java.lang.Object host)
name
- Virtual host namealiases
- Alias names for the virtual hosthost
- Host objectpublic void removeHost(java.lang.String name)
name
- Virtual host namepublic void addHostAlias(java.lang.String name, java.lang.String alias)
name
- The name of the hostalias
- The alias to addpublic void removeHostAlias(java.lang.String alias)
alias
- The alias to removepublic void setContext(java.lang.String path, java.lang.String[] welcomeResources, javax.naming.Context resources)
welcomeResources
- Welcome files defined for this contextresources
- Static resources of the context@Deprecated public void addContextVersion(java.lang.String hostName, java.lang.Object host, java.lang.String path, java.lang.String version, java.lang.Object context, java.lang.String[] welcomeResources, javax.naming.Context resources)
addContextVersion(String, Object, String, String, Object, String[],
javax.naming.Context, Collection, boolean, boolean)
hostName
- Virtual host name this context belongs tohost
- Host objectpath
- Context pathversion
- Context versioncontext
- Context objectwelcomeResources
- Welcome files defined for this contextresources
- Static resources of the context@Deprecated public void addContextVersion(java.lang.String hostName, java.lang.Object host, java.lang.String path, java.lang.String version, java.lang.Object context, java.lang.String[] welcomeResources, javax.naming.Context resources, java.util.Collection<WrapperMappingInfo> wrappers)
addContextVersion(String, Object, String, String, Object, String[],
javax.naming.Context, Collection, boolean, boolean)
hostName
- Virtual host name this context belongs tohost
- Host objectpath
- Context pathversion
- Context versioncontext
- Context objectwelcomeResources
- Welcome files defined for this contextresources
- Static resources of the contextwrappers
- Information on wrapper mappingspublic void addContextVersion(java.lang.String hostName, java.lang.Object host, java.lang.String path, java.lang.String version, java.lang.Object context, java.lang.String[] welcomeResources, javax.naming.Context resources, java.util.Collection<WrapperMappingInfo> wrappers, boolean mapperContextRootRedirectEnabled, boolean mapperDirectoryRedirectEnabled)
hostName
- Virtual host name this context belongs tohost
- Host objectpath
- Context pathversion
- Context versioncontext
- Context objectwelcomeResources
- Welcome files defined for this contextresources
- Static resources of the contextwrappers
- Information on wrapper mappingsmapperContextRootRedirectEnabled
- Mapper does context root redirectsmapperDirectoryRedirectEnabled
- Mapper does directory redirectspublic void removeContextVersion(java.lang.String hostName, java.lang.String path, java.lang.String version)
hostName
- Virtual host name this context belongs topath
- Context pathversion
- Context versionpublic void pauseContextVersion(java.lang.Object ctxt, java.lang.String hostName, java.lang.String contextPath, java.lang.String version)
addContextVersion(...)
when context starts up.ctxt
- The actual contexthostName
- Virtual host name this context belongs tocontextPath
- Context pathversion
- Context versionpublic void addWrapper(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String path, java.lang.Object wrapper, boolean jspWildCard, boolean resourceOnly)
public void addWrapper(java.lang.String path, java.lang.Object wrapper, boolean jspWildCard, boolean resourceOnly)
public void addWrappers(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.util.Collection<WrapperMappingInfo> wrappers)
protected void addWrapper(Mapper.ContextVersion context, java.lang.String path, java.lang.Object wrapper, boolean jspWildCard, boolean resourceOnly)
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 otherwiseresourceOnly
- true if this wrapper always expects a physical
resource to be present (such as a JSP)public void removeWrapper(java.lang.String path)
path
- Wrapper mappingpublic void removeWrapper(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String path)
hostName
- Virtual host name this wrapper belongs tocontextPath
- Context path this wrapper belongs topath
- Wrapper mappingprotected void removeWrapper(Mapper.ContextVersion context, java.lang.String path)
public void addWelcomeFile(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String welcomeFile)
hostName
- contextPath
- welcomeFile
- public void removeWelcomeFile(java.lang.String hostName, java.lang.String contextPath, java.lang.String version, java.lang.String welcomeFile)
hostName
- contextPath
- welcomeFile
- public void clearWelcomeFiles(java.lang.String hostName, java.lang.String contextPath, java.lang.String version)
hostName
- contextPath
- public void map(MessageBytes host, MessageBytes uri, java.lang.String version, MappingData mappingData) throws java.lang.Exception
host
- Virtual host nameuri
- URImappingData
- This structure will contain the result of the mapping
operationjava.lang.Exception
public void map(MessageBytes uri, MappingData mappingData) throws java.lang.Exception
uri
- URImappingData
- This structure will contain the result of the mapping
operationjava.lang.Exception
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.