public interface ProxyMapping
Reverse proxy mapping abstraction, which is responsible for
ContentRewriter
instance for the MIME type of the response content if any available,
Note: resolveRemoteFromLocal(String)
is usually invoked to resolve
a remote target URI from a local request path info, whereas resolveLocalFromRemote(URI)
is usually invoked to resolve a local request path info from a remote target URI location
(e.g, URI redirection response from the remote server).
Note: It is recommended to invoke resolveRemoteFromLocal(String)
only when matchesLocal(String)
returns true.
In the same way, it is recommended to invoke resolveLocalFromRemote(URI)
only when matchesRemote(URI)
returns true.
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
Returns the value of the named attribute as an
Object ,
or null if no attribute of the given name exists. |
Map<String,Object> |
getAttributesMap()
Returns a
Map containing the attributes available. |
ContentRewriter |
getContentRewriter(String mimeType)
Returns a
ContentRewriter instance to be used for the given mimeType . |
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. |
void |
removeAttribute(String name)
Removes an attribute from this 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 |
setAttribute(String name,
Object value)
Stores an attribute in this mapping.
|
boolean matchesLocal(String localPath)
localPath
can be mapped by this proxy mapping.
Otherwise, it should return false.localPath
- String resolveRemoteFromLocal(String localPath)
localPath
to a remote target URI.localPath
- boolean matchesRemote(URI remoteURI)
remoteURI
can be mapped by this proxy mapping.
Otherwise, it should return false.remoteURI
- String resolveLocalFromRemote(URI remoteURI)
remoteURI
to a local request path info.remoteURI
- ContentRewriter getContentRewriter(String mimeType)
ContentRewriter
instance to be used for the given mimeType
.mimeType
- Object getAttribute(String name)
Object
,
or null
if no attribute of the given name exists.name
- void setAttribute(String name, Object value)
name
- value
- void removeAttribute(String name)
name
- Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.