Class GzipMessageFormatterDecorator
java.lang.Object
org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator
- All Implemented Interfaces:
org.apache.axis2.transport.MessageFormatter
public class GzipMessageFormatterDecorator
extends Object
implements org.apache.axis2.transport.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 .
-
Constructor Summary
ConstructorsConstructorDescriptionGzipMessageFormatterDecorator(org.apache.axis2.transport.MessageFormatter messageFormatter) -
Method Summary
Modifier and TypeMethodDescriptionformatSOAPAction(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction) byte[]getBytes(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format) getContentType(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction) getTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL) voidwriteTo(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, OutputStream outputStream, boolean preserve)
-
Constructor Details
-
GzipMessageFormatterDecorator
public GzipMessageFormatterDecorator(org.apache.axis2.transport.MessageFormatter messageFormatter)
-
-
Method Details
-
getBytes
public byte[] getBytes(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format) throws org.apache.axis2.AxisFault - Specified by:
getBytesin interfaceorg.apache.axis2.transport.MessageFormatter- Throws:
org.apache.axis2.AxisFault
-
writeTo
public void writeTo(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, OutputStream outputStream, boolean preserve) throws org.apache.axis2.AxisFault - Specified by:
writeToin interfaceorg.apache.axis2.transport.MessageFormatter- Throws:
org.apache.axis2.AxisFault
-
getContentType
public String getContentType(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction) - Specified by:
getContentTypein interfaceorg.apache.axis2.transport.MessageFormatter
-
getTargetAddress
public URL getTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL) throws org.apache.axis2.AxisFault - Specified by:
getTargetAddressin interfaceorg.apache.axis2.transport.MessageFormatter- Throws:
org.apache.axis2.AxisFault
-
formatSOAPAction
public String formatSOAPAction(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction) - Specified by:
formatSOAPActionin interfaceorg.apache.axis2.transport.MessageFormatter
-