public class SimpleHandlerAttributes extends Object implements HandlerAttributes
HandlerAttributes which is given the attributes in the constructor.AGGREGATE_CREATION_POLICY, ALLOW_REPLAY, COMMAND_NAME, COMMAND_ROUTING_KEY, EXCEPTION_RESULT_TYPE, FORCE_NEW_SAGA, MESSAGE_TYPE, PAYLOAD_TYPE, QUERY_NAME, RESULT_TYPE, SAGA_ASSOCIATION_PROPERTY, SAGA_ASSOCIATION_PROPERTY_KEY_NAME, SAGA_ASSOCIATION_RESOLVER, SHUTDOWN_PHASE, START_PHASE| Constructor and Description |
|---|
SimpleHandlerAttributes(Map<String,Object> attributes)
Constructs a
SimpleHandlerAttributes using the given attributes. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String attributeKey)
Validates whether the given
attributeKey is present in this object. |
boolean |
equals(Object o) |
<R> R |
get(String attributeKey)
Retrieve the attribute for the given
attributeKey. |
Map<String,Object> |
getAll()
Retrieve all attributes stored in this
HandlerAttributes object. |
int |
hashCode() |
boolean |
isEmpty()
Validate whether zero attributes are present in this object.
|
HandlerAttributes |
mergedWith(HandlerAttributes other)
|
String |
toString() |
public SimpleHandlerAttributes(Map<String,Object> attributes)
SimpleHandlerAttributes using the given attributes. Changes made on the given attributes after construction of a SimpleHandlerAttributes are not reflected by the constructed
instance.attributes - the attributes for this HandlerAttributes implementationpublic <R> R get(String attributeKey)
HandlerAttributesattributeKey. Might be null if there is no attribute present
for the given key.get in interface HandlerAttributesR - the type of attribute to retrieveattributeKey - the attribute key to retrieve an attribute forattributeKeypublic Map<String,Object> getAll()
HandlerAttributesHandlerAttributes object.getAll in interface HandlerAttributesHandlerAttributes objectpublic boolean contains(String attributeKey)
HandlerAttributesattributeKey is present in this object.contains in interface HandlerAttributesattributeKey - the attribute key to validate if it is present in this objecttrue if there is an attribute for the given attributeKey present, false otherwisepublic boolean isEmpty()
HandlerAttributesisEmpty in interface HandlerAttributestrue if there are no attributes present, false otherwisepublic HandlerAttributes mergedWith(HandlerAttributes other)
HandlerAttributesHandlerAttributes, merging the attributes in this instance with the given attributes. If this and other have identical entries, the values from other will take
precedence.mergedWith in interface HandlerAttributesother - the HandlerAttributes to group with this instance's attributesHandlerAttributes combining this instance's attributes and the given other
attributesCopyright © 2010–2023. All rights reserved.