| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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 | contextContext associated with this wrapper, used for wrapper mapping. | 
| protected  java.lang.String | defaultHostNameDefault host name. | 
| protected  Mapper.Host[] | hostsArray containing the virtual hosts definitions. | 
| 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)Deprecated. Use addContext(String, String, Object, String[],
             javax.naming.Context, boolean, boolean) | 
|  void | addContext(java.lang.String hostName,
           java.lang.String path,
           java.lang.Object context,
           java.lang.String[] welcomeResources,
           javax.naming.Context resources,
           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. | 
| protected  void | addWrapper(Mapper.Context context,
           java.lang.String path,
           java.lang.Object wrapper) | 
| protected  void | addWrapper(Mapper.Context context,
           java.lang.String path,
           java.lang.Object wrapper,
           boolean jspWildCard)Adds a wrapper to the given context. | 
|  void | addWrapper(java.lang.String path,
           java.lang.Object wrapper)Add a wrapper to the context associated with this wrapper. | 
|  void | addWrapper(java.lang.String path,
           java.lang.Object wrapper,
           boolean jspWildCard) | 
|  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. | 
|  void | addWrapper(java.lang.String hostName,
           java.lang.String contextPath,
           java.lang.String path,
           java.lang.Object wrapper,
           boolean jspWildCard) | 
|  java.lang.String[] | getContextNames()Return all contexts, in //HOST/PATH form | 
|  java.lang.String | getDefaultHostName()Get default host. | 
|  java.lang.String[] | getHosts() | 
|  java.lang.String[] | getWrapperNames(java.lang.String host,
                java.lang.String context) | 
|  java.lang.String | getWrappersString(java.lang.String host,
                  java.lang.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(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 | removeHostAlias(java.lang.String alias)Remove a host alias | 
| protected  void | removeWrapper(Mapper.Context 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 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. | 
| 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 Mapper.Context context
| Constructor Detail | 
|---|
public Mapper()
| Method Detail | 
|---|
public java.lang.String getDefaultHostName()
public void setDefaultHostName(java.lang.String defaultHostName)
defaultHostName - Default host name
public void addHost(java.lang.String name,
                    java.lang.String[] aliases,
                    java.lang.Object host)
name - Virtual host namehost - Host objectpublic void removeHost(java.lang.String name)
name - Virtual host name
public 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 java.lang.String[] getHosts()
public 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 addContext(java.lang.String hostName,
                                  java.lang.String path,
                                  java.lang.Object context,
                                  java.lang.String[] welcomeResources,
                                  javax.naming.Context resources)
addContext(String, String, Object, String[],
             javax.naming.Context, boolean, boolean)
hostName - Virtual host name this context belongs topath - Context pathcontext - Context objectwelcomeResources - Welcome files defined for this contextresources - Static resources of the context
public void addContext(java.lang.String hostName,
                       java.lang.String path,
                       java.lang.Object context,
                       java.lang.String[] welcomeResources,
                       javax.naming.Context resources,
                       boolean mapperContextRootRedirectEnabled,
                       boolean mapperDirectoryRedirectEnabled)
hostName - Virtual host name this context belongs topath - Context pathcontext - Context objectwelcomeResources - Welcome files defined for this contextresources - Static resources of the contextmapperContextRootRedirectEnabled - Mapper does context root redirectsmapperDirectoryRedirectEnabled - Mapper does directory redirects
public 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 object
public void addWrapper(java.lang.String hostName,
                       java.lang.String contextPath,
                       java.lang.String path,
                       java.lang.Object wrapper,
                       boolean jspWildCard)
public void addWrapper(java.lang.String path,
                       java.lang.Object wrapper)
path - Wrapper mappingwrapper - The Wrapper object
public void addWrapper(java.lang.String path,
                       java.lang.Object wrapper,
                       boolean jspWildCard)
protected void addWrapper(Mapper.Context context,
                          java.lang.String path,
                          java.lang.Object wrapper)
protected void addWrapper(Mapper.Context context,
                          java.lang.String path,
                          java.lang.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(java.lang.String path)
path - Wrapper mapping
public 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 mapping
protected void removeWrapper(Mapper.Context context,
                             java.lang.String path)
public 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 void map(MessageBytes uri,
                MappingData mappingData)
         throws java.lang.Exception
uri - URImappingData - This structure will contain the result of the mapping
                    operation
java.lang.Exception| 
 | Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||