Class ReceiverAdapter

    • Constructor Summary

      Constructors 
      Constructor Description
      ReceiverAdapter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void receive​(Address sender, byte[] buf, int offset, int length)
      Delivers a message from a given sender to the application
      void receive​(Address sender, java.io.DataInput in)  
      void receive​(Address sender, java.nio.ByteBuffer buf)
      The default implementation assumes that ByteBuffer.flip() or ByteBuffer.rewind() was called on buf before invoking this callback
      • Methods inherited from class java.lang.Object

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

      • ReceiverAdapter

        public ReceiverAdapter()
    • Method Detail

      • receive

        public void receive​(Address sender,
                            byte[] buf,
                            int offset,
                            int length)
        Description copied from interface: Receiver
        Delivers a message from a given sender to the application
        Specified by:
        receive in interface Receiver
        Parameters:
        sender - The sender of the message
        buf - The buffer. An application typically de-serializes data from the buffer into objects used by the application. Note that when receive() returns, it is not safe to use the buffer any longer; if an application needs to use a buffer after this callback returns, it must make a copy.
        offset - The offset at which the received data starts
        length - The length of the received data
      • receive

        public void receive​(Address sender,
                            java.nio.ByteBuffer buf)
        The default implementation assumes that ByteBuffer.flip() or ByteBuffer.rewind() was called on buf before invoking this callback
        Specified by:
        receive in interface Receiver
        Parameters:
        sender -
        buf -
      • receive

        public void receive​(Address sender,
                            java.io.DataInput in)
                     throws java.lang.Exception
        Specified by:
        receive in interface Receiver
        Throws:
        java.lang.Exception