CommandScheduler

public abstract class CommandScheduler implements BusFilter<E>, Closeable

Schedules commands delivering them to the target according to the scheduling options.

Inheritors

Constructors

Link copied to clipboard
protected void CommandScheduler()

Functions

Link copied to clipboard
public void close()
By default, performs no action.
Link copied to clipboard
protected CommandBus commandBus()
Obtains CommandBus associated with this scheduler.
Link copied to clipboard
protected abstract void doSchedule(Command command)
Schedules a command and delivers it to the target according to the scheduling options set to a context.
Link copied to clipboard
public Optional<Ack> filter(CommandEnvelope envelope)
Accepts or rejects a passed message.
Link copied to clipboard
public boolean isOpen()
Tells if the object is still open.
Link copied to clipboard
protected void post(Command command)
Delivers a scheduled command to a target.
Link copied to clipboard
public void schedule(Command command)
Schedules a command and delivers it to the target according to the scheduling options.
Link copied to clipboard
public void shutdown()
Initiates an orderly shutdown in which previously scheduled commands will be delivered later, but no new commands will be accepted.

Inherited functions

Link copied to clipboard
public void checkOpen()
Ensures that the object is open.
Link copied to clipboard
public Optional<Ack> letPass()
Lets the message pass the filter.
Link copied to clipboard
public Optional<Ack> reject(E envelope)
Rejects the message with the OK status.
public Optional<Ack> reject(E envelope, ThrowableMessage cause)
Rejects the message with a rejection status.
public Optional<Ack> reject(E envelope, Error cause)
Rejects the message with an Error status.