Class AppOwnerAdapter

  • All Implemented Interfaces:
    AppLinkBase, AppOwner

    public class AppOwnerAdapter
    extends java.lang.Object
    implements AppOwner
    Provides a generic intermediary between an AppOwner and its application (connectable). Intended to be overridden by anonymous classes where a specific application connection owner's behaviour needs to be adjusted. Otherwise passes the method calls through to the real owner.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected AppOwner owner  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void disconnect()
      When a connection is closed or an application forces a disconnect, this shutdown method is called to clean up.
      int getConsumeRTF()
      An Application Consumer Owner must supply an indicator of the consumed real-time mode handling format.
      boolean isDisconnected()  
      void setRealTimeMode​(int newMode)
      When an application consumer decodes a packet and it provides a real-time mode indicator, the consumer must convert it to a 32-bit indicator and give it to the owner with this method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • AppOwnerAdapter

        public AppOwnerAdapter​(AppOwner owner)
    • Method Detail

      • disconnect

        public void disconnect()
        Description copied from interface: AppLinkBase
        When a connection is closed or an application forces a disconnect, this shutdown method is called to clean up. It should close the connection when called by the application.
        Specified by:
        disconnect in interface AppLinkBase
      • getConsumeRTF

        public int getConsumeRTF()
        Description copied from interface: AppOwner
        An Application Consumer Owner must supply an indicator of the consumed real-time mode handling format. The following values are allowed: -1: Application default 0: Modeless 1: Zero length packet==idle 3: Heartbeat 4: 32-bit run/idle header is present 5: Safety
        Specified by:
        getConsumeRTF in interface AppOwner
        Returns:
        Consumed payload real-time mode format
      • setRealTimeMode

        public void setRealTimeMode​(int newMode)
        Description copied from interface: AppOwner
        When an application consumer decodes a packet and it provides a real-time mode indicator, the consumer must convert it to a 32-bit indicator and give it to the owner with this method.
        Specified by:
        setRealTimeMode in interface AppOwner
        Parameters:
        newMode - Decoded or inferred 32-bit run/idle header