org.jboss.soa.esb.message.format
Class MessageFactory

java.lang.Object
  extended by org.jboss.soa.esb.message.format.MessageFactory

public abstract class MessageFactory
extends java.lang.Object

You get a message of a specific type when you need it. Obviously that type may not be suitable for the service (hopefully you've got that contractual information a priori, but maybe not) and in which case some translation/transformation may be necessary.

Author:
Mark Little

Constructor Summary
MessageFactory()
           
 
Method Summary
static MessageFactory getInstance()
           
abstract  Message getMessage()
           
abstract  Message getMessage(Message msg, java.net.URI type)
           
abstract  Message getMessage(java.net.URI type)
           
abstract  void reset()
          Reload the plugins.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageFactory

public MessageFactory()
Method Detail

getMessage

public abstract Message getMessage()
Returns:
some default implementation.

getMessage

public abstract Message getMessage(java.net.URI type)
Parameters:
type - the unique identifier representing the type of this message.
Returns:
the message, or null if no suitable plugin is available.

getMessage

public abstract Message getMessage(Message msg,
                                   java.net.URI type)
Parameters:
msg - the message to convert.
type - the type of the message we want to convert to.
Returns:
a translated message, or null if no suitable plugin is available.

reset

public abstract void reset()
Reload the plugins.


getInstance

public static MessageFactory getInstance()