Mapper, which implements the servlet API mapping rules (which are derived
from the HTTP rules).
addContext
public void addContext(String hostName,
String path,
Object context,
String[] welcomeResources,
javax.naming.Context resources)
Add a new Context to an existing Host.
hostName
- Virtual host name this context belongs topath
- Context pathcontext
- Context objectwelcomeResources
- Welcome files defined for this contextresources
- Static resources of the context
addHost
public void addHost(String name,
String[] aliases,
Object host)
Add a new host to the mapper.
name
- Virtual host namehost
- Host object
addWrapper
public void addWrapper(String path,
Object wrapper)
Add a wrapper to the context associated with this wrapper.
path
- Wrapper mappingwrapper
- The Wrapper object
addWrapper
public void addWrapper(String path,
Object wrapper,
boolean jspWildCard)
addWrapper
public void addWrapper(String hostName,
String contextPath,
String path,
Object wrapper)
Add a new Wrapper to an existing Context.
hostName
- Virtual host name this wrapper belongs tocontextPath
- Context path this wrapper belongs topath
- Wrapper mappingwrapper
- Wrapper object
addWrapper
public void addWrapper(String hostName,
String contextPath,
String path,
Object wrapper,
boolean jspWildCard)
addWrapper
protected void addWrapper(Mapper.Context context,
String path,
Object wrapper)
addWrapper
protected void addWrapper(Mapper.Context context,
String path,
Object wrapper,
boolean jspWildCard)
Adds a wrapper to the given context.
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 otherwise
getContextNames
public String[] getContextNames()
Return all contexts, in //HOST/PATH form
getDefaultHostName
public String getDefaultHostName()
Get default host.
- Default host name
getHosts
public String[] getHosts()
getWrapperNames
public String[] getWrapperNames(String host,
String context)
getWrappersString
public String getWrappersString(String host,
String context)
main
public static void main(args[] )
map
public void map(MessageBytes host,
MessageBytes uri,
MappingData mappingData)
throws Exception
Map the specified host name and URI, mutating the given mapping data.
host
- Virtual host nameuri
- URImappingData
- This structure will contain the result of the mapping
operation
map
public void map(MessageBytes uri,
MappingData mappingData)
throws Exception
Map the specified URI relative to the context,
mutating the given mapping data.
uri
- URImappingData
- This structure will contain the result of the mapping
operation
removeContext
public void removeContext(String hostName,
String path)
Remove a context from an existing host.
hostName
- Virtual host name this context belongs topath
- Context path
removeHost
public void removeHost(String name)
Remove a host from the mapper.
name
- Virtual host name
removeWrapper
public void removeWrapper(String path)
Remove a wrapper from the context associated with this wrapper.
path
- Wrapper mapping
removeWrapper
public void removeWrapper(String hostName,
String contextPath,
String path)
Remove a wrapper from an existing context.
hostName
- Virtual host name this wrapper belongs tocontextPath
- Context path this wrapper belongs topath
- Wrapper mapping
removeWrapper
protected void removeWrapper(Mapper.Context context,
String path)
setContext
public void setContext(String path,
String[] welcomeResources,
javax.naming.Context resources)
Set context, used for wrapper mapping (request dispatcher).
welcomeResources
- Welcome files defined for this contextresources
- Static resources of the context
setDefaultHostName
public void setDefaultHostName(String defaultHostName)
Set default host.