public class PropertyMessage extends SubjectMessage implements EventParser, IPropertyMessage
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.locks.Lock |
lock |
static MessageType |
MSG_TYPE_PROPERTY |
protected java.util.Map<java.lang.String,java.io.Serializable> |
propertyMap |
protected java.util.Collection<java.lang.String> |
removedProperties |
oid
flags, msgId, msgInstanceOid, msgType, remoteAgent
Constructor and Description |
---|
PropertyMessage() |
PropertyMessage(MessageType msgType) |
PropertyMessage(MessageType msgType,
OID objOid) |
PropertyMessage(OID objOid) |
PropertyMessage(OID objOid,
OID notifyOid) |
Modifier and Type | Method and Description |
---|---|
protected static int |
addPropertyStringElement(java.lang.String key,
java.io.Serializable val,
java.util.List<java.lang.String> propStrings,
java.lang.String version,
int len) |
boolean |
containsKey(java.lang.String key)
Return true of the message contains the key argument; false otherwise
|
static int |
createFilteredPropertyString(java.util.List<java.lang.String> propStrings,
java.util.Map<java.lang.String,java.io.Serializable> propertyMap,
java.lang.String version,
java.util.Set<java.lang.String> filteredProps) |
static int |
createPropertyString(java.util.List<java.lang.String> propStrings,
java.util.Map<java.lang.String,java.io.Serializable> propertyMap,
java.lang.String version)
Input parameter propStrings must be an empty list.
|
void |
fromBuffer(AOByteBuffer buf) |
java.io.Serializable |
get(java.lang.String key)
Deprecated.
Use
getProperty(String key) instead |
Namespace |
getNamespace() |
java.io.Serializable |
getProperty(java.lang.String key)
Return the value associated with a key.
|
java.util.Map<java.lang.String,java.io.Serializable> |
getPropertyMapRef() |
java.util.Collection<java.lang.String> |
getRemovedPropertiesRef() |
boolean |
hasProperty(java.lang.String key) |
java.util.Set<java.lang.String> |
keySet() |
void |
parseBytes(AOByteBuffer buf) |
void |
put(java.lang.String key,
java.io.Serializable val)
Deprecated.
Use
setProperty(String key, Serializable val) instead |
void |
removeProperty(java.lang.String key)
Remove the value with the key.
|
void |
setNamespace(Namespace namespace)
namespace is used to break up the property namespace. a single object
has multiple property namespaces. this breaks up the object so that
different plugins can manage different namespaces. for example, the
combat plugin is authoritative for the combatdata namespace. it knows
that it can change these values without talking to any other plugins.
|
void |
setProperty(java.lang.String key,
java.io.Serializable val)
Associate the value with the key.
|
void |
setProperty(java.lang.String key,
java.io.Serializable val,
boolean clone)
Associate the value with the key.
|
AOByteBuffer |
toBuffer(java.lang.String version) |
AOByteBuffer |
toBuffer(java.lang.String version,
java.util.Map<java.lang.String,java.io.Serializable> propMap,
java.util.Collection<java.lang.String> removedSet,
java.util.Set<java.lang.String> filteredProps) |
AOByteBuffer |
toBuffer(java.lang.String version,
java.util.Set<java.lang.String> filteredProps) |
java.lang.String |
toString() |
static java.util.Map<java.lang.String,java.io.Serializable> |
unmarshallProperyMap(AOByteBuffer buffer) |
getSubject, setSubject
getEnqueueTime, getMsgId, getMsgInstanceOid, getMsgType, getSenderName, isRPC, setEnqueueTime, setEnqueueTime, setMsgInstanceOid, setMsgType, toBytes, toBytes, toBytes, ToString
protected transient java.util.concurrent.locks.Lock lock
protected java.util.Map<java.lang.String,java.io.Serializable> propertyMap
protected java.util.Collection<java.lang.String> removedProperties
public static MessageType MSG_TYPE_PROPERTY
public PropertyMessage()
public PropertyMessage(MessageType msgType)
public PropertyMessage(OID objOid)
public PropertyMessage(MessageType msgType, OID objOid)
public java.lang.String toString()
toString
in class SubjectMessage
public void setNamespace(Namespace namespace)
namespace
- the namespacepublic Namespace getNamespace()
@Deprecated public void put(java.lang.String key, java.io.Serializable val)
setProperty(String key, Serializable val)
insteadpublic void setProperty(java.lang.String key, java.io.Serializable val)
setProperty
in interface IPropertyMessage
key
- A String key.val
- A Serializable value.public void setProperty(java.lang.String key, java.io.Serializable val, boolean clone)
key
- A String key.val
- A Serializable value.clone
- - whether a deep clone of this object is added to the property map insteadpublic void removeProperty(java.lang.String key)
removeProperty
in interface IPropertyMessage
key
- A String key.public boolean containsKey(java.lang.String key)
key
- The key to look for@Deprecated public java.io.Serializable get(java.lang.String key)
getProperty(String key)
insteadpublic java.io.Serializable getProperty(java.lang.String key)
getProperty
in interface IPropertyMessage
key
- A String key.public java.util.Set<java.lang.String> keySet()
public boolean hasProperty(java.lang.String key)
public AOByteBuffer toBuffer(java.lang.String version)
public AOByteBuffer toBuffer(java.lang.String version, java.util.Set<java.lang.String> filteredProps)
public AOByteBuffer toBuffer(java.lang.String version, java.util.Map<java.lang.String,java.io.Serializable> propMap, java.util.Collection<java.lang.String> removedSet, java.util.Set<java.lang.String> filteredProps)
public void fromBuffer(AOByteBuffer buf)
public void parseBytes(AOByteBuffer buf)
parseBytes
in interface EventParser
public java.util.Map<java.lang.String,java.io.Serializable> getPropertyMapRef()
public java.util.Collection<java.lang.String> getRemovedPropertiesRef()
public static int createPropertyString(java.util.List<java.lang.String> propStrings, java.util.Map<java.lang.String,java.io.Serializable> propertyMap, java.lang.String version)
propStrings
- public static int createFilteredPropertyString(java.util.List<java.lang.String> propStrings, java.util.Map<java.lang.String,java.io.Serializable> propertyMap, java.lang.String version, java.util.Set<java.lang.String> filteredProps)
protected static int addPropertyStringElement(java.lang.String key, java.io.Serializable val, java.util.List<java.lang.String> propStrings, java.lang.String version, int len)
public static java.util.Map<java.lang.String,java.io.Serializable> unmarshallProperyMap(AOByteBuffer buffer)