Class TLSActor.ChoppingBlock

  • All Implemented Interfaces:
    TransferState
    Enclosing class:
    TLSActor

    public class TLSActor.ChoppingBlock
    extends java.lang.Object
    implements TransferState
    Whether there are no bytes lying on this chopping block.
    • Constructor Summary

      Constructors 
      Constructor Description
      ChoppingBlock​(int idx, java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void chopInto​(java.nio.ByteBuffer b)
      Pour as many bytes as are available either on the chopping block or in the inputBunch’s next ByteString into the supplied ByteBuffer, which is expected to be in “read left-overs” mode, i.e.
      boolean isCompleted()  
      boolean isEmpty()
      Whether there are no bytes lying on this chopping block.
      boolean isReady()  
      void prepare​(java.nio.ByteBuffer b)
      Prepare a fresh ByteBuffer for receiving a chop of data.
      void putBack​(java.nio.ByteBuffer b)
      When potentially complete packet data are left after unwrap() we must put them back onto the chopping block because otherwise the pump will not know that we are runnable.
      • Methods inherited from class java.lang.Object

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

      • ChoppingBlock

        public ChoppingBlock​(int idx,
                             java.lang.String name)
    • Method Detail

      • chopInto

        public void chopInto​(java.nio.ByteBuffer b)
        Pour as many bytes as are available either on the chopping block or in the inputBunch’s next ByteString into the supplied ByteBuffer, which is expected to be in “read left-overs” mode, i.e. everything between its position and limit is retained. In order to allocate a fresh ByteBuffer with these characteristics, use prepare().
        Parameters:
        b - (undocumented)
      • isEmpty

        public boolean isEmpty()
        Whether there are no bytes lying on this chopping block.
        Returns:
        (undocumented)
      • prepare

        public void prepare​(java.nio.ByteBuffer b)
        Prepare a fresh ByteBuffer for receiving a chop of data.
        Parameters:
        b - (undocumented)
      • putBack

        public void putBack​(java.nio.ByteBuffer b)
        When potentially complete packet data are left after unwrap() we must put them back onto the chopping block because otherwise the pump will not know that we are runnable.
        Parameters:
        b - (undocumented)