org.jboss.soa.esb.listeners.gateway
Class RemoteFileMessageComposer

java.lang.Object
  extended by org.jboss.soa.esb.listeners.gateway.RemoteFileMessageComposer
All Implemented Interfaces:
MessageComposer

public class RemoteFileMessageComposer
extends java.lang.Object
implements MessageComposer

Remote File Message Composer.

The logic in this class was lifeted from RemoteGatewayListener.

Author:
tom.fennelly@jboss.com
See Also:
LocalFileMessageComposer

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.soa.esb.listeners.message.MessageComposer
MessageComposer.Factory
 
Constructor Summary
RemoteFileMessageComposer()
           
 
Method Summary
 Message compose(java.lang.Object messagePayload)
          Compose an ESB "aware" message from the supplied message payload.
 java.lang.Object decompose(Message message)
          Decompose an ESB "aware" message, extracting and returning the message payload.
 void setConfiguration(ConfigTree config)
          Set the conposer's configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteFileMessageComposer

public RemoteFileMessageComposer()
Method Detail

setConfiguration

public void setConfiguration(ConfigTree config)
                      throws ConfigurationException
Description copied from interface: MessageComposer
Set the conposer's configuration.

Specified by:
setConfiguration in interface MessageComposer
Parameters:
config - Composer configuration.
Throws:
ConfigurationException - Bad configuration.

compose

public Message compose(java.lang.Object messagePayload)
                throws MessageDeliverException
Description copied from interface: MessageComposer
Compose an ESB "aware" message from the supplied message payload.

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

Specified by:
compose in interface MessageComposer
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

public java.lang.Object decompose(Message message)
                           throws MessageDeliverException
Description copied from interface: MessageComposer
Decompose an ESB "aware" message, extracting and returning the message payload.

Specified by:
decompose in interface MessageComposer
Parameters:
message - ESB aware message instance to be decomposed.
Returns:
ESB unaware message instance - a message payload.
Throws:
MessageDeliverException - Failed to decompose message payload.