public class DefaultReverseProxyTextLineContentRewriter extends AbstractTextLineContentRewriter
This implementation uses a regular expression (see LINK_PATTERN) to find
all the DOM elements containing any of href, src and action
attributes and rewrite those URI attribute values by a resolved ProxyMapping from the
internal ProxyMappingRegistry in the current reverse proxy processing context.
| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
LINK_PATTERN
The regular expression pattern to find and replace URI attribute values in DOM elements.
|
| Constructor and Description |
|---|
DefaultReverseProxyTextLineContentRewriter()
Zero-argument default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isRewritableURI(String uri)
Returns true if the given
uri can be rewritten by this. |
protected String |
rewriteLine(String line,
ContentRewritingContext context) |
protected String |
rewriteURI(String uri,
ContentRewritingContext context)
Rewrites the given
uri by resolving a ProxyMapping from the internal
ProxyMappingRegistry in the current ContentRewritingContext and ProxyContext. |
rewriteprotected static final Pattern LINK_PATTERN
public DefaultReverseProxyTextLineContentRewriter()
protected String rewriteLine(String line, ContentRewritingContext context) throws ContentRewritingException, IOException
This implementation uses a regular expression (see LINK_PATTERN) to find
all the DOM elements containing any of href, src and action
attributes and rewrite those URI attribute values (see rewriteURI(String, ContentRewritingContext))
by a resolved ProxyMapping from the internal ProxyMappingRegistry
in the current reverse proxy processing context.
rewriteLine in class AbstractTextLineContentRewriterContentRewritingExceptionIOExceptionprotected String rewriteURI(String uri, ContentRewritingContext context)
uri by resolving a ProxyMapping from the internal
ProxyMappingRegistry in the current ContentRewritingContext and ProxyContext.uri - context - protected boolean isRewritableURI(String uri)
uri can be rewritten by this. Otherwise it returns false.uri - Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.