public interface ContractSubscription
The subscribers (NContract
instances) subscribe to a contract or a chain of contracts to receive
event notifications and for some amount of time. All subscriptions share same copy of the NContract
.
When the last susbscription to this revision is destroyed or expired, the copy is dropped.
Note that subscriptions are private to NContract
instances and visible only to it. When the NContract is
revoked, all its subscriptions must be destroyed.
Modifier and Type | Interface | Description |
---|---|---|
static interface |
ContractSubscription.ApprovedEvent |
|
static interface |
ContractSubscription.ApprovedWithCallbackEvent |
|
static interface |
ContractSubscription.CallbackEvent |
The subscription event base interface for starting follower callback.
|
static interface |
ContractSubscription.CompletedEvent |
|
static interface |
ContractSubscription.Event |
The subscription event base interface.
|
static interface |
ContractSubscription.FailedEvent |
|
static interface |
ContractSubscription.RevokedEvent |
|
static interface |
ContractSubscription.RevokedWithCallbackEvent |
|
static interface |
ContractSubscription.SpentEvent |
|
static interface |
ContractSubscription.SubscriptionEvent |
The subscription event base interface for storage subscription.
|
Modifier and Type | Method | Description |
---|---|---|
java.time.ZonedDateTime |
expiresAt() |
|
HashId |
getContractId() |
|
HashId |
getHashId() |
|
HashId |
getOrigin() |
|
boolean |
isChainSubscription() |
|
void |
setExpiresAt(java.time.ZonedDateTime expiredAt) |
Set expiration time of subscription.
|
java.time.ZonedDateTime expiresAt()
HashId getContractId()
HashId getOrigin()
boolean isChainSubscription()
void setExpiresAt(java.time.ZonedDateTime expiredAt)
expiredAt
- is expiration time of subscription