Package org.apache.synapse.transport.netty.util

# Class DeferredMessageBuilder

java.lang.Object
org.apache.synapse.transport.netty.util.DeferredMessageBuilder

public class DeferredMessageBuilder extends Object
Class DeferredMessageBuilder contains the tools required to build the payload.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `RELAY_FORMATTERS_MAP`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DeferredMessageBuilder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addBuilder(String contentType, org.apache.axis2.builder.Builder builder)`
  `void`
  `addFormatter(String contentType, org.apache.axis2.transport.MessageFormatter messageFormatter)`
  `Map<String,org.apache.axis2.builder.Builder>`
  `getBuilders()`
  `static String`
  `getContentType(String contentType, org.apache.axis2.context.MessageContext msgContext)`
  This method is from org.apache.axis2.transport.TransportUtils - it was a hack placed in Axis2 Transport to enable responses with text/xml to be processed using the ApplicationXMLBuilder (which is technically wrong, it should be the duty of the backend service to send the correct content type, which makes the most sense (refer RFC 1049), alas, tis not the way of the World).
  `org.apache.axiom.om.OMElement`
  `getDocument(org.apache.axis2.context.MessageContext msgCtx, InputStream in)`
  `Map<String,org.apache.axis2.transport.MessageFormatter>`
  `getFormatters()`

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

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

- ## Field Details

  - ### RELAY_FORMATTERS_MAP

    public static final String RELAY_FORMATTERS_MAP
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DeferredMessageBuilder

    public DeferredMessageBuilder()

- ## Method Details

  - ### getBuilders

    public Map<String,org.apache.axis2.builder.Builder> getBuilders()

  - ### addBuilder

    public void addBuilder(String contentType, org.apache.axis2.builder.Builder builder)

  - ### addFormatter

    public void addFormatter(String contentType, org.apache.axis2.transport.MessageFormatter messageFormatter)

  - ### getFormatters

    public Map<String,org.apache.axis2.transport.MessageFormatter> getFormatters()

  - ### getDocument

    public org.apache.axiom.om.OMElement getDocument(org.apache.axis2.context.MessageContext msgCtx, InputStream in) throws XMLStreamException, IOException
    Throws:
      `XMLStreamException`
      `IOException`

  - ### getContentType

    public static String getContentType(String contentType, org.apache.axis2.context.MessageContext msgContext)
    This method is from org.apache.axis2.transport.TransportUtils - it was a hack placed in Axis2 Transport to enable responses with text/xml to be processed using the ApplicationXMLBuilder (which is technically wrong, it should be the duty of the backend service to send the correct content type, which makes the most sense (refer RFC 1049), alas, tis not the way of the World).
    Parameters:
      `contentType` - content type
      `msgContext` - message context
    Returns:
      MIME content type.