public class BtnClientNetwork extends Object implements INetwork<ProtobufRequest>
| 构造器和说明 |
|---|
BtnClientNetwork() |
| 限定符和类型 | 方法和说明 |
|---|---|
Set<String> |
getDownloadingFileKeys() |
long |
getLastActiveTime(String endpoint) |
long |
getReceiveTaskCount() |
long |
getSendTaskCount() |
NodeRegEntity.TnRouteType |
getTnRoutType(String endpointArg) |
boolean |
isNodeGroupIsAreadyRegister() |
boolean |
listenDownloadFile(IEventCallBack eventCallBack) |
boolean |
listenEvent(IEventCallBack callBack,
TnCmdIdEnums cmdIdEnums) |
boolean |
listenGetDownloadFileMetaData(IEventCallBack eventCallBack,
long key) |
boolean |
nodeGroupReg(String endpoint) |
boolean |
noderegAll(String endpointArg) |
boolean |
removeConnection(String endpoint) |
Response |
sendAsyncRequest(ProtobufRequest protobufRequest,
IAsyncCallBack callback,
boolean isNecessaryNodeRegistered,
boolean isNecessaryNodeGroupRegistered,
int timeout) |
Response |
sendAsyncRequest(ProtobufRequest protobufRequest,
IAsyncCallBack callback,
String endpoint,
boolean isNecessaryNodeRegistered,
boolean isNecessaryNodeGroupRegistered) |
Response |
sendSyncRequest(ProtobufRequest protobufRequest,
boolean isNecessaryNodeRegistered,
boolean isNecessaryNodeGroupRegistered,
int requestTimeouts) |
Response |
sendSyncRequest(ProtobufRequest protobufRequest,
String endpoint,
boolean isNecessaryNodeRegistered,
boolean isNecessaryNodeGroupRegistered,
int requestTimeouts) |
void |
setConnectionNodeRegisterStatus(String endpoint) |
void |
setNodeGroupIsAreadyRegister(boolean nodeGroupIsAreadyRegister) |
boolean |
shutDown() |
boolean |
startup(NetworkOption networkOption,
RequestOption requestOption,
ISslOption iSslOption,
NodeRegisterConfig nodeRegisterConfig,
NodeGroupRegisterConfig nodeGroupRegisterConfig,
BtnClient btnClient,
DownloadFileOption downloadFileOption) |
boolean |
unListenEvent(IEventCallBack callBack,
TnCmdIdEnums cmdIdEnums) |
boolean |
unListenGetDownloadFileMetaData(long key) |
boolean |
unRegisterEvents(String endpoint) |
void |
updateLastActiveEndpointMaps(String endpoint) |
void |
updateNodeRegisterTask(int groupUpdateIntervalSecRG) |
public boolean startup(NetworkOption networkOption, RequestOption requestOption, ISslOption iSslOption, NodeRegisterConfig nodeRegisterConfig, NodeGroupRegisterConfig nodeGroupRegisterConfig, BtnClient btnClient, DownloadFileOption downloadFileOption)
public void updateNodeRegisterTask(int groupUpdateIntervalSecRG)
public NodeRegEntity.TnRouteType getTnRoutType(String endpointArg)
public boolean noderegAll(String endpointArg)
public void setConnectionNodeRegisterStatus(String endpoint)
public boolean nodeGroupReg(String endpoint)
public boolean shutDown()
public boolean removeConnection(String endpoint)
removeConnection 在接口中 INetwork<ProtobufRequest>public boolean unRegisterEvents(String endpoint)
public boolean listenEvent(IEventCallBack callBack, TnCmdIdEnums cmdIdEnums)
public boolean unListenEvent(IEventCallBack callBack, TnCmdIdEnums cmdIdEnums)
public boolean listenGetDownloadFileMetaData(IEventCallBack eventCallBack, long key)
public boolean unListenGetDownloadFileMetaData(long key)
public boolean listenDownloadFile(IEventCallBack eventCallBack)
public Response sendSyncRequest(ProtobufRequest protobufRequest, boolean isNecessaryNodeRegistered, boolean isNecessaryNodeGroupRegistered, int requestTimeouts)
public Response sendSyncRequest(ProtobufRequest protobufRequest, String endpoint, boolean isNecessaryNodeRegistered, boolean isNecessaryNodeGroupRegistered, int requestTimeouts)
public Response sendAsyncRequest(ProtobufRequest protobufRequest, IAsyncCallBack callback, boolean isNecessaryNodeRegistered, boolean isNecessaryNodeGroupRegistered, int timeout)
public Response sendAsyncRequest(ProtobufRequest protobufRequest, IAsyncCallBack callback, String endpoint, boolean isNecessaryNodeRegistered, boolean isNecessaryNodeGroupRegistered)
public long getLastActiveTime(String endpoint)
getLastActiveTime 在接口中 INetwork<ProtobufRequest>public long getSendTaskCount()
public long getReceiveTaskCount()
public void updateLastActiveEndpointMaps(String endpoint) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic boolean isNodeGroupIsAreadyRegister()
public void setNodeGroupIsAreadyRegister(boolean nodeGroupIsAreadyRegister)
Copyright © 2022. All rights reserved.