public abstract class BaseEventSerializer
extends java.lang.Object
Each BE channel type has its own implementation of
BaseEventSerializer
, which is used by the channel's destinations
to transform outgoing events into messages and incoming messages into events.
BaseChannel
,
BaseDestination
Modifier and Type | Method and Description |
---|---|
abstract Event |
deserializeUserEvent(java.lang.Object message,
java.util.Map properties)
Transforms a message received by the Destination of the given context into an
Event |
abstract void |
initUserEventSerializer(java.lang.String destinationName,
java.util.Properties destinationProperties,
Logger logger)
Initializes the serializer.It is called at the time of engine startup
|
abstract java.lang.Object |
serializeUserEvent(EventWithId event,
java.util.Map properties)
Transforms an
Event into a message that can be sent by the
Destination of that context. |
public abstract void initUserEventSerializer(java.lang.String destinationName, java.util.Properties destinationProperties, Logger logger)
destinationName
- name of the destinationdestinationProperties
- the properties of the destinationlogger
- the logger instancepublic abstract Event deserializeUserEvent(java.lang.Object message, java.util.Map properties)
Event
message
- an Object representing an incoming message in the
Destination's transport.properties
- de-serialization propertiesEvent
that represents the incoming messagejava.lang.Exception
- if an Event
could not be created.public abstract java.lang.Object serializeUserEvent(EventWithId event, java.util.Map properties)
Event
into a message that can be sent by the
Destination of that context.event
- an Event
properties
- serialization propertiesjava.lang.Exception
- if the message Object could not be created.