public final class LifeCycleBuilder extends Object implements WorkerLifeCycle
Constructor and Description |
---|
LifeCycleBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
onIterationComplete(Runnable iterationComplete)
Subscribe to 'iteration complete' events by register listener.
|
void |
onPrepareForNextRound(Runnable prepareForNextRound)
Subscribe to 'prepare for next round' events by register listener.
|
void |
onRoundComplete(Consumer<Boolean> roundCompleteWithDestinationReached)
Subscribe to 'round complete' events by register a boolean consumer.
|
void |
onSetupIteration(IntConsumer setupIterationWithDepartureTime)
Subscribe to 'setup iteration' events by register a int consumer.
|
void |
onTransfersForRoundComplete(Runnable transfersForRoundComplete)
Subscribe to 'transfers for round complete' events by register listener.
|
void |
onTransitsForRoundComplete(Runnable transitsForRoundComplete)
Subscribe to 'transits for round complete' events by register listener.
|
public void onSetupIteration(IntConsumer setupIterationWithDepartureTime)
WorkerLifeCycle
iterationDepartureTime
passed in as an argument.onSetupIteration
in interface WorkerLifeCycle
setupIterationWithDepartureTime
- if null
nothing is added to the publisher.public void onPrepareForNextRound(Runnable prepareForNextRound)
WorkerLifeCycle
onPrepareForNextRound
in interface WorkerLifeCycle
prepareForNextRound
- if null
nothing is added to the publisher.public void onTransitsForRoundComplete(Runnable transitsForRoundComplete)
WorkerLifeCycle
onTransitsForRoundComplete
in interface WorkerLifeCycle
transitsForRoundComplete
- if null
nothing is added to the publisher.public void onTransfersForRoundComplete(Runnable transfersForRoundComplete)
WorkerLifeCycle
onTransfersForRoundComplete
in interface WorkerLifeCycle
transfersForRoundComplete
- if null
nothing is added to the publisher.public void onRoundComplete(Consumer<Boolean> roundCompleteWithDestinationReached)
WorkerLifeCycle
onRoundComplete
in interface WorkerLifeCycle
roundCompleteWithDestinationReached
- if null
nothing is added to the publisher.public void onIterationComplete(Runnable iterationComplete)
WorkerLifeCycle
onIterationComplete
in interface WorkerLifeCycle
iterationComplete
- if null
nothing is added to the publisher.Copyright © 2019. All rights reserved.