public interface ILcyLucyEnvListener extends EventListener
ILcyLucyEnv
.Modifier and Type | Method and Description |
---|---|
void |
lucyEnvStatusChanged(TLcyLucyEnvEvent aEvent)
Indicates that the status of the
ILcyLucyEnv has changed. |
static ILcyLucyEnvListener |
onceWhenClosed(Consumer<ILcyLucyEnv> aLucyEnvConsumer)
Utility method to create a new
ILcyLucyEnvListener which will trigger aLucyEnvConsumer
when the state of Lucy changes to TLcyLucyEnvEvent.CLOSED . |
static ILcyLucyEnvListener |
onceWhenInitialized(Consumer<ILcyLucyEnv> aLucyEnvConsumer)
Utility method to create a new
ILcyLucyEnvListener which will trigger aLucyEnvConsumer
when the state of Lucy changes to TLcyLucyEnvEvent.INITIALIZED . |
void lucyEnvStatusChanged(TLcyLucyEnvEvent aEvent) throws TLcyVetoException
ILcyLucyEnv
has changed.aEvent
- The event describing the change.TLcyVetoException
- The implementation of this listener can throw a TLcyVetoException
when it wants to veto the change.
These exceptions should only be thrown when Lucy switches from TLcyLucyEnvEvent.INITIALIZED
to TLcyLucyEnvEvent.CLOSING
.TLcyVetoException
for other state transitions might leave Lucy in an undefined state.static ILcyLucyEnvListener onceWhenInitialized(Consumer<ILcyLucyEnv> aLucyEnvConsumer)
ILcyLucyEnvListener
which will trigger aLucyEnvConsumer
when the state of Lucy changes to TLcyLucyEnvEvent.INITIALIZED
.
The created listener will only be triggered once.
Once the listener has been triggered, it will de-register itself.aLucyEnvConsumer
- The consumer of the Lucy envILcyLucyEnvListener
static ILcyLucyEnvListener onceWhenClosed(Consumer<ILcyLucyEnv> aLucyEnvConsumer)
ILcyLucyEnvListener
which will trigger aLucyEnvConsumer
when the state of Lucy changes to TLcyLucyEnvEvent.CLOSED
.
The created listener will only be triggered once.
Once the listener has been triggered, it will de-register itself.aLucyEnvConsumer
- The consumer of the Lucy envILcyLucyEnvListener