Package me.ehp246.aufjms.api.annotation
Annotation Interface ForJmsType
Specifies an annotated class should be invoked on a JMS message according to
the JMS type, i.e., Message.getJMSType().
Regular expression is supported.
The library looks for the first match without a defined order. Overlapping regular expressions from multiple ForJmsType's might result in un-deterministic behavior.
- Author:
- Lei Yang
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecifies how to instantiate the invocation instance.String[]Specifies the JMS types for which the class should be invoked.
-
Element Details
-
value
String[] valueSpecifies the JMS types for which the class should be invoked.The matching is done via String.matches(String) where the
thisobject is from Message.getJMSType() and the argument is the value specified here which could be a regular expression.When multiple values are specified, any single value could trigger invocation. I.e., multiple types are considered logical
||.If no value is specified, the class' simple name, i.e., Class.getSimpleName(), is used as the default.
- Default:
- {}
-
scope
InstanceScope scopeSpecifies how to instantiate the invocation instance.- Default:
- MESSAGE
-
invocation
InvocationModel invocation- Default:
- DEFAULT
-