Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.soa.esb.message.body.content
Class Payload

    java.lang.Object
      org.jboss.soa.esb.message.body.content.Payload

    public class Payload

extends java.lang.Object

Different message formats represent views on the underlying Message Body, i.e., payload. They do not change how the content is represented on the wire, only how it can be more easily interpreted within the application. These are essentially helper classes. In order to use, first create your Message (via the factory) and then pass it to the appropriate method of this class. Use the returned Body type to then populate your Message before sending it. At the receiver, you can get the type by calling bodyType and then use the right method to get the Body type back for use. If you try to use it as the wrong type, you'll get an exception. It is not possible currently to change between types, i.e., to give different "views" on to the same underlying message structure. However, that is relatively simple to implement if needed.

Field Summary
`static java.lang.String` | `BYTES_BODY`
`static java.lang.String` | `CONTENT_TYPE`
`static java.lang.String` | `MAP_BODY`
`static java.lang.String` | `OBJECT_BODY`
`static java.lang.String` | `RAW_BODY`
`static java.lang.String` | `TEXT_BODY`

Constructor Summary
`Payload()`

Method Summary
`static java.lang.String` | `bodyType(Message msg)`
`static BytesBody` | `createBytesBody(Message msg)`
`static MapBody` | `createMapBody(Message msg)`
`static ObjectBody` | `createObjectBody(Message msg)`
`static TextBody` | `createTextBody(Message msg)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CONTENT_TYPE

    public static final java.lang.String CONTENT_TYPE

See Also:
  Constant Field Values

### RAW_BODY

    public static final java.lang.String RAW_BODY

See Also:
  Constant Field Values

### BYTES_BODY

    public static final java.lang.String BYTES_BODY

See Also:
  Constant Field Values

### MAP_BODY

    public static final java.lang.String MAP_BODY

See Also:
  Constant Field Values

### OBJECT_BODY

    public static final java.lang.String OBJECT_BODY

See Also:
  Constant Field Values

### TEXT_BODY

    public static final java.lang.String TEXT_BODY

See Also:
  Constant Field Values

Constructor Detail

### Payload

    public Payload()

Method Detail

### bodyType

    public static final java.lang.String bodyType(Message msg)

### createBytesBody

    public static final BytesBody createBytesBody(Message msg)
                                           throws InvalidPayloadException

  Throws:
    `InvalidPayloadException`

### createMapBody

    public static final MapBody createMapBody(Message msg)
                                       throws InvalidPayloadException

  Throws:
    `InvalidPayloadException`

### createObjectBody

    public static final ObjectBody createObjectBody(Message msg)
                                             throws InvalidPayloadException

  Throws:
    `InvalidPayloadException`

### createTextBody

    public static final TextBody createTextBody(Message msg)
                                         throws InvalidPayloadException

  Throws:
    `InvalidPayloadException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD