Package com.attivio.sdk.esb
Class PropertiesMessage
- java.lang.Object
-
- com.attivio.sdk.esb.AbstractPlatformMessage
-
- com.attivio.sdk.esb.PropertiesMessage
-
- All Implemented Interfaces:
PlatformMessage
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<java.lang.String>
public class PropertiesMessage extends AbstractPlatformMessage implements java.lang.Iterable<java.lang.String>
Properties messages contain a set of properties to be delivered to a component. These properties can be used to update configuration or kick off a process based on the settings in the message.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.attivio.sdk.esb.PlatformMessage
DEFAULT_MAX_LOG_LENGTH, MESSAGE_DROPPED, MESSAGE_SEND_TIME_PROP, PROP_MAX_LOG_LENGTH
-
-
Constructor Summary
Constructors Constructor Description PropertiesMessage(java.util.UUID cid)
Constructor.PropertiesMessage(java.util.UUID cid, java.lang.Object... args)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
boolean
getProperty(java.lang.String key, boolean defaultVal)
Gets a boolean property from this message, or boolean default if it doesn't exist or is null to begin with.int
getProperty(java.lang.String key, int defaultVal)
Get an integer property from this message, or int default if it doesn't exist or is null to begin with.long
getProperty(java.lang.String key, long defaultVal)
Gets a long property from this message, or long default if it doesn't exist or is null to begin with.java.lang.String
getProperty(java.lang.String key, java.lang.String defaultVal)
Gets a String property from this message, or default if it doesn't exist or is null to begin withint
hashCode()
java.util.Iterator<java.lang.String>
iterator()
Gets an iterator to iterate over property key names.-
Methods inherited from class com.attivio.sdk.esb.AbstractPlatformMessage
addMessageHistory, addMessageHistory, clone, getClientId, getEstimatedSize, getMessageHistory, getMessageId, getMetadata, getProperty, getProperty, getWorkflowQueue, getWorkflowQueue, hasProperty, isRedelivered, removeProperty, removeWorkflowQueue, setClientId, setMessageId, setProperty, setRedelivered, setWorkflowQueue, setWorkflowQueue, toMessageString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString
-
-
-
-
Constructor Detail
-
PropertiesMessage
public PropertiesMessage(java.util.UUID cid)
Constructor. Creates a new properties message with the given client ID and no initial properties set. Properties can be added later on with the setProperty method.- Parameters:
cid
- the client ID
-
PropertiesMessage
public PropertiesMessage(java.util.UUID cid, java.lang.Object... args)
Constructor. Creates a new properties message with the given client ID and properties specified.Properties should be given as pairs of name,value arguments.
For example:
new PropertiesMessage("clientid", "myproperty", "thevalue", "anotherprop", "anotherval")
- Parameters:
cid
- the client IDargs
- the arguments
-
-
Method Detail
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultVal)
Gets a String property from this message, or default if it doesn't exist or is null to begin with- Overrides:
getProperty
in classAbstractPlatformMessage
- Parameters:
key
- the keydefaultVal
- the default value- Returns:
- the property value or the default if not found
-
getProperty
public boolean getProperty(java.lang.String key, boolean defaultVal)
Gets a boolean property from this message, or boolean default if it doesn't exist or is null to begin with. The value will be returned as a boolean- Overrides:
getProperty
in classAbstractPlatformMessage
- Parameters:
key
- the keydefaultVal
- the default value- Returns:
- the property value or the default if not found
-
getProperty
public long getProperty(java.lang.String key, long defaultVal)
Gets a long property from this message, or long default if it doesn't exist or is null to begin with. The value will be returned as a long.- Overrides:
getProperty
in classAbstractPlatformMessage
- Parameters:
key
- the keydefaultVal
- the default value- Returns:
- the property value or the default if not found
-
getProperty
public int getProperty(java.lang.String key, int defaultVal)
Get an integer property from this message, or int default if it doesn't exist or is null to begin with. The value will be returned as a int.- Overrides:
getProperty
in classAbstractPlatformMessage
- Parameters:
key
- the keydefaultVal
- the default value- Returns:
- the property value or the default if not found
-
iterator
public java.util.Iterator<java.lang.String> iterator()
Gets an iterator to iterate over property key names.- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.String>
- Returns:
- the property key name iterator
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractPlatformMessage
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classAbstractPlatformMessage
-
-