org.apache.synapse.transport.nhttp.util

## Class GzipMessageFormatterDecorator

- java.lang.Object
- - org.apache.synapse.transport.nhttp.util.GzipMessageFormatterDecorator

- All Implemented Interfaces:
    org.apache.axis2.transport.MessageFormatter

      public class GzipMessageFormatterDecorator
      extends java.lang.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

    Constructors
    Constructor and Description
    `GzipMessageFormatterDecorator(org.apache.axis2.transport.MessageFormatter messageFormatter)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `formatSOAPAction(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, java.lang.String soapAction)`
    `byte[]` | `getBytes(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format)`
    `java.lang.String` | `getContentType(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, java.lang.String soapAction)`
    `java.net.URL` | `getTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, java.net.URL targetURL)`
    `void` | `writeTo(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, java.io.OutputStream outputStream, boolean preserve)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GzipMessageFormatterDecorator

          public GzipMessageFormatterDecorator(org.apache.axis2.transport.MessageFormatter messageFormatter)

  - ### Method Detail

    - #### getBytes

          public byte[] getBytes(org.apache.axis2.context.MessageContext messageContext,
                                 org.apache.axiom.om.OMOutputFormat format)
                          throws org.apache.axis2.AxisFault

      Specified by:
        `getBytes` in interface `org.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,
                              java.io.OutputStream outputStream,
                              boolean preserve)
                       throws org.apache.axis2.AxisFault

      Specified by:
        `writeTo` in interface `org.apache.axis2.transport.MessageFormatter`
      Throws:
        `org.apache.axis2.AxisFault`

    - #### getContentType

          public java.lang.String getContentType(org.apache.axis2.context.MessageContext messageContext,
                                                 org.apache.axiom.om.OMOutputFormat format,
                                                 java.lang.String soapAction)

      Specified by:
        `getContentType` in interface `org.apache.axis2.transport.MessageFormatter`

    - #### getTargetAddress

          public java.net.URL getTargetAddress(org.apache.axis2.context.MessageContext messageContext,
                                               org.apache.axiom.om.OMOutputFormat format,
                                               java.net.URL targetURL)
                                        throws org.apache.axis2.AxisFault

      Specified by:
        `getTargetAddress` in interface `org.apache.axis2.transport.MessageFormatter`
      Throws:
        `org.apache.axis2.AxisFault`

    - #### formatSOAPAction

          public java.lang.String formatSOAPAction(org.apache.axis2.context.MessageContext messageContext,
                                                   org.apache.axiom.om.OMOutputFormat format,
                                                   java.lang.String soapAction)

      Specified by:
        `formatSOAPAction` in interface `org.apache.axis2.transport.MessageFormatter`

Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.