Class Accumulator

  • All Implemented Interfaces:
    io.aether.utils.interfaces.ObjectFind, Node<byte[],​byte[],​byte[],​byte[]>, NodeDown<byte[],​byte[]>, NodeUp<byte[],​byte[]>, io.aether.utils.ToString

    public class Accumulator
    extends java.lang.Object
    implements Node<byte[],​byte[],​byte[],​byte[]>
    Accumulator node that processes Value objects.

    When receiving data from the upper gate (up), it prepends a size header to the byte array and sends it down. When receiving data from the lower gate (down), it reads the size header first, then accumulates incoming bytes until the full data packet is received, and finally sends the reconstructed Value up.

    This class ensures proper framing of byte arrays with size headers for reliable transmission.

    • Constructor Summary

      Constructors 
      Constructor Description
      Accumulator()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FGate<byte[],​byte[]> gDown()  
      FGate<byte[],​byte[]> gUp()  
      static Gate<byte[],​byte[]> of​(Gate<byte[],​byte[]> down)  
      java.lang.String toString()  
      void toString​(io.aether.utils.AString sb)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface io.aether.utils.streams.NodeDown

        up
      • Methods inherited from interface io.aether.utils.interfaces.ObjectFind

        find, find, getOwners
      • Methods inherited from interface io.aether.utils.ToString

        toString2
    • Constructor Detail

      • Accumulator

        public Accumulator()
    • Method Detail

      • toString

        public void toString​(io.aether.utils.AString sb)
        Specified by:
        toString in interface io.aether.utils.ToString
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • gDown

        public FGate<byte[],​byte[]> gDown()
        Specified by:
        gDown in interface NodeUp<byte[],​byte[]>
      • gUp

        public FGate<byte[],​byte[]> gUp()
        Specified by:
        gUp in interface NodeDown<byte[],​byte[]>
      • of

        public static Gate<byte[],​byte[]> of​(Gate<byte[],​byte[]> down)