Interface ILicenseServerListener


  • public interface ILicenseServerListener
    Interface used to listen to license server events in order to perform visual feedback or just logging.
    Author:
    Christopher Mindus
    • Method Detail

      • getCommProp

        default PropCnr getCommProp​(boolean newInstance)
        Returns the property class to add when connection is established.

        You must override this method as it returns null by default.

        Note: calling this method several times must always return the same instance depending on the flag. The name of the property is changed when the connection to the license server is established. You may then invoke remove events, etc.

        Parameters:
        newInstance - Flag for a new property instance or the same one as before.
        Returns:
        A new property container if newInstance is true, otherwise the same instance as before (allocate if needed). Return null if this property is not needed.
      • onCommState

        default void onCommState​(ILicenceSystemComm comm,
                                 SocketCommNIO.State state)
        Called when the communication state changes.

        Override to process, the default is to do nothing.

        Parameters:
        comm - The license system communication controller interface.
        state - The communication state.
      • onConnected

        void onConnected​(ILicenceSystemComm comm)
        Called when the connection is established.
        Parameters:
        comm - The license system communication controller interface.
      • onClosed

        void onClosed​(ILicenceSystemComm comm)
        Called when the connection is closed. At this time, the license server listener can be removed by returning true.
        Parameters:
        comm - The license system communication controller interface.