Interface ILcyLucyEnvListener

All Superinterfaces:
EventListener

public interface ILcyLucyEnvListener extends EventListener
Listener for changes in a ILcyLucyEnv.
  • Method Details

    • lucyEnvStatusChanged

      void lucyEnvStatusChanged(TLcyLucyEnvEvent aEvent) throws TLcyVetoException
      Indicates that the status of the ILcyLucyEnv has changed.
      Parameters:
      aEvent - The event describing the change.
      Throws:
      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.
      Throwing a TLcyVetoException for other state transitions might leave Lucy in an undefined state.
    • onceWhenInitialized

      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.

      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

      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.

      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