ExecutorCommandScheduler

The command scheduler implementation which uses basic Java task scheduling features.

NOTE: please use another implementation in applications running under the Google App Engine.

See also

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
protected 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 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 void close()
By default, performs no action.
public abstract void close()
Link copied to clipboard
protected CommandBus commandBus()
Obtains CommandBus associated with this scheduler.
Link copied to clipboard
public abstract Optional<Ack> filter(E envelope)
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
public Optional<Ack> letPass()
Lets the message pass the filter.
Link copied to clipboard
protected void post(Command command)
Delivers a scheduled command to a target.
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.
Link copied to clipboard
public void schedule(Command command)
Schedules a command and delivers it to the target according to the scheduling options.