Class DispatchTriggerCommand
java.lang.Object
org.chenile.trigger.DispatchTriggerCommand
- All Implemented Interfaces:
OutboxCommandLifecycle<OutboxCommand>
A trigger is a durable event invocation, independent of processes and cron.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EventProcessorprivate static final org.slf4j.Loggerprivate final ObjectMapperprivate final ProcessOutboxRepositorystatic final String -
Constructor Summary
ConstructorsConstructorDescriptionDispatchTriggerCommand(ProcessOutboxRepository repository, EventProcessor events, ObjectMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatch(OutboxCommand command) voidenqueue(OutboxCommand command) executionHeaders(OutboxCommand command) Persisted invocation headers only; the execution boundary owns installing and restoring context.private voidlogResponse(String id, String eventId, Object response) booleanshouldEnqueue(OutboxCommand command) type()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OutboxCommandLifecycle
onDead
-
Field Details
-
TYPE
- See Also:
-
LOG
private static final org.slf4j.Logger LOG -
repository
-
events
-
mapper
-
-
Constructor Details
-
DispatchTriggerCommand
public DispatchTriggerCommand(ProcessOutboxRepository repository, EventProcessor events, ObjectMapper mapper)
-
-
Method Details
-
type
- Specified by:
typein interfaceOutboxCommandLifecycle<OutboxCommand>
-
shouldEnqueue
- Specified by:
shouldEnqueuein interfaceOutboxCommandLifecycle<OutboxCommand>
-
enqueue
- Specified by:
enqueuein interfaceOutboxCommandLifecycle<OutboxCommand>
-
executionHeaders
Description copied from interface:OutboxCommandLifecyclePersisted invocation headers only; the execution boundary owns installing and restoring context.- Specified by:
executionHeadersin interfaceOutboxCommandLifecycle<OutboxCommand>- Throws:
Exception
-
dispatch
- Specified by:
dispatchin interfaceOutboxCommandLifecycle<OutboxCommand>- Throws:
Exception
-
logResponse
-
CHENILE