Class AggregateTransactionBodyBuilder

  • All Implemented Interfaces:
    Serializer

    public final class AggregateTransactionBodyBuilder
    extends java.lang.Object
    implements Serializer
    Binary layout for an aggregate transaction.
    • Constructor Detail

      • AggregateTransactionBodyBuilder

        protected AggregateTransactionBodyBuilder​(java.io.DataInputStream stream)
        Constructor - Creates an object from stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
      • AggregateTransactionBodyBuilder

        protected AggregateTransactionBodyBuilder​(Hash256Dto transactionsHash,
                                                  java.util.List<EmbeddedTransactionBuilder> transactions,
                                                  java.util.List<CosignatureBuilder> cosignatures)
        Constructor.
        Parameters:
        transactionsHash - Aggregate hash of an aggregate's transactions.
        transactions - Sub-transaction data (transactions are variable sized and payload size is in bytes).
        cosignatures - Cosignatures data (fills remaining body space after transactions).
    • Method Detail

      • create

        public static AggregateTransactionBodyBuilder create​(Hash256Dto transactionsHash,
                                                             java.util.List<EmbeddedTransactionBuilder> transactions,
                                                             java.util.List<CosignatureBuilder> cosignatures)
        Creates an instance of AggregateTransactionBodyBuilder.
        Parameters:
        transactionsHash - Aggregate hash of an aggregate's transactions.
        transactions - Sub-transaction data (transactions are variable sized and payload size is in bytes).
        cosignatures - Cosignatures data (fills remaining body space after transactions).
        Returns:
        Instance of AggregateTransactionBodyBuilder.
      • getTransactionsHash

        public Hash256Dto getTransactionsHash()
        Gets aggregate hash of an aggregate's transactions.
        Returns:
        Aggregate hash of an aggregate's transactions.
      • getTransactions

        public java.util.List<EmbeddedTransactionBuilder> getTransactions()
        Gets sub-transaction data (transactions are variable sized and payload size is in bytes).
        Returns:
        Sub-transaction data (transactions are variable sized and payload size is in bytes).
      • getCosignatures

        public java.util.List<CosignatureBuilder> getCosignatures()
        Gets cosignatures data (fills remaining body space after transactions).
        Returns:
        Cosignatures data (fills remaining body space after transactions).
      • getSize

        public int getSize()
        Gets the size of the object.
        Specified by:
        getSize in interface Serializer
        Returns:
        Size in bytes.
      • loadFromBinary

        public static AggregateTransactionBodyBuilder loadFromBinary​(java.io.DataInputStream stream)
        Creates an instance of AggregateTransactionBodyBuilder from a stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
        Returns:
        Instance of AggregateTransactionBodyBuilder.
      • serialize

        public byte[] serialize()
        Serializes an object to bytes.
        Specified by:
        serialize in interface Serializer
        Returns:
        Serialized bytes.