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)
HandlerAttributes
attributeKey
. Might be null
if there is no attribute present
for the given key.get
in interface HandlerAttributes
R
- the type of attribute to retrieveattributeKey
- the attribute key to retrieve an attribute forattributeKey
public Map<String,Object> getAll()
HandlerAttributes
HandlerAttributes
object.getAll
in interface HandlerAttributes
HandlerAttributes
objectpublic boolean contains(String attributeKey)
HandlerAttributes
attributeKey
is present in this object.contains
in interface HandlerAttributes
attributeKey
- 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()
HandlerAttributes
isEmpty
in interface HandlerAttributes
true
if there are no attributes present, false
otherwisepublic HandlerAttributes mergedWith(HandlerAttributes other)
HandlerAttributes
HandlerAttributes
, 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 HandlerAttributes
other
- the HandlerAttributes
to group with this
instance's attributesHandlerAttributes
combining this
instance's attributes and the given other
attributesCopyright © 2010–2022. All rights reserved.