public class SimpleProxyMapping extends AbstractProxyMapping
ProxyMapping
implementation based on path prefix matching.
For example, if this represents a mapping between a local path prefix and a remote URI prefix like '/portals/' vs. 'http://portals.apache.org/', then a local request path info, '/portals/a/b/c.html', will be resolved to 'http://portals.apache.org/a/b/c.html' and vice versa.
Constructor and Description |
---|
SimpleProxyMapping()
Zero-argument default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getLocal()
Returns the local request path info prefix.
|
URI |
getRemote()
Returns the remote target URI prefix.
|
boolean |
matchesLocal(String localPath)
Returns true the
localPath can be mapped by this proxy mapping. |
boolean |
matchesRemote(URI remoteURI)
Returns true the
remoteURI can be mapped by this proxy mapping. |
String |
resolveLocalFromRemote(URI remoteURI)
Resolves the
remoteURI to a local request path info. |
String |
resolveRemoteFromLocal(String localPath)
Resolves the
localPath to a remote target URI. |
void |
setLocal(String localBasePath)
Sets the local request path info prefix.
|
void |
setRemote(URI remoteBaseURI)
Sets the remote target URI prefix.
|
getAttribute, getAttributesMap, getContentRewriter, getContentRewriters, removeAttribute, setAttribute, setAttributesMap, setContentRewriters
public SimpleProxyMapping()
public String getLocal()
public void setLocal(String localBasePath)
localBasePath
- public URI getRemote()
public void setRemote(URI remoteBaseURI)
remoteBaseURI
- public boolean matchesLocal(String localPath)
localPath
can be mapped by this proxy mapping.
Otherwise, it should return false.public String resolveRemoteFromLocal(String localPath)
localPath
to a remote target URI.public boolean matchesRemote(URI remoteURI)
remoteURI
can be mapped by this proxy mapping.
Otherwise, it should return false.Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.