Interface IfaceAwareService<T extends BinaryMsgIface>

All Superinterfaces:
BinaryMsgIfaceFactory, BinaryMsgIfaceListener<T>, IfaceAware<T>

public interface IfaceAwareService<T extends BinaryMsgIface> extends IfaceAware<T>, BinaryMsgIfaceListener<T>, BinaryMsgIfaceFactory
TODO
Version:
2025-06-19
  • Method Details

    • getIfaceName

      String getIfaceName()
      Return the name of the iface for this service.
    • createIface

      T createIface(BinaryMsgSession session)
      Return an instance of the custom iface for the service. This is called when the adapter for the service connects to java. The iface returned by this method can be accessed via getIface() . This will be called every time the adapter connects to the service.
    • getIface

      default BinaryMsgIface getIface(String name, BinaryMsgSession session)
      Handle iface checks and only call createIface for matching iface.
      Specified by:
      getIface in interface BinaryMsgIfaceFactory
      Parameters:
      name - the name of the interface
      session - the session to back the interface
      Returns:
      the iface or null
    • onIfaceConnect

      void onIfaceConnect() throws Exception
      Called once the associated iface is initialized and ready for use.
      Throws:
      Exception
    • onIfaceDisconnect

      void onIfaceDisconnect() throws Exception
      Called when the associated iface is shutdown.
      Throws:
      Exception
    • onConnect

      default void onConnect(T iface) throws Exception
      Calls onIfaceConnect() to avoid name collisions when using withIface() methods.
      Specified by:
      onConnect in interface BinaryMsgIfaceListener<T extends BinaryMsgIface>
      Throws:
      Exception
    • onDisconnect

      default void onDisconnect(T iface) throws Exception
      Calls onIfaceDisconnect()
      Specified by:
      onDisconnect in interface BinaryMsgIfaceListener<T extends BinaryMsgIface>
      Throws:
      Exception