|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ikasan.framework.event.serialisation.DefaultMapMessageEventSerialiser
public class DefaultMapMessageEventSerialiser
Default implementation for converting an Event to and from a MapMessage
| Field Summary | |
|---|---|
protected static String |
ATTRIBUTE_PREFIX
|
protected static String |
EVENT_FIELD_ID
|
protected static String |
EVENT_FIELD_PRIORITY
|
protected static String |
EVENT_FIELD_SRC_SYSTEM
|
protected static String |
EVENT_FIELD_TIMESTAMP
|
protected static String |
PAYLOAD_CONTENT_SUFFIX
|
protected static String |
PAYLOAD_ID_SUFFIX
|
protected static String |
PAYLOAD_PREFIX
|
protected static String |
PAYLOAD_SPEC_SUFFIX
|
protected static String |
PAYLOAD_SRC_SYSTEM_SUFFIX
|
protected PayloadFactory |
payloadFactory
Payload factory, only needed for deserialisation |
| Constructor Summary | |
|---|---|
DefaultMapMessageEventSerialiser()
|
|
| Method Summary | |
|---|---|
protected Event |
demapEvent(javax.jms.MapMessage mapMessage,
String moduleName,
String componentName,
List<Payload> payloads,
List<String> eventFieldNames)
|
protected Payload |
demapPayload(int payloadOrdinal,
javax.jms.MapMessage mapMessage,
List<String> payloadFieldNames)
|
Event |
fromMessage(javax.jms.MapMessage mapMessage,
String moduleName,
String componentName)
Deserialises a previously existing Event from a MapMessage |
protected List<List<String>> |
groupMapNames(Enumeration<String> mapNames)
Helper method that groups the keys to all map entries into Lists by thier payload, and lists these in payload order, starting with a List of non payload (event level) fields. |
void |
setPayloadFactory(PayloadFactory payloadFactory)
Allows the payloadFactory to be supplied. |
javax.jms.MapMessage |
toMessage(Event event,
javax.jms.Session session)
Serialises an Event to a MapMessage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String PAYLOAD_PREFIX
protected static final String ATTRIBUTE_PREFIX
protected static final String PAYLOAD_CONTENT_SUFFIX
protected static final String PAYLOAD_SRC_SYSTEM_SUFFIX
protected static final String PAYLOAD_ID_SUFFIX
protected static final String PAYLOAD_SPEC_SUFFIX
protected static final String EVENT_FIELD_ID
protected static final String EVENT_FIELD_PRIORITY
protected static final String EVENT_FIELD_TIMESTAMP
protected static final String EVENT_FIELD_SRC_SYSTEM
protected PayloadFactory payloadFactory
| Constructor Detail |
|---|
public DefaultMapMessageEventSerialiser()
| Method Detail |
|---|
public Event fromMessage(javax.jms.MapMessage mapMessage,
String moduleName,
String componentName)
throws javax.jms.JMSException,
EventDeserialisationException
JmsMessageEventSerialiserEvent from a MapMessage
fromMessage in interface JmsMessageEventSerialiser<javax.jms.MapMessage>mapMessage - - message to deserialisemoduleName - - name of the module that is reconstituting the Event - this gets set on the EventcomponentName - - name of the component/initiator that is reconstituting the Event - this gets set on the
Event
Event
javax.jms.JMSException - if we could not deserialise the event
EventDeserialisationException
protected Event demapEvent(javax.jms.MapMessage mapMessage,
String moduleName,
String componentName,
List<Payload> payloads,
List<String> eventFieldNames)
throws javax.jms.JMSException,
EventDeserialisationException
javax.jms.JMSException
EventDeserialisationException
protected Payload demapPayload(int payloadOrdinal,
javax.jms.MapMessage mapMessage,
List<String> payloadFieldNames)
throws javax.jms.JMSException,
EventDeserialisationException
javax.jms.JMSException
EventDeserialisationExceptionprotected List<List<String>> groupMapNames(Enumeration<String> mapNames)
mapNames -
public javax.jms.MapMessage toMessage(Event event,
javax.jms.Session session)
throws javax.jms.JMSException
JmsMessageEventSerialiserEvent to a MapMessage
toMessage in interface JmsMessageEventSerialiser<javax.jms.MapMessage>event - The event to turn into a JMS MapMessagesession - The session
javax.jms.JMSExceptionJmsMessageEventSerialiser.toMessage(org.ikasan.framework.component.Event, javax.jms.Session)public void setPayloadFactory(PayloadFactory payloadFactory)
payloadFactory -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||