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 TypeMethodDescriptionvoid
addProperty
(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.ComponentIdentifier
Gets the receiver of the message.jadex.core.ComponentIdentifier
Gets the sender of the message.void
setProperties
(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:
getSender
in interfaceIMsgHeader
- Returns:
- The sender.
-
getReceiver
public jadex.core.ComponentIdentifier getReceiver()Gets the receiver of the message.- Specified by:
getReceiver
in interfaceIMsgHeader
- Returns:
- The receiver.
-
getProperty
Gets a property stored in the header.- Specified by:
getProperty
in 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:
addProperty
in interfaceIMsgHeader
- Parameters:
propname
- The property name.propval
- The property value.
-
toString
Get the string rep.
-