Package jadex.serialization
Class MsgHeader
java.lang.Object
jadex.serialization.MsgHeader
- All Implemented Interfaces:
IMsgHeader
Message header with message meta information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionMap containing properties.Fields inherited from interface jadex.serialization.IMsgHeader
CONVERSATION_ID, RECEIVER, SENDER, XID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String propname, Object propval) Adds a header property to the header.Gets the properties.getProperty(String propertyname) Gets a property stored in the header.jadex.core.ComponentIdentifierGets the receiver of the message.jadex.core.ComponentIdentifierGets the sender of the message.voidsetProperties(Map<String, Object> properties) Sets the properties.toString()Get the string rep.
-
Field Details
-
properties
Map containing properties.
-
-
Constructor Details
-
MsgHeader
public MsgHeader()Creates the header.
-
-
Method Details
-
getSender
public jadex.core.ComponentIdentifier getSender()Gets the sender of the message.- Specified by:
getSenderin interfaceIMsgHeader- Returns:
- The sender.
-
getReceiver
public jadex.core.ComponentIdentifier getReceiver()Gets the receiver of the message.- Specified by:
getReceiverin interfaceIMsgHeader- Returns:
- The receiver.
-
getProperty
Gets a property stored in the header.- Specified by:
getPropertyin interfaceIMsgHeader- Parameters:
propertyname- The name of the property.- Returns:
- Property value.
-
getProperties
Gets the properties.- Returns:
- The properties map.
-
setProperties
Sets the properties.- Parameters:
properties- The properties map.
-
addProperty
Adds a header property to the header.- Specified by:
addPropertyin interfaceIMsgHeader- Parameters:
propname- The property name.propval- The property value.
-
toString
Get the string rep.
-