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.listeners.message
Interface MessageComposer<T>

All Known Implementing Classes:
  AbstractMessageComposer, BasicMessageComposer, FileStreamSplitter, JBossRemotingGatewayListener.JBossRemotingMessageComposer, LocalFileMessageComposer, LocalFileNameMessageComposer, RemoteFileMessageComposer, RemoteFileNameMessageComposer

    public interface MessageComposer<T>

Message composer.

A "Composer" is basically a "Builder" ala the GoF patterns.

Implementations should be threadsafe (stateless) and must contain a public default constructor.

Author:
  tom.fennelly@jboss.com

Nested Class Summary
`static class` | `MessageComposer.Factory` Uitility factory class for reflective `MessageComposer` construction.

Method Summary
`Message` | `compose(T messagePayload)` Compose an ESB "aware" message from the supplied message payload.
`java.lang.Object` | `decompose(Message message, T originalInputMessagePayload)` Decompose an ESB "aware" message, extracting and returning the message payload.
`void` | `setConfiguration(ConfigTree config)` Set the composer's configuration.

Method Detail

### setConfiguration

    void setConfiguration(ConfigTree config)
                          throws ConfigurationException

  Set the composer's configuration.

  Parameters:
    `config` - Composer configuration.
  Throws:
    `ConfigurationException` - Bad configuration.

### compose

    Message compose(T messagePayload)
                    throws MessageDeliverException

  Compose an ESB "aware" message from the supplied message payload.

  Implementations need to construct and populate an ESB Message from the messagePayload instance.

  Parameters:
    `messagePayload` - Message payload to be packaged, or a channel specific container class for the message payload (e.g. a JMS message).
  Returns:
    ESB aware message instance.
  Throws:
    `MessageDeliverException` - Failed to compose message payload for delivery.

### decompose

    java.lang.Object decompose(Message message,
                               T originalInputMessagePayload)
                               throws MessageDeliverException

  Decompose an ESB "aware" message, extracting and returning the message payload.

  Parameters:
    `message` - ESB aware message instance to be decomposed.
    `originalInputMessagePayload` - The original input message payload used to compose this (or ther original) message. The original message can sometimes contain information relevant during the decomposition process. Whether or not this parameter can be null depends on the MessageComposer implementation.
  Returns:
    ESB unaware message instance - a message payload.
  Throws:
    `MessageDeliverException` - Failed to decompose message payload.

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