public abstract class BaseGrpcClient<RespT> extends Object implements GrpcClient, Closeable
| Modifier and Type | Field and Description |
|---|---|
protected String |
appKey |
protected String |
appSecret |
protected io.grpc.ManagedChannel |
channel |
protected boolean |
enableTls |
protected String |
host |
protected int |
port |
protected RetryPolicy |
retryPolicy |
protected LinkedList<SubStreamObserver<RespT>> |
subObservers |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseGrpcClient(String appKey,
String appSecret,
String host,
int port,
RetryPolicy retryPolicy,
boolean enableTls) |
protected |
BaseGrpcClient(String appKey,
String appSecret,
String host,
int port,
RetryPolicy retryPolicy,
boolean enableTls,
List<GrpcHandler> handlers,
HandlerProxyFactory<RespT> handlerProxyFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildChannel() |
void |
close() |
void |
shutdown(long timeout,
TimeUnit timeUnit) |
void |
shutdownNow() |
protected final String appKey
protected final String appSecret
protected final String host
protected final int port
protected final RetryPolicy retryPolicy
protected final boolean enableTls
protected final LinkedList<SubStreamObserver<RespT>> subObservers
protected io.grpc.ManagedChannel channel
protected BaseGrpcClient(String appKey, String appSecret, String host, int port, RetryPolicy retryPolicy, boolean enableTls)
protected BaseGrpcClient(String appKey, String appSecret, String host, int port, RetryPolicy retryPolicy, boolean enableTls, List<GrpcHandler> handlers, HandlerProxyFactory<RespT> handlerProxyFactory)
protected void buildChannel()
public void shutdown(long timeout,
TimeUnit timeUnit)
throws InterruptedException
shutdown in interface GrpcClientInterruptedExceptionpublic void shutdownNow()
shutdownNow in interface GrpcClientpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2025 Webull. All rights reserved.