File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
server/src/main/java/org/spine3/server/aggregate Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 3636import org .spine3 .server .aggregate .error .MissingEventApplierException ;
3737import org .spine3 .server .command .CommandHandler ;
3838import org .spine3 .server .entity .Entity ;
39+ import org .spine3 .server .event .EventBus ;
3940import org .spine3 .server .reflect .Classes ;
4041import org .spine3 .server .reflect .CommandHandlerMethod ;
4142import org .spine3 .server .reflect .MethodRegistry ;
6061 * These events are used later to restore the state of the aggregate.
6162 *
6263 * <h2>Creating aggregate class</h2>
64+ *
6365 * <p>In order to create a new aggregate class you need to:
6466 * <ol>
6567 * <li>Select a type for identifiers of the aggregates. If you select to use a typed identifier
7072 * </ol>
7173 *
7274 * <h2>Adding command handler methods</h2>
75+ *
7376 * <p>Command handling methods of an aggregate are defined in the same way as described in {@link CommandHandler}.
7477 *
78+ * <p>Event(s) returned by command handler methods are posted to the {@link EventBus} automatically.
79+ *
7580 * <h2>Adding event applier methods</h2>
81+ *
7682 * <p>Aggregate data is stored as sequence of events it produces. The state of the aggregate
7783 * is restored by re-playing the history of events and invoking corresponding <em>event applier methods</em>.
7884 *
You can’t perform that action at this time.
0 commit comments