Class MsgOriginator

    • 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.
      int getMaxMsg()
      Return this message processor's max allowed message size in bytes.
      boolean isDisconnected()  
      void linkProduce​(long txID, java.nio.ByteBuffer payload)
      Link Producer objects handle data flow from generic connections to abstract transport links.
      protected long prune​(long now)  
      protected void resend​(long now)  
      void send​(CipRequest req)
      Core method to send or execute a request.
      • Methods inherited from class java.lang.Object

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

      • sLogger

        public static final org.slf4j.Logger sLogger
      • conxdl

        protected final Deadline conxdl
      • seq

        protected final java.util.concurrent.atomic.AtomicInteger seq
      • pending

        protected final java.util.Map<java.lang.Short,​CipRequest> pending
      • resendInterval

        protected final long resendInterval
      • resendTarget

        protected volatile long resendTarget
      • resendContent

        protected volatile java.nio.ByteBuffer resendContent
    • Constructor Detail

      • MsgOriginator

        public MsgOriginator​(FwdOpenRsp reply)
    • Method Detail

      • prune

        protected long prune​(long now)
      • resend

        protected void resend​(long now)
      • getMaxMsg

        public int getMaxMsg()
        Description copied from interface: CipMsgProcessor
        Return this message processor's max allowed message size in bytes. Applies to both request and reply.
        Specified by:
        getMaxMsg in interface CipMsgProcessor
        Returns:
      • 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.
      • linkProduce

        public void linkProduce​(long txID,
                                java.nio.ByteBuffer payload)
        Description copied from interface: LinkProducer
        Link Producer objects handle data flow from generic connections to abstract transport links. When carrying messaging traffic, the txID uniquely identifies the request/reply pair; typically the encapsulation sender context.
        Specified by:
        linkProduce in interface LinkProducer
        Parameters:
        txID - Transport layer transaction ID uniquely identifying this message or reply, if applicable. Zero for I/O connections.
        payload - Complete CIP data payload, including CIP sequence number, if any.
      • 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