Skip navigation links
eBus
4.5.0

Package net.sf.eBus.messages

Messages are the heart of eBus.

See: Description

Package net.sf.eBus.messages Description

Messages are the heart of eBus. The net.sf.eBus.client API is about sending and receiving messages. This package defines the eBus classes used to implement messages. This includes the abstract EMessageObject, EMessageHeader, EMessage, and EField classes combined with the EFieldInfo and EReplyInfo annotations used to define message layout. EMessage is the abstract base class for all actual messages. eBus messages are defined by:
  1. extending ENotifyMessage, ERequestMessage, or EReplyMessage
  2. defining the message fields as public final data members,
  3. supplying the EFieldInfo class annotation.
The data member types are limited to Java primitives or the equivalent classes (boolean/Boolean, char Character, int/Integer, etc.), supported Java classes (String, Date, BigDecimal, etc.) or a class which extends the EField class.

All user-defined message and EField subclasses must provide an EFieldInfo class annotation. This annotation defines the serialized field order. Also, message and field subclasses must provide a public constructor with parameters match the class and superclass field types and are in the same order as defined by the class and superclass EFieldInfo annotations. See EMessageObject and EMessage for detailed examples explaining this "de-serialization" constructor.

User-defined fields are classes which extend EField class. Fields have the same requirements as an eBus message: public final fields with an eBus-supported data type, @EFieldInfo annotation, and a public de-serialization constructor.

Skip navigation links
eBus
4.5.0