public class ServiceHubInternal implements PluginServiceHub
ServiceHub.DefaultImpls
Constructor and Description |
---|
ServiceHubInternal() |
Modifier and Type | Method and Description |
---|---|
FlowLogicRefFactory |
getFlowLogicRefFactory() |
java.security.KeyPair |
getLegalIdentityKey()
Helper property to shorten code for fetching the Node's KeyPair associated with the
public legalIdentity Party from the key management service.
Typical use is during signing in flows and for unit test signing.
|
MonitoringService |
getMonitoringService() |
MessagingServiceInternal |
getNetworkService() |
java.security.KeyPair |
getNotaryIdentityKey()
Helper property to shorten code for fetching the Node's KeyPair associated with the
public notaryIdentity Party from the key management service. It is assumed that this is only
used in contexts where the Node knows it is hosting a Notary Service. Otherwise, it will throw
an IllegalArgumentException.
Typical use is during signing in flows and for unit test signing.
|
SchemaService |
getSchemaService() |
<T> FlowStateMachine<T> |
invokeFlowAsync(java.lang.Class<? extends net.corda.core.flows.FlowLogic<? extends T>> logicType,
java.lang.Object args)
Will check logicType and args against a whitelist and if acceptable then construct and initiate the flow.
Note that you must be on the server thread to call this method.
|
TransactionState<?> |
loadState(StateRef stateRef)
Given a
class StateRef loads the referenced transaction and looks up the specified output interface ContractState . |
void |
recordTransactions(net.corda.core.transactions.SignedTransaction txs)
Given some
class SignedTransaction s, writes them to the local storage for validated transactions and then
sends them to the vault for further processing. |
<T> FlowStateMachine<T> |
startFlow(FlowLogic<? extends T> logic)
Starts an already constructed flow. Note that you must be on the server thread to call this method.
|
<T extends ContractState> |
toStateAndRef(StateRef ref)
|
getFlowFactory, registerFlowInitiator
getClock, getKeyManagementService, getLegalIdentityKey, getMyInfo, getNetworkMapCache, getNetworkService, getNotaryIdentityKey, getSchedulerService, getStorageService, getVaultService, invokeFlowAsync, loadState, recordTransactions, recordTransactions, toStateAndRef
getIdentityService, getStorageService, loadState
public MonitoringService getMonitoringService()
public FlowLogicRefFactory getFlowLogicRefFactory()
public SchemaService getSchemaService()
public MessagingServiceInternal getNetworkService()
public <T> FlowStateMachine<T> startFlow(FlowLogic<? extends T> logic)
Starts an already constructed flow. Note that you must be on the server thread to call this method.
public <T> FlowStateMachine<T> invokeFlowAsync(java.lang.Class<? extends net.corda.core.flows.FlowLogic<? extends T>> logicType, java.lang.Object args)
Will check logicType and args against a whitelist and if acceptable then construct and initiate the flow. Note that you must be on the server thread to call this method.
public void recordTransactions(net.corda.core.transactions.SignedTransaction txs)
Given some class SignedTransaction
s, writes them to the local storage for validated transactions and then
sends them to the vault for further processing.
txs
- The transactions to record.class SignedTransaction
public TransactionState<?> loadState(StateRef stateRef)
Given a class StateRef
loads the referenced transaction and looks up the specified output interface ContractState
.
class StateRef
points to a non-existent transaction.class StateRef
,
interface ContractState
public <T extends ContractState> StateAndRef<T> toStateAndRef(StateRef ref)
public java.security.KeyPair getLegalIdentityKey()
Helper property to shorten code for fetching the Node's KeyPair associated with the public legalIdentity Party from the key management service. Typical use is during signing in flows and for unit test signing.
TODO: legalIdentity can now be composed of multiple keys, should we return a list of keyPairs here? Right now the logic assumes the legal identity has a composite key with only one node
public java.security.KeyPair getNotaryIdentityKey()
Helper property to shorten code for fetching the Node's KeyPair associated with the public notaryIdentity Party from the key management service. It is assumed that this is only used in contexts where the Node knows it is hosting a Notary Service. Otherwise, it will throw an IllegalArgumentException. Typical use is during signing in flows and for unit test signing.