Package com.opencqrs.framework.command
Annotation Interface StateRebuilding
@Target({METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
@Inherited
public @interface StateRebuilding
Annotation to be used in favor of defining
StateRebuildingHandlerDefinition
Bean
s.
It can be placed on public methods returning a non-primitive Object
representing the
StateRebuildingHandlerDefinition.instanceClass()
and with at least one non-primitive parameter extending
Object
representing an assignable StateRebuildingHandlerDefinition.eventClass()
Additionally such
methods may have any of the following unique parameter types, in any order:
- a type derived from
Object
representing theStateRebuildingHandlerDefinition.instanceClass()
- a
java.util.Map<String, ?>
for the event meta-data - a
String
for the event subject - an
Event
for the raw event - any number of
Autowired
annotated parameters, resolving to single beans within theApplicationContext
The method must be contained within an
AnnotatedBeanDefinition
, for instance within
Component
s or Configuration
s.
- See Also: