public class SerializeHttpEntityContentCommand extends AbstractProxyCommand
Command
responsible for serializing the response body from the remote content
to the response in the reverse proxy side.Constructor and Description |
---|
SerializeHttpEntityContentCommand() |
Modifier and Type | Method and Description |
---|---|
protected ContentRewritingContext |
createContentRewritingContext(ProxyContext proxyContext)
Creates a new
ContentRewritingContext which is to be used by the resolved ContentRewriter . |
protected boolean |
executeInternal(ProxyContext context)
Execute a unit of processing work to be performed.
|
String |
getDefaultCharacterEncoding()
Returns the default character encoding to be used when serializing content to response.
|
void |
setDefaultCharacterEncoding(String defaultCharacterEncoding)
Sets the default character encoding to be used when serializing content to response.
|
protected void |
writeHttpEntityToDispatcher(ProxyContext context,
org.apache.http.HttpEntity httpEntity)
Write the
HttpEntity of HttpResponse from the remote content
to the dispatched response in the reverse proxy side. |
protected void |
writeHttpEntityToResponse(ProxyContext context,
org.apache.http.HttpEntity httpEntity)
Write the
HttpEntity of HttpResponse from the remote content
to the non-dispatched response in the reverse proxy side. |
destroy, execute, initialize
protected boolean executeInternal(ProxyContext context) throws ReverseProxyException, IOException
Execute a unit of processing work to be performed. This
AbstractProxyCommand
may either complete the required processing
and return true
, or delegate remaining processing
to the next AbstractProxyCommand
in a ProxyProcessingChain
containing this
AbstractProxyCommand
by returning false
.
executeInternal
in class AbstractProxyCommand
ReverseProxyException
IOException
public String getDefaultCharacterEncoding()
public void setDefaultCharacterEncoding(String defaultCharacterEncoding)
defaultCharacterEncoding
- protected void writeHttpEntityToResponse(ProxyContext context, org.apache.http.HttpEntity httpEntity) throws ReverseProxyException, IOException
HttpEntity
of HttpResponse
from the remote content
to the non-dispatched response in the reverse proxy side.
If a ContentRewriter
was resolved in the previous step, then
it used the ContentRewriter
to rewriter the response content.
context
- httpEntity
- ReverseProxyException
IOException
protected void writeHttpEntityToDispatcher(ProxyContext context, org.apache.http.HttpEntity httpEntity) throws ReverseProxyException, IOException
HttpEntity
of HttpResponse
from the remote content
to the dispatched response in the reverse proxy side.
If a ContentRewriter
was resolved in the previous step, then
it used the ContentRewriter
to rewriter the response content.
context
- httpEntity
- ReverseProxyException
IOException
protected ContentRewritingContext createContentRewritingContext(ProxyContext proxyContext)
ContentRewritingContext
which is to be used by the resolved ContentRewriter
.proxyContext
- Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.