Class AppConsumerAdapter

  • All Implemented Interfaces:
    AppConsumer, AppLinkBase

    public class AppConsumerAdapter
    extends java.lang.Object
    implements AppConsumer
    Provides a generic intermediary between an AppConsumer and its owner. Intended to be overridden by anonymous classes where a specific application consumer's behaviour needs to be adjusted. Otherwise passes the method calls through to the real consumer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appConsume​(long txID, java.nio.ByteBuffer payload)
      Application Consumer objects handle data flow from connections to application objects.
      void disconnect()
      When a connection is closed or an application forces a disconnect, this shutdown method is called to clean up.
      boolean isDisconnected()  
      • Methods inherited from class java.lang.Object

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

      • AppConsumerAdapter

        public AppConsumerAdapter​(AppConsumer consumer)
    • 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
      • appConsume

        public void appConsume​(long txID,
                               java.nio.ByteBuffer payload)
        Description copied from interface: AppConsumer
        Application Consumer objects handle data flow from connections to application objects. Connectable objects will provide instances with the appropriate buffer handling and ownership tracking, including removal/use of CIP short sequence numbers and originator idle/run mode indicators. Bridge connections cross connect their application consumers, passing the complete payload to the peer's appProduce() method.
        Specified by:
        appConsume in interface AppConsumer
        Parameters:
        txID - Transport layer transaction ID to use with any reply.
        payload - Complete CIP data payload, including CIP sequence number, if any.