Package org.jppf.nio

Class SSLNioObject

All Implemented Interfaces:
NioObject

public class SSLNioObject extends AbstractNioObject
Implementation of NioObject for reading or writing data from or to an SSL channel. The channel and the corresponding SSLEngine are both encapsulated within an instance of SSLHandlerImpl.
Author:
Laurent Cohen
  • Constructor Details

    • SSLNioObject

      public SSLNioObject(int size, SSLHandler sslHandler) throws Exception
      Construct this SSLMessage.
      Parameters:
      size - the size of the internal buffer.
      sslHandler - the SSLHandler to use with this nio object.
      Throws:
      Exception - if any error occurs.
    • SSLNioObject

      public SSLNioObject(JPPFBuffer buf, SSLHandler sslHandler) throws Exception
      Construct this SSLMessage.
      Parameters:
      buf - the internal buffer.
      sslHandler - the SSLHandler to use with this nio object.
      Throws:
      Exception - if any error occurs.
    • SSLNioObject

      public SSLNioObject(DataLocation location, SSLHandler sslHandler) throws Exception
      Construct this SSLMessage.
      Parameters:
      location - the location of the data to read from or write to.
      sslHandler - the SSLHandler to use with this nio object.
      Throws:
      Exception - if any error occurs.
  • Method Details

    • read

      public boolean read() throws Exception
      Description copied from interface: NioObject
      Attempt to read an object from an inbound channel.
      Returns:
      true if an object was fully read, false otherwise.
      Throws:
      Exception - if any error occurs.
    • write

      public boolean write() throws Exception
      Description copied from interface: NioObject
      Attempt to write an object to an outbound channel.
      Returns:
      true if an object was fully written, false otherwise.
      Throws:
      Exception - if any error occurs.
    • reset

      public NioObject reset()
      Description copied from interface: NioObject
      Reset this object.
      Specified by:
      reset in interface NioObject
      Overrides:
      reset in class AbstractNioObject
      Returns:
      an Object of the same class.