Package org.jppf.nio

Class SimpleNioMessage

All Implemented Interfaces:
NioMessage

public class SimpleNioMessage extends AbstractNioMessageBase
An NioMessage that reads or writes a single object.
Author:
Laurent Cohen
  • Constructor Details

    • SimpleNioMessage

      public SimpleNioMessage(NioContext channel)
      Initialize this nio message.
      Parameters:
      channel - the channel to read from or write to.
  • Method Details

    • setCurrentDataLocation

      public void setCurrentDataLocation(DataLocation location)
      Add a location to the data locations of this message.
      Parameters:
      location - the location to add.
    • read

      public boolean read() throws Exception
      Description copied from interface: NioMessage
      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

      public boolean write() throws Exception
      Description copied from interface: NioMessage
      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.
    • toString

      public String toString()
      Overrides:
      toString in class Object