org.jboss.soa.esb.message.format
Class MessageFactory
java.lang.Object
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.
Different ways of viewing and manipulating the Message Body (payload) are available separately
via the Payload class. In future releases it will be possible to define the payload type at
creation time.
- Author:
- Mark Little
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageFactory
public MessageFactory()
getMessage
public abstract Message getMessage()
- Returns:
- the 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.
createBodyType
public abstract java.lang.Object createBodyType(Message m,
java.lang.String bodyType)
- Given a Message, return the Body component as a specific type for
manipulation, e.g., TextMessage or BytesMessage.
- Parameters:
m - the MessagebodyType - the type of Body to "cast" to.
- Returns:
- the Body.
getInstance
public static MessageFactory getInstance()