Package org.jppf.nio

Interface NioMessage

All Known Implementing Classes:
AbstractNioMessage, AbstractNioMessageBase, ClassLoaderNioMessage, SimpleNioMessage

public interface NioMessage
Common interface for sending data over a communication channel. A channel is a wrapper over a socket connection or in-memory pipe.
Author:
Laurent Cohen
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Read operation.
    static final int
    Write operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Get the actual bytes received from the underlying channel.
    long
    Get the actual bytes sent to the underlying channel.
    boolean
    Determines whether this message read from / writes to an SSL connection.
    boolean
    Read data from a channel.
    boolean
    Read data from a channel.
  • Field Details

  • Method Details

    • read

      boolean read() throws Exception
      Read data from a channel.
      Returns:
      true if the data has been completely read from the channel, false otherwise.
      Throws:
      Exception - if an IO error occurs.
    • write

      boolean write() throws Exception
      Read data from a channel.
      Returns:
      true if the data has been completely written the channel, false otherwise.
      Throws:
      Exception - if an IO error occurs.
    • isSSL

      boolean isSSL()
      Determines whether this message read from / writes to an SSL connection.
      Returns:
      true is data is read from or written an SSL connection, false otherwise.
    • getChannelReadCount

      long getChannelReadCount()
      Get the actual bytes received from the underlying channel.
      Returns:
      the number of bytes as a long value.
    • getChannelWriteCount

      long getChannelWriteCount()
      Get the actual bytes sent to the underlying channel.
      Returns:
      the number of bytes as a long value.