Package com.luciad.lucy
Interface ILcyLucyEnvListener
- All Superinterfaces:
EventListener
Listener for changes in a
ILcyLucyEnv.-
Method Summary
Modifier and TypeMethodDescriptionvoidlucyEnvStatusChanged(TLcyLucyEnvEvent aEvent) Indicates that the status of theILcyLucyEnvhas changed.static ILcyLucyEnvListeneronceWhenClosed(Consumer<ILcyLucyEnv> aLucyEnvConsumer) Utility method to create a newILcyLucyEnvListenerwhich will triggeraLucyEnvConsumerwhen the state of Lucy changes toTLcyLucyEnvEvent.CLOSED.static ILcyLucyEnvListeneronceWhenInitialized(Consumer<ILcyLucyEnv> aLucyEnvConsumer) Utility method to create a newILcyLucyEnvListenerwhich will triggeraLucyEnvConsumerwhen the state of Lucy changes toTLcyLucyEnvEvent.INITIALIZED.
-
Method Details
-
lucyEnvStatusChanged
Indicates that the status of theILcyLucyEnvhas changed.- Parameters:
aEvent- The event describing the change.- Throws:
TLcyVetoException- The implementation of this listener can throw aTLcyVetoExceptionwhen it wants to veto the change. These exceptions should only be thrown when Lucy switches fromTLcyLucyEnvEvent.INITIALIZEDtoTLcyLucyEnvEvent.CLOSING.
Throwing aTLcyVetoExceptionfor other state transitions might leave Lucy in an undefined state.
-
onceWhenInitialized
Utility method to create a newILcyLucyEnvListenerwhich will triggeraLucyEnvConsumerwhen 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 newILcyLucyEnvListenerwhich will triggeraLucyEnvConsumerwhen 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
-