Module 

Interface ReadableMultipointMessageChannel

    • Method Detail

      • receiveFrom

        int receiveFrom​(SocketAddressBuffer addressBuffer,
                        java.nio.ByteBuffer buffer)
                 throws java.io.IOException
        Receive a message via this channel. If a message is immediately available, then the datagram is written into the given buffer and the source and destination addresses (if available) read into the address buffer. If there is no message immediately available, this method will return 0.
        Parameters:
        addressBuffer - the address buffer into which the source and destination addresses should be written (null to discard that information)
        buffer - the buffer into which data should be read
        Returns:
        the size of the received message, 0 if no message is available, and -1 if the message channel has reached an end-of-file condition
        Throws:
        java.io.IOException - if an I/O error occurs
      • receiveFrom

        long receiveFrom​(SocketAddressBuffer addressBuffer,
                         java.nio.ByteBuffer[] buffers)
                  throws java.io.IOException
        Receive a message. If a message is immediately available, then the datagram is written into the given buffers in a "scatter" fashion and the source and destination addresses (if available) read into the address buffer. If there is no message immediately available, this method will return 0.
        Parameters:
        addressBuffer - the address buffer into which the source and destination addresses should be written (null to discard that information)
        buffers - the buffers that will hold the message
        Returns:
        the size of the received message, 0 if no message is available, and -1 if the message channel has reached an end-of-file condition
        Throws:
        java.io.IOException - if an I/O error occurs
      • receiveFrom

        long receiveFrom​(SocketAddressBuffer addressBuffer,
                         java.nio.ByteBuffer[] buffers,
                         int offs,
                         int len)
                  throws java.io.IOException
        Receive a message. If a message is immediately available, then the datagram is written into the given buffers in a "scatter" fashion and the source and destination addresses (if available) read into the address buffer. If there is no message immediately available, this method will return 0.
        Parameters:
        addressBuffer - the address buffer into which the source and destination addresses should be written (null to discard that information)
        buffers - the buffers that will hold the message
        offs - the offset into the array of buffers of the first buffer to read into
        len - the number of buffers to fill
        Returns:
        the size of the received message, 0 if no message is available, and -1 if the message channel has reached an end-of-file condition
        Throws:
        java.io.IOException - if an I/O error occurs