public class BcosSDK
extends java.lang.Object
| 构造器和说明 |
|---|
BcosSDK(ConfigOption configOption)
Constructor, init by ConfigOption
|
| 限定符和类型 | 方法和说明 |
|---|---|
static BcosSDK |
build(java.lang.String tomlConfigFilePath)
Build BcosSDK instance from toml config path
|
Amop |
getAmop()
Get an amop instance of a specific group
|
Client |
getClient()
Get a Client instance of default group in config
|
Client |
getClient(java.lang.String groupId)
Get a Client instance of a specific group
|
ConfigOption |
getConfig() |
EventSubscribe |
getEventSubscribe(java.lang.String groupId)
Get an event subscribe instance of a specific group
|
FilterSystem |
getFilterSystem(Client client,
int poolSize)
Get an event subscribe instance of a specific group
|
FilterSystem |
getFilterSystem(Client client,
int poolSize,
long pollingInterval)
Get an event subscribe instance of a specific group
|
TarsClient |
getTarsClient(java.lang.String groupID) |
void |
registerBlockNotifier(java.lang.String groupID,
org.fisco.bcos.sdk.jni.BlockNotifier blockNotifier) |
void |
stopAll()
Stop all module of BcosSDK
|
public BcosSDK(ConfigOption configOption) throws BcosSDKException
configOption - the ConfigOptionBcosSDKException - create sdk instance failedpublic ConfigOption getConfig()
public static BcosSDK build(java.lang.String tomlConfigFilePath) throws BcosSDKException
tomlConfigFilePath - the Toml type config fileBcosSDKException - create sdk instance failedpublic void registerBlockNotifier(java.lang.String groupID,
org.fisco.bcos.sdk.jni.BlockNotifier blockNotifier)
groupID - group idblockNotifier - block notifier instancepublic Client getClient(java.lang.String groupId) throws BcosSDKException
groupId - specific group idBcosSDKExceptionpublic TarsClient getTarsClient(java.lang.String groupID)
public Client getClient() throws BcosSDKException
BcosSDKExceptionpublic Amop getAmop() throws BcosSDKException
BcosSDKExceptionpublic EventSubscribe getEventSubscribe(java.lang.String groupId) throws BcosSDKException
groupId - specific group idBcosSDKExceptionpublic FilterSystem getFilterSystem(Client client, int poolSize) throws BcosSDKException
client - poolSize - the size of scheduledExecutorServiceBcosSDKExceptionpublic FilterSystem getFilterSystem(Client client, int poolSize, long pollingInterval) throws BcosSDKException
client - poolSize - the size of scheduledExecutorServicepollingInterval - The time interval for polling getFilterChangeBcosSDKExceptionpublic void stopAll()