| Constructor and Description |
|---|
UserServiceAdapter(Service service,
Server server,
ViewFactory viewFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCommit(long snapshotHandle,
int validatorId,
long height)
Handles block committed event.
|
void |
close()
Close this service adapter.
|
UserTransactionAdapter |
convertTransaction(short transactionId,
byte[] payload)
Converts a transaction messages into an executable transaction of this service.
|
short |
getId() |
String |
getName() |
Service |
getService() |
byte[][] |
getStateHashes(long snapshotHandle)
Returns the state hashes of the service.
|
String |
initialize(long forkHandle)
Returns the service initial global configuration.
|
void |
mountPublicApiHandler(long nodeNativeHandle) |
@Inject public UserServiceAdapter(Service service, Server server, ViewFactory viewFactory)
public short getId()
public String getName()
public Service getService()
public UserTransactionAdapter convertTransaction(short transactionId, byte[] payload)
The callee must handle the declared exceptions.
transactionId - an identifier of the transactionpayload - a transaction payloadNullPointerException - if payload is null, or a user service returns
a null transactionIllegalArgumentException - if message is not a valid transaction message of this servicepublic byte[][] getStateHashes(long snapshotHandle)
The method does not destroy a native snapshot object corresponding to the passed handle.
snapshotHandle - a handle to a native snapshot objectService.getStateHashes(Snapshot)@Nullable public String initialize(long forkHandle)
The method does not destroy a native fork object corresponding to the passed handle.
forkHandle - a handle to a native fork objectService.initialize(Fork)public void mountPublicApiHandler(long nodeNativeHandle)
public void afterCommit(long snapshotHandle,
int validatorId,
long height)
snapshotHandle - a handle to a native snapshot objectvalidatorId - a validator id. Negative if this node is not a validatorheight - the current blockchain heightpublic void close()
Releases any resources.
Copyright © 2019 Exonum. All rights reserved.