CommandOutcomeHandler

Used by CommandExecutorService , to update a Command after it has been executed.

API

CommandOutcomeHandler.java
interface CommandOutcomeHandler {
  CommandOutcomeHandler NULL;
  Timestamp getStartedAt()     (1)
  void setStartedAt(Timestamp startedAt)     (2)
  void setCompletedAt(Timestamp completedAt)     (3)
  void setResult(Try<Bookmark> result)     (4)
}
1 getStartedAt()

Reads the startedAt field from the underlying Command (or persistent equivalent)

2 setStartedAt(Timestamp)

Sets the startedAt field on the underlying Command (or persistent equivalent)

3 setCompletedAt(Timestamp)

Sets the completedAt field on the underlying Command (or persistent equivalent)

4 setResult(Try)

Handle the result of the execute, represented either as a Bookmark (success case) or an exception (failure), on the underlying Command (or persistent equivalent).

Members

getStartedAt()

Reads the startedAt field from the underlying Command (or persistent equivalent)

This is to ensure that it isn’t overwritten by #setStartedAt(Timestamp) .

setStartedAt(Timestamp)

Sets the startedAt field on the underlying Command (or persistent equivalent)

setCompletedAt(Timestamp)

Sets the completedAt field on the underlying Command (or persistent equivalent)

setResult(Try)

Handle the result of the execute, represented either as a Bookmark (success case) or an exception (failure), on the underlying Command (or persistent equivalent).