org.ikasan.framework.event.serialisation
Interface JmsMessageEventSerialiser<T extends javax.jms.Message>

All Known Implementing Classes:
DefaultMapMessageEventSerialiser

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

Serialisation/Deserialisation interface for converting between Event and some specified Message implementation

Author:
Ikasan Development Team

Method Summary
 Event fromMessage(T message, String moduleName, String componentName)
          Deserialises a previously existing Event from a MapMessage
 T toMessage(Event event, javax.jms.Session session)
          Serialises an Event to a MapMessage
 

Method Detail

fromMessage

Event fromMessage(T message,
                  String moduleName,
                  String componentName)
                  throws javax.jms.JMSException,
                         EventDeserialisationException
Deserialises a previously existing Event from a MapMessage

Parameters:
message - - message to deserialise
moduleName - - name of the module that is reconstituting the Event - this gets set on the Event
componentName - - name of the component/initiator that is reconstituting the Event - this gets set on the Event
Returns:
reconstituted Event
Throws:
EventDeserialisationException
javax.jms.JMSException - if we could not deserialise the event

toMessage

T toMessage(Event event,
            javax.jms.Session session)
                                      throws javax.jms.JMSException
Serialises an Event to a MapMessage

Parameters:
event - The event to turn into a JMS MapMessage
session - The session
Returns:
Message - ready to go!
Throws:
EventDeserialisationException - Exception if we could not serialise the event
javax.jms.JMSException


Copyright © 2007-2012 Ikasan. All Rights Reserved.