Package jadex.bridge.component.impl
Class MsgHeader
- java.lang.Object
-
- jadex.bridge.component.impl.MsgHeader
-
- All Implemented Interfaces:
IMsgHeader
public class MsgHeader extends java.lang.Object implements IMsgHeader
Message header with message meta information.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>
properties
Map containing properties.-
Fields inherited from interface jadex.bridge.component.IMsgHeader
CONVERSATION_ID, RECEIVER, SENDER, XID
-
-
Constructor Summary
Constructors Constructor Description MsgHeader()
Creates the header.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(java.lang.String propname, java.lang.Object propval)
Adds a header property to the header.java.util.Map<java.lang.String,java.lang.Object>
getProperties()
Gets the properties.java.lang.Object
getProperty(java.lang.String propertyname)
Gets a property stored in the header.IComponentIdentifier
getReceiver()
Gets the receiver of the message.IComponentIdentifier
getSender()
Gets the sender of the message.void
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Sets the properties.java.lang.String
toString()
Get the string rep.
-
-
-
Method Detail
-
getSender
public IComponentIdentifier getSender()
Gets the sender of the message.- Specified by:
getSender
in interfaceIMsgHeader
- Returns:
- The sender.
-
getReceiver
public IComponentIdentifier getReceiver()
Gets the receiver of the message.- Specified by:
getReceiver
in interfaceIMsgHeader
- Returns:
- The receiver.
-
getProperty
public java.lang.Object getProperty(java.lang.String propertyname)
Gets a property stored in the header.- Specified by:
getProperty
in interfaceIMsgHeader
- Parameters:
propertyname
- The name of the property.- Returns:
- Property value.
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Gets the properties.- Returns:
- The properties map.
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Sets the properties.- Parameters:
properties
- The properties map.
-
addProperty
public void addProperty(java.lang.String propname, java.lang.Object propval)
Adds a header property to the header.- Specified by:
addProperty
in interfaceIMsgHeader
- Parameters:
propname
- The property name.propval
- The property value.
-
toString
public java.lang.String toString()
Get the string rep.- Overrides:
toString
in classjava.lang.Object
-
-