Package com.iizix.api

Interface IInstanceLifecycleListener


public interface IInstanceLifecycleListener
Interface that any Java class that is hooked into the framework can implement. It enables being called after virtualization has completed successfully, and when the instance is no longer needed due to disposal of the owner. This makes it possible for a class instance to use resources that can be freed up upon dispose and does not have to wait until garbage collection is run.

The construction of an instance of this class is done during the virtualization phase of the owner property.

Author:
Christopher Mindus
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the virtualized owner property is disposed of, i.e.
    void
    onVirtualized(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PropCnr owner)
    This method is called after the virtualization has completed and that all references, etc, are ready but before any kind of other action is done.
  • Method Details

    • onVirtualized

      void onVirtualized(IAppSessionGyro appGyro, IClientSessionGyro clientGyro, VirtualSpace virtualSpace, PropCnr owner)
      This method is called after the virtualization has completed and that all references, etc, are ready but before any kind of other action is done.
      Parameters:
      appGyro - The application gyro instance performing the virtualization.
      clientGyro - The client gyro session, can be null if not initialized from the client gyro.
      virtualSpace - The virtualized VirtualSpace.
      owner - The owner property container.
    • onDisposed

      void onDisposed(PropCnr owner)
      Called when the virtualized owner property is disposed of, i.e. no longer used (e.g. client session closed, panel removed from virtual panels).

      Note: in case of failures in the virtualization process, the call to onVirtualized(IAppSessionGyro, IClientSessionGyro, VirtualSpace, PropCnr) may not have been done, so the assumption that "onVirtualized" has been called cannot be made.

      Parameters:
      owner - The owner property container. The owner may be null only in the case the ClassReference property holding this instance has been removed from it's parent programmatically (the framework does not perform such action).