Interface TransactionConverter

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface TransactionConverter
A converter of a transaction type id and serialized transaction arguments into an executable transaction.
See Also:
TransactionMessage
  • Method Summary

    Modifier and Type Method Description
    Transaction toTransaction​(int txId, byte[] arguments)
    Converts a transaction type id and serialized transaction arguments to an executable transaction of some service.
  • Method Details

    • toTransaction

      Transaction toTransaction​(int txId, byte[] arguments)
      Converts a transaction type id and serialized transaction arguments to an executable transaction of some service.
      Parameters:
      txId - the transaction type identifier within the service
      arguments - the serialized transaction arguments
      Returns:
      an executable transaction of the service
      Throws:
      IllegalArgumentException - if the transaction is not known to the service, or the arguments are not valid: e.g., cannot be deserialized, or do not meet the preconditions