server
1.9.0
jvm
server
/
io.spine.server.commandbus
/
CommandScheduler
Command
Scheduler
public
abstract
class
CommandScheduler
implements
BusFilter
<
E
>
,
Closeable
Schedules commands delivering them to the target according to the scheduling options.
Inheritors
ExecutorCommandScheduler
Members
Constructors
Command
Scheduler
Link copied to clipboard
protected
void
CommandScheduler
(
)
Functions
close
Link copied to clipboard
public
void
close
(
)
By default, performs no action.
command
Bus
Link copied to clipboard
protected
CommandBus
commandBus
(
)
Obtains
CommandBus
associated with this scheduler.
do
Schedule
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.
filter
Link copied to clipboard
public
Optional
<
Ack
>
filter
(
CommandEnvelope
envelope
)
Accepts or rejects a passed message.
is
Open
Link copied to clipboard
public
boolean
isOpen
(
)
Tells if the object is still open.
post
Link copied to clipboard
protected
void
post
(
Command command
)
Delivers a scheduled command to a target.
schedule
Link copied to clipboard
public
void
schedule
(
Command command
)
Schedules a command and delivers it to the target according to the scheduling options.
shutdown
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
check
Open
Link copied to clipboard
public
void
checkOpen
(
)
Ensures that the object is
open
.
let
Pass
Link copied to clipboard
public
Optional
<
Ack
>
letPass
(
)
Lets the message pass the filter.
reject
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.