public class Transaction extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Long |
createdTime |
protected TimePointSec |
expirationDate |
protected List<FutureExtensions> |
extensions |
protected List<Operation> |
operations |
protected org.joou.UShort |
refBlockNum
The ref_block_num indicates a particular block in the past by referring
to the block number which has this number as the last two bytes.
|
protected org.joou.UInteger |
refBlockPrefix
The ref_block_prefix on the other hand is obtain from the block id of
that particular reference block.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Transaction()
This method is only used by JUnit-Tests
|
|
Transaction(BlockId blockId,
List<Operation> operations,
List<FutureExtensions> extensions)
Like
Transaction(BlockId, List, List) ,
but allows you to provide a
BlockId object as the
reference block and will also set the expirationDate to the
latest possible time. |
|
Transaction(org.joou.UShort refBlockNum,
org.joou.UInteger refBlockPrefix,
TimePointSec expirationDate,
List<Operation> operations,
List<FutureExtensions> extensions,
Long createdTime)
Create a new transaction object.
|
| Modifier and Type | Method and Description |
|---|---|
Long |
getCreatedTime() |
TimePointSec |
getExpirationDate()
Get the currently configured expiration date.
|
List<FutureExtensions> |
getExtensions()
Get the list of configured extensions.
|
List<Operation> |
getOperations()
Get all Operations that have been added to this transaction.
|
org.joou.UShort |
getRefBlockNum()
Get the ref block number in its int representation.
|
org.joou.UInteger |
getRefBlockPrefix()
Get the ref block prefix in its long representation.
|
protected Map<SignatureObject,PrivateKeyType> |
getRequiredAuthorities()
This method collects the required authorities for all operations stored
in this transaction.
|
void |
setCreatedTime(Long createdTime) |
void |
setExpirationDate(TimePointSec expirationDate)
Define how long this transaction is valid.
|
void |
setExtensions(List<FutureExtensions> extensions)
Extensions are currently not supported and will be ignored.
|
void |
setOperations(List<Operation> operations)
Define a list of operations that should be send with this transaction.
|
void |
setRefBlockNum(org.joou.UShort refBlockNum)
Set the ref block number by providing its int representation.
|
void |
setRefBlockPrefix(String refBlockPrefix)
Set the ref block prefix by providing its String representation.
|
void |
setRefBlockPrefix(org.joou.UInteger refBlockPrefix)
Set the ref block prefix by providing its long representation.
|
String |
toString() |
void |
validate()
Validate if all fields of this transaction object have acceptable values.
|
protected org.joou.UShort refBlockNum
protected org.joou.UInteger refBlockPrefix
protected transient TimePointSec expirationDate
protected transient List<FutureExtensions> extensions
protected Long createdTime
public Transaction(org.joou.UShort refBlockNum,
org.joou.UInteger refBlockPrefix,
TimePointSec expirationDate,
List<Operation> operations,
List<FutureExtensions> extensions,
Long createdTime)
refBlockNum - The reference block number (see
setRefBlockNum(UShort)).refBlockPrefix - The reference block index (see
setRefBlockPrefix(UInteger)).expirationDate - Define until when the transaction has to be processed (see
setExpirationDate(TimePointSec)).operations - A list of operations to process within this Transaction (see
setOperations(List)).extensions - Extensions are currently not supported and will be ignored
(see setExtensions(List)).createdTime - Timestamp create transaction.public Transaction(BlockId blockId, List<Operation> operations, List<FutureExtensions> extensions)
Transaction(BlockId, List, List) ,
but allows you to provide a
BlockId object as the
reference block and will also set the expirationDate to the
latest possible time.blockId - The block reference (see setRefBlockNum(UShort) and
setRefBlockPrefix(UInteger)).operations - A list of operations to process within this Transaction (see
setOperations(List)).extensions - Extensions are currently not supported and will be ignored
(see setExtensions(List)).protected Transaction()
Create a new signed transaction object.
public List<FutureExtensions> getExtensions()
public void setExtensions(List<FutureExtensions> extensions)
extensions - Define a list of extensions.public List<Operation> getOperations()
public void setOperations(List<Operation> operations)
operations - A list of operations.InvalidParameterException - If the given object does not contain at least one Operation.public org.joou.UShort getRefBlockNum()
The ref_block_num indicates a particular block in the past by referring to the block number which has this number as the last two bytes.
public void setRefBlockNum(org.joou.UShort refBlockNum)
The ref_block_num indicates a particular block in the past by referring to the block number which has this number as the last two bytes.
refBlockNum - The ref block number as int.public org.joou.UInteger getRefBlockPrefix()
The ref_block_prefix on the other hand is obtain from the block id of that particular reference block.
public void setRefBlockPrefix(org.joou.UInteger refBlockPrefix)
setRefBlockPrefix(String).refBlockPrefix - The ref block prefix.public void setRefBlockPrefix(String refBlockPrefix)
getDynamicGlobalProperties method.refBlockPrefix - The String representation of the ref block prefix.public TimePointSec getExpirationDate()
setExpirationDate(TimePointSec) method.public void setExpirationDate(TimePointSec expirationDate)
expirationDate - The expiration date to set.protected Map<SignatureObject,PrivateKeyType> getRequiredAuthorities()
public Long getCreatedTime()
public void setCreatedTime(Long createdTime)
public void validate()
throws BeowulfInvalidTransactionException
BeowulfInvalidTransactionException - In case a field does not fulfill the requirements.Copyright © 2019. All rights reserved.