public interface HandlerAttributes
MessageHandlingMember
implementations. Stores handler attributes in a Map
of String
to Object
. Some default keys
used by HandlerAttributes
implementations, like MESSAGE_TYPE
can be used to get(String)
entries.Modifier and Type | Field and Description |
---|---|
static String |
AGGREGATE_CREATION_POLICY
Attribute key referencing an aggregate creation policy to be used when handling a command.
|
static String |
ALLOW_REPLAY
Attribute key referencing whether the handler is allowed to be invoked on replays.
|
static String |
COMMAND_NAME
Attribute key referencing the name of the
CommandMessage the handler
can handle. |
static String |
COMMAND_ROUTING_KEY
Attribute key referencing the routing key used to route a
CommandMessage
to the handler. |
static String |
EXCEPTION_RESULT_TYPE
Attribute key referencing the exception result type the handler can handle.
|
static String |
FORCE_NEW_SAGA
Attribute key referencing whether the handler forces the creation of a new saga instance.
|
static String |
MESSAGE_TYPE
Attribute key referencing the
Message type being handled by the handler. |
static String |
PAYLOAD_TYPE
Attribute key referencing the payload type contained in the
Message . |
static String |
QUERY_NAME
Attribute key referencing the name of the
QueryMessage the handler can
handle. |
static String |
RESULT_TYPE
Attribute key referencing the result type the handler can handle.
|
static String |
SAGA_ASSOCIATION_PROPERTY
Attribute key referencing the property in the handled
EventMessage to
associate a saga instance with. |
static String |
SAGA_ASSOCIATION_PROPERTY_KEY_NAME
Attribute key referencing the saga event handler's association property key name used.
|
static String |
SAGA_ASSOCIATION_RESOLVER
Attribute key referencing the type of association resolver used by a saga event handler.
|
static String |
SHUTDOWN_PHASE
Attribute key referencing the
Phase to invoke a shutdown handler in. |
static String |
START_PHASE
Attribute key referencing the
Phase to invoke a start handler in. |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String attributeKey)
Validates whether the given
attributeKey is present in this object. |
<R> R |
get(String attributeKey)
Retrieve the attribute for the given
attributeKey . |
Map<String,Object> |
getAll()
Retrieve all attributes stored in this
HandlerAttributes object. |
boolean |
isEmpty()
Validate whether zero attributes are present in this object.
|
HandlerAttributes |
mergedWith(HandlerAttributes other)
|
static final String MESSAGE_TYPE
Message
type being handled by the handler.static final String PAYLOAD_TYPE
Message
.static final String COMMAND_NAME
CommandMessage
the handler
can handle.static final String COMMAND_ROUTING_KEY
CommandMessage
to the handler.static final String QUERY_NAME
QueryMessage
the handler can
handle.static final String RESULT_TYPE
static final String EXCEPTION_RESULT_TYPE
static final String FORCE_NEW_SAGA
static final String SAGA_ASSOCIATION_PROPERTY
EventMessage
to
associate a saga instance with.static final String SAGA_ASSOCIATION_PROPERTY_KEY_NAME
static final String SAGA_ASSOCIATION_RESOLVER
static final String START_PHASE
Phase
to invoke a start handler in.static final String SHUTDOWN_PHASE
Phase
to invoke a shutdown handler in.static final String AGGREGATE_CREATION_POLICY
static final String ALLOW_REPLAY
<R> R get(String attributeKey)
attributeKey
. Might be null
if there is no attribute present
for the given key.R
- the type of attribute to retrieveattributeKey
- the attribute key to retrieve an attribute forattributeKey
Map<String,Object> getAll()
HandlerAttributes
object.HandlerAttributes
objectboolean contains(String attributeKey)
attributeKey
is present in this object.attributeKey
- the attribute key to validate if it is present in this objecttrue
if there is an attribute for the given attributeKey
present, false
otherwiseboolean isEmpty()
true
if there are no attributes present, false
otherwiseHandlerAttributes mergedWith(HandlerAttributes other)
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.other
- the HandlerAttributes
to group with this
instance's attributesHandlerAttributes
combining this
instance's attributes and the given other
attributesCopyright © 2010–2024. All rights reserved.