| Modifier and Type | Method and Description |
|---|---|
<C extends Command,E extends Event> |
CommandBus.mapCommandHandler(Class<C> commandClass,
CommandHandler<S,C,E> commandHandler)
Map a command handler for a concrete command type.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
AsyncCommandHandler<S extends State,C extends Command,E extends Event>
Command handler that handles its command asynchronously.
|
interface |
AsyncMultiCommandHandler<S extends State,C extends Command,E extends Event>
Command handler that handles its command asynchronously and produces multiple events.
|
interface |
CommandHandler<S extends State,C extends Command,E extends Event>
Base interface for a command handler.
|
interface |
MultiCommandHandler<S extends State,C extends Command,E extends Event>
Base interface for a command handler that produces multiple events.
|
interface |
SyncCommandHandler<S extends State,C extends Command,E extends Event>
Command handler that handles its command synchronously.
|
interface |
SyncMultiCommandHandler<S extends State,C extends Command,E extends Event>
Command handler that handles its command synchronously and produces multiple events.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CommandLogger.onCommandHandlerError(Throwable error,
Command command,
Event... events)
Called when an error occurs during the handling of a command.
|
void |
CommandLogger.onCommandHandlerResult(Command command,
Event... events)
Called when a command handler returns a result.
|
| Modifier and Type | Method and Description |
|---|---|
<E extends Event> |
EventBus.mapEventHandler(Class<E> eventClass,
EventHandler<S,E> eventHandler)
Map a event handler for a concrete event type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
EventBus.handleEvent(Event event)
Execute the event handler that is mapped to this event type.
|
| Constructor and Description |
|---|
EventHandlerReturnedNullException(Event event) |
NoRegisteredEventErrorHandlerException(Throwable cause,
Event event) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
EventHandler<S extends State,E extends Event>
Interface for an event handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
EventLogger.onEventHandlerError(Throwable error,
Event event,
S newState)
Called when an error occurs during the handling of an event.
|
void |
EventLogger.onEventHandlerResult(Event event,
S newState)
Called when an event handler returns a result.
|
| Modifier and Type | Method and Description |
|---|---|
void |
StateManager.handleNewState(S newState,
Event event)
Validate and set a new state object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
OnStateChanged.onStateChanged(S state,
Event event)
Called when an event causes the state to change.
|
| Modifier and Type | Method and Description |
|---|---|
<C extends Command,E extends Event> |
DefaultCommandBus.mapCommandHandler(Class<C> commandClass,
CommandHandler<S,C,E> commandHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
DefaultCommandBus.executeCommandHandler(S state,
Command command,
CommandHandler<S,Command,Event> handler)
Execute a command handler that produces 0 or 1 event.
|
protected void |
DefaultCommandBus.executeHandler(Command command,
CommandHandler<S,Command,Event> commandHandler) |
protected void |
DefaultCommandBus.executeMultiCommandHandler(S state,
Command command,
MultiCommandHandler<S,Command,Event> handler)
Execute a command handler that produces a collection of events.
|
| Modifier and Type | Method and Description |
|---|---|
<E extends Event> |
DefaultEventBus.mapEventHandler(Class<E> eventClass,
EventHandler<S,E> eventHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
DefaultEventBus.executeHandler(Event event,
EventHandler<S,Event> eventHandler) |
void |
DefaultEventBus.handleEvent(Event event) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
DefaultEventBus.executeHandler(Event event,
EventHandler<S,Event> eventHandler) |
| Modifier and Type | Method and Description |
|---|---|
<C extends Command,E extends Event> |
LaPasseFacade.mapCommandHandler(Class<C> commandClass,
CommandHandler<S,C,E> commandHandler) |
<E extends Event> |
LaPasseFacade.mapEventHandler(Class<E> eventClass,
EventHandler<S,E> eventHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
LaPasseFacade.handleEvent(Event event) |
| Modifier and Type | Method and Description |
|---|---|
void |
LaPasseLoggers.onCommandHandlerError(Throwable error,
Command command,
Event... events) |
void |
DefaultLogger.onCommandHandlerError(Throwable error,
Command command,
Event... events) |
void |
LaPasseLoggers.onCommandHandlerResult(Command command,
Event... events) |
void |
DefaultLogger.onCommandHandlerResult(Command command,
Event... events) |
void |
LaPasseLoggers.onEventHandlerError(Throwable error,
Event event,
S newState) |
void |
DefaultLogger.onEventHandlerError(Throwable error,
Event event,
S newState) |
void |
LaPasseLoggers.onEventHandlerResult(Event event,
S newState) |
void |
DefaultLogger.onEventHandlerResult(Event event,
S newState) |
| Modifier and Type | Method and Description |
|---|---|
void |
DefaultStateManager.handleNewState(S newState,
Event event) |
Copyright © 2016 Cooking Fox. All rights reserved.