org.ikasan.framework.payload.serialisation
Interface JmsMessagePayloadSerialiser<T extends javax.jms.Message>

Type Parameters:
T - - A class that extends Message
All Known Implementing Classes:
TextMessagePayloadSerialiser

public interface JmsMessagePayloadSerialiser<T extends javax.jms.Message>

Serialisation/Deserialisation interface for converting a Payload to and from a JMS Message

Author:
Ikasan Development Team

Method Summary
 Class<? extends javax.jms.Message> getSupportedMessageType()
          Get the supported message type
 boolean supports(Class<? extends javax.jms.Message> messageClass)
          Indicates if a particular Message implementation is supported
 T toMessage(Payload payload, javax.jms.Session session)
          Converts a Payload to a Message
 Payload toPayload(T message)
          Converts a Message to a Payload
 

Method Detail

toMessage

T toMessage(Payload payload,
            javax.jms.Session session)
                                      throws javax.jms.JMSException
Converts a Payload to a Message

Parameters:
payload - - Payload to convert into a Message
session - - JMS Session we're in
Returns:
a Message
Throws:
javax.jms.JMSException - - JMS related exception

toPayload

Payload toPayload(T message)
                  throws javax.jms.JMSException
Converts a Message to a Payload

Parameters:
message - - Message to convert into a Payload
Returns:
a Payload
Throws:
javax.jms.JMSException - - JMS related exception

supports

boolean supports(Class<? extends javax.jms.Message> messageClass)
Indicates if a particular Message implementation is supported

Parameters:
messageClass - - A class that extends Message
Returns:
true if the given message class is supported

getSupportedMessageType

Class<? extends javax.jms.Message> getSupportedMessageType()
Get the supported message type

Returns:
the supported message type


Copyright © 2007-2012 Ikasan. All Rights Reserved.