public class UserServiceAdapter
extends java.lang.Object
Service
to an interface with a native code.Constructor and Description |
---|
UserServiceAdapter(Service service,
Server server,
ViewFactory viewFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this service adapter.
|
UserTransactionAdapter |
convertTransaction(byte[] transactionMessage)
Converts a transaction messages into an executable transaction of this service.
|
short |
getId() |
java.lang.String |
getName() |
byte[][] |
getStateHashes(long snapshotHandle)
Returns the state hashes of the service.
|
java.lang.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 java.lang.String getName()
public UserTransactionAdapter convertTransaction(byte[] transactionMessage)
The callee must handle the declared exceptions.
transactionMessage
- a transaction message to be convertedjava.lang.NullPointerException
- if transactionMessage is null, or a user service returns
a null transactionjava.lang.IllegalArgumentException
- 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 java.lang.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 close()
Releases any resources.
Copyright © 2018 Exonum. All rights reserved.