public class CompositeEventStreamDecorator extends Object implements EventStreamDecorator
| Constructor and Description |
|---|
CompositeEventStreamDecorator(Collection<EventStreamDecorator> eventStreamDecorators)
Initialize the decorator, delegating to the given
eventStreamDecorators. |
| Modifier and Type | Method and Description |
|---|---|
DomainEventStream |
decorateForAppend(String aggregateType,
EventSourcedAggregateRoot aggregate,
DomainEventStream eventStream)
Called when an event stream is appended to the event store.
|
DomainEventStream |
decorateForRead(String aggregateType,
Object aggregateIdentifier,
DomainEventStream eventStream)
Called when an event stream is read from the event store.
|
public CompositeEventStreamDecorator(Collection<EventStreamDecorator> eventStreamDecorators)
eventStreamDecorators. The decorators are
invoked in the iterator's order on decorateForRead(String, Object, org.axonframework.domain.DomainEventStream),
and in revese order on decorateForAppend(String, EventSourcedAggregateRoot,
org.axonframework.domain.DomainEventStream).eventStreamDecorators - The decorators to decorate Event Streams withpublic DomainEventStream decorateForRead(String aggregateType, Object aggregateIdentifier, DomainEventStream eventStream)
EventStreamDecoratoreventStream and pass
that to the chain.decorateForRead in interface EventStreamDecoratoraggregateType - The type of aggregate events are being read foraggregateIdentifier - The identifier of the aggregate events are loaded foreventStream - The eventStream containing the events to append to the event storepublic DomainEventStream decorateForAppend(String aggregateType, EventSourcedAggregateRoot aggregate, DomainEventStream eventStream)
EventStreamDecoratoreventStream and pass
that to the chain.decorateForAppend in interface EventStreamDecoratoraggregateType - The type of aggregate events are being appended foraggregate - The aggregate for which the events are being storedeventStream - The eventStream containing the events to append to the event storeCopyright © 2010-2014. All Rights Reserved.