org.apache.synapse.transport.nhttp.util
Class GzipMessageFormatterDecorator
java.lang.Object
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator
- All Implemented Interfaces:
- MessageFormatter
public class GzipMessageFormatterDecorator
- extends Object
- implements MessageFormatter
This is the decorator for message formatter and it is need because there isn't any mechanism
that can process the message before formatting is occurred. For handle 'Accept-Encoding' some
kind of this is required. This decorator encapsulates the message formatter and add the whatever
functionally when as required without effecting message formatter functionality.
This enable to serialize message in Gzip format .
Method Summary |
String |
formatSOAPAction(MessageContext messageContext,
OMOutputFormat format,
String soapAction)
|
byte[] |
getBytes(MessageContext messageContext,
OMOutputFormat format)
|
String |
getContentType(MessageContext messageContext,
OMOutputFormat format,
String soapAction)
|
URL |
getTargetAddress(MessageContext messageContext,
OMOutputFormat format,
URL targetURL)
|
void |
writeTo(MessageContext messageContext,
OMOutputFormat format,
OutputStream outputStream,
boolean preserve)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GzipMessageFormatterDecorator
public GzipMessageFormatterDecorator(MessageFormatter messageFormatter)
getBytes
public byte[] getBytes(MessageContext messageContext,
OMOutputFormat format)
throws AxisFault
- Specified by:
getBytes
in interface MessageFormatter
- Throws:
AxisFault
writeTo
public void writeTo(MessageContext messageContext,
OMOutputFormat format,
OutputStream outputStream,
boolean preserve)
throws AxisFault
- Specified by:
writeTo
in interface MessageFormatter
- Throws:
AxisFault
getContentType
public String getContentType(MessageContext messageContext,
OMOutputFormat format,
String soapAction)
- Specified by:
getContentType
in interface MessageFormatter
getTargetAddress
public URL getTargetAddress(MessageContext messageContext,
OMOutputFormat format,
URL targetURL)
throws AxisFault
- Specified by:
getTargetAddress
in interface MessageFormatter
- Throws:
AxisFault
formatSOAPAction
public String formatSOAPAction(MessageContext messageContext,
OMOutputFormat format,
String soapAction)
- Specified by:
formatSOAPAction
in interface MessageFormatter
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.