public class ServiceEndpoint extends NodeRPCConnection
The service end-point is just like the map of the hive node. The application can communicate with the hive node APIs by its sub-class.
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceEndpoint(AppContext context,
java.lang.String providerAddress)
Create by the application context, and the address of the provider.
|
| Modifier and Type | Method and Description |
|---|---|
protected AccessToken |
getAccessToken() |
AppContext |
getAppContext()
Get the application context.
|
java.lang.String |
getAppDid()
Get the application DID in the current calling context.
|
java.lang.String |
getAppInstanceDid()
Get the application instance DID in the current calling context;
|
java.util.concurrent.CompletableFuture<java.lang.String> |
getLatestCommitId()
Get the last commit ID of the hive node.
|
java.util.concurrent.CompletableFuture<NodeInfo> |
getNodeInfo()
Get the information of the hive node.
|
java.util.concurrent.CompletableFuture<NodeVersion> |
getNodeVersion()
Get the version of the hive node.
|
java.lang.String |
getProviderAddress()
Get the end-point address of this service End-point.
|
java.lang.String |
getServiceDid()
Get the remote node service application DID.
|
java.lang.String |
getServiceInstanceDid()
Get the remote node service instance DID where is serving the storage service.
|
DataStorage |
getStorage()
Get the instance of the data storage.
|
java.lang.String |
getUserDid()
Get the user DID string of this serviceEndpoint.
|
void |
refreshAccessToken()
Refresh the access token.
|
createService, openConnectionprotected ServiceEndpoint(AppContext context, java.lang.String providerAddress)
context - The application context.providerAddress - The address of the provider.public AppContext getAppContext()
public java.lang.String getProviderAddress()
getProviderAddress in class NodeRPCConnectionpublic java.lang.String getUserDid()
public java.lang.String getAppDid()
public java.lang.String getAppInstanceDid()
public java.lang.String getServiceDid()
public java.lang.String getServiceInstanceDid()
public DataStorage getStorage()
public void refreshAccessToken()
throws NodeRPCException
NodeRPCException - See NodeRPCExceptionprotected AccessToken getAccessToken()
getAccessToken in class NodeRPCConnectionpublic java.util.concurrent.CompletableFuture<NodeVersion> getNodeVersion()
public java.util.concurrent.CompletableFuture<java.lang.String> getLatestCommitId()
public java.util.concurrent.CompletableFuture<NodeInfo> getNodeInfo()