Package com.luciad.lucy
Interface ILcyLucyEnvListener
- All Superinterfaces:
EventListener
Listener for changes in a
ILcyLucyEnv
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
lucyEnvStatusChanged
(TLcyLucyEnvEvent aEvent) Indicates that the status of theILcyLucyEnv
has changed.static ILcyLucyEnvListener
onceWhenClosed
(Consumer<ILcyLucyEnv> aLucyEnvConsumer) Utility method to create a newILcyLucyEnvListener
which will triggeraLucyEnvConsumer
when the state of Lucy changes toTLcyLucyEnvEvent.CLOSED
.static ILcyLucyEnvListener
onceWhenInitialized
(Consumer<ILcyLucyEnv> aLucyEnvConsumer) Utility method to create a newILcyLucyEnvListener
which will triggeraLucyEnvConsumer
when the state of Lucy changes toTLcyLucyEnvEvent.INITIALIZED
.
-
Method Details
-
lucyEnvStatusChanged
Indicates that the status of theILcyLucyEnv
has changed.- Parameters:
aEvent
- The event describing the change.- Throws:
TLcyVetoException
- The implementation of this listener can throw aTLcyVetoException
when it wants to veto the change. These exceptions should only be thrown when Lucy switches fromTLcyLucyEnvEvent.INITIALIZED
toTLcyLucyEnvEvent.CLOSING
.
Throwing aTLcyVetoException
for other state transitions might leave Lucy in an undefined state.
-
onceWhenInitialized
Utility method to create a newILcyLucyEnvListener
which will triggeraLucyEnvConsumer
when the state of Lucy changes toTLcyLucyEnvEvent.INITIALIZED
. The created listener will only be triggered once. Once the listener has been triggered, it will de-register itself.- Parameters:
aLucyEnvConsumer
- The consumer of the Lucy env- Returns:
- a new
ILcyLucyEnvListener
- Since:
- 2017.0
-
onceWhenClosed
Utility method to create a newILcyLucyEnvListener
which will triggeraLucyEnvConsumer
when the state of Lucy changes toTLcyLucyEnvEvent.CLOSED
. The created listener will only be triggered once. Once the listener has been triggered, it will de-register itself.- Parameters:
aLucyEnvConsumer
- The consumer of the Lucy env- Returns:
- a new
ILcyLucyEnvListener
- Since:
- 2017.0
-