Package com.attivio.sdk.esb
Class MessageMetadata
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<K,V>
-
- com.attivio.sdk.util.BaseTypesMap<java.lang.String,java.lang.Object>
-
- com.attivio.sdk.esb.MessageMetadata
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,java.lang.Object>
public class MessageMetadata extends BaseTypesMap<java.lang.String,java.lang.Object> implements java.lang.Cloneable
Container for arbitrary metadata about a message. Extends LinkedHashMap in order to provide dependable iteration order for serialization purposes.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.util.BaseTypesMap
BaseTypesMap.BaseTypesEntry
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCGI_QUERY_STRING_PROPERTYstatic java.lang.StringREQUEST_IP_PROPERTY
-
Constructor Summary
Constructors Constructor Description MessageMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAll(java.util.Properties p)Adds all values from the properties object.MessageMetadataclone()Performs a deep clone of this map.booleancontainsKey(java.lang.Object key)booleanequals(java.lang.Object other)java.lang.Objectget(java.lang.Object key)java.lang.StringgetCgiQueryString()Gets the cgi query string.longgetEstimatedSize()java.lang.ObjectgetProperty(java.lang.String key)Gets a property.booleangetProperty(java.lang.String key, boolean defaultValue)Gets arbitrary boolean property from the query.intgetProperty(java.lang.String key, int defaultValue)Gets arbitrary integer property from the query.longgetProperty(java.lang.String key, long defaultValue)Gets arbitrary long property from the query.java.lang.StringgetProperty(java.lang.String key, java.lang.String defaultValue)Gets arbitrary String property from the query.java.lang.StringgetRequestIp()Gets the request ip.inthashCode()java.lang.Objectremove(java.lang.Object key)voidsetCgiQueryString(java.lang.String value)Sets the cgi query string.voidsetProperty(java.lang.String key, java.lang.Object value)Sets a property.voidsetRequestIp(java.lang.String value)Sets the request ip.java.util.PropertiestoProperties()Gets a new Properties object that represents this metadata object.-
Methods inherited from class com.attivio.sdk.util.BaseTypesMap
checkType, getEntries, put, putAll, setEntries
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putIfAbsent, remove, replace, replace, size
-
-
-
-
Field Detail
-
CGI_QUERY_STRING_PROPERTY
public static final java.lang.String CGI_QUERY_STRING_PROPERTY
- See Also:
- Constant Field Values
-
REQUEST_IP_PROPERTY
public static final java.lang.String REQUEST_IP_PROPERTY
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map<java.lang.String,java.lang.Object>- Overrides:
getin classjava.util.LinkedHashMap<java.lang.String,java.lang.Object>
-
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
removein interfacejava.util.Map<java.lang.String,java.lang.Object>- Overrides:
removein classjava.util.HashMap<java.lang.String,java.lang.Object>
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKeyin interfacejava.util.Map<java.lang.String,java.lang.Object>- Overrides:
containsKeyin classjava.util.HashMap<java.lang.String,java.lang.Object>
-
getProperty
public java.lang.Object getProperty(java.lang.String key)
Gets a property.- Parameters:
key- the key- Returns:
- the value
-
setProperty
public void setProperty(java.lang.String key, java.lang.Object value)Sets a property.- Parameters:
key- the keyvalue- the value
-
setCgiQueryString
public void setCgiQueryString(java.lang.String value)
Sets the cgi query string.- Parameters:
value- the value
-
getCgiQueryString
public java.lang.String getCgiQueryString()
Gets the cgi query string.- Returns:
- the value
-
setRequestIp
public void setRequestIp(java.lang.String value)
Sets the request ip.- Parameters:
value- the value
-
getRequestIp
public java.lang.String getRequestIp()
Gets the request ip.- Returns:
- the value
-
toProperties
public java.util.Properties toProperties()
Gets a new Properties object that represents this metadata object.- Returns:
- the data as a
Propertiesobject
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)Gets arbitrary String property from the query.- Parameters:
key- the keydefaultValue- the default value- Returns:
- the property value or the default value if not found
-
getProperty
public boolean getProperty(java.lang.String key, boolean defaultValue)Gets arbitrary boolean property from the query.- Parameters:
key- the keydefaultValue- the default value- Returns:
- the property value or the default value if not found
-
getProperty
public int getProperty(java.lang.String key, int defaultValue)Gets arbitrary integer property from the query.- Parameters:
key- the keydefaultValue- the default value- Returns:
- the property value or the default value if not found
-
getProperty
public long getProperty(java.lang.String key, long defaultValue)Gets arbitrary long property from the query.- Parameters:
key- the keydefaultValue- the default value- Returns:
- the property value or the default value if not found
-
addAll
public void addAll(java.util.Properties p)
Adds all values from the properties object.- Parameters:
p- the properties object to populate from
-
clone
public MessageMetadata clone()
Performs a deep clone of this map.- Overrides:
clonein classBaseTypesMap<java.lang.String,java.lang.Object>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Map<java.lang.String,java.lang.Object>- Overrides:
hashCodein classjava.util.AbstractMap<java.lang.String,java.lang.Object>
-
equals
public boolean equals(java.lang.Object other)
- Specified by:
equalsin interfacejava.util.Map<java.lang.String,java.lang.Object>- Overrides:
equalsin classjava.util.AbstractMap<java.lang.String,java.lang.Object>
-
getEstimatedSize
public long getEstimatedSize()
-
-