Package org.axonframework.messaging.core
Class SimpleHandlerAttributes
java.lang.Object
org.axonframework.messaging.core.SimpleHandlerAttributes
- All Implemented Interfaces:
HandlerAttributes
Simple implementation of the
HandlerAttributes which is given the attributes in the constructor.- Since:
- 4.5
- Author:
- Steven van Beelen
-
Field Summary
Fields inherited from interface org.axonframework.messaging.core.annotation.HandlerAttributes
AGGREGATE_CREATION_POLICY, ALLOW_REPLAY, COMMAND_NAME, COMMAND_NAME_PATTERN, COMMAND_ROUTING_KEY, DEADLINE_NAME, EVENT_NAME, 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 -
Constructor Summary
ConstructorsConstructorDescriptionSimpleHandlerAttributes(Map<String, Object> attributes) Constructs aSimpleHandlerAttributesusing the givenattributes. -
Method Summary
Modifier and TypeMethodDescriptionbooleanValidates whether the givenattributeKeyis present in this object.boolean<R> RRetrieve the attribute for the givenattributeKey.getAll()Retrieve all attributes stored in thisHandlerAttributesobject.inthashCode()booleanisEmpty()Validate whether zero attributes are present in this object.mergedWith(HandlerAttributes other) Returns aHandlerAttributes, merging the attributes inthisinstance with the givenattributes.toString()
-
Constructor Details
-
SimpleHandlerAttributes
Constructs aSimpleHandlerAttributesusing the givenattributes. Changes made on the givenattributesafter construction of aSimpleHandlerAttributesare not reflected by the constructed instance.- Parameters:
attributes- the attributes for thisHandlerAttributesimplementation
-
-
Method Details
-
get
Description copied from interface:HandlerAttributesRetrieve the attribute for the givenattributeKey. Might benullif there is no attribute present for the given key.- Specified by:
getin interfaceHandlerAttributes- Type Parameters:
R- the type of attribute to retrieve- Parameters:
attributeKey- the attribute key to retrieve an attribute for- Returns:
- the attribute for the given
attributeKey
-
getAll
Description copied from interface:HandlerAttributesRetrieve all attributes stored in thisHandlerAttributesobject.- Specified by:
getAllin interfaceHandlerAttributes- Returns:
- all attributes stored in this
HandlerAttributesobject
-
contains
Description copied from interface:HandlerAttributesValidates whether the givenattributeKeyis present in this object.- Specified by:
containsin interfaceHandlerAttributes- Parameters:
attributeKey- the attribute key to validate if it is present in this object- Returns:
trueif there is an attribute for the givenattributeKeypresent,falseotherwise
-
isEmpty
public boolean isEmpty()Description copied from interface:HandlerAttributesValidate whether zero attributes are present in this object.- Specified by:
isEmptyin interfaceHandlerAttributes- Returns:
trueif there are no attributes present,falseotherwise
-
mergedWith
Description copied from interface:HandlerAttributesReturns aHandlerAttributes, merging the attributes inthisinstance with the givenattributes. Ifthisandotherhave identical entries, the values fromotherwill take precedence.- Specified by:
mergedWithin interfaceHandlerAttributes- Parameters:
other- TheHandlerAttributesto group withthisinstance's attributes.- Returns:
- A
HandlerAttributescombiningthisinstance's attributes and the givenotherattributes.
-
equals
-
hashCode
public int hashCode() -
toString
-