Package org.hertsstack.rpcclient
Class IBuilder
- java.lang.Object
-
- org.hertsstack.rpcclient.IBuilder
-
- All Implemented Interfaces:
HertsRpcClientIBuilder
public class IBuilder extends java.lang.Object implements HertsRpcClientIBuilder
HertsRpcClientIBuilder implementation
-
-
Constructor Summary
Constructors Constructor Description IBuilder(java.lang.String connectedHost, int serverPort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HertsRpcClientIBuilderchannel(io.grpc.Channel channel)Channel for gRPCHertsRpcClientconnect()Connect to serverio.grpc.ChannelgetChannel()org.hertsstack.rpcclient.ClientConnectiongetClientConnection()java.lang.StringgetConnectedHost()java.util.List<org.hertsstack.core.service.HertsReceiver>getHertsRpcReceivers()java.util.List<java.lang.Class<?>>getHertsRpcServices()org.hertsstack.core.context.HertsTypegetHertsType()io.grpc.ClientInterceptorgetInterceptor()GrpcClientOptiongetOption()intgetServerPort()HertsRpcClientIBuildergrpcOption(GrpcClientOption option)gRPC optionHertsRpcClientIBuilderinterceptor(io.grpc.ClientInterceptor interceptor)Herts interceptorbooleanisSecureConnection()HertsRpcClientIBuilderregisterHertsRpcReceiver(org.hertsstack.core.service.HertsReceiver hertsReceiver)Herts receiver service<T> HertsRpcClientIBuilderregisterHertsRpcServiceInterface(java.lang.Class<T> serviceClass)Herts interface service Not implementation class.voidregisterReceivers(io.grpc.Channel channel)HertsRpcClientIBuildersecure(boolean isSecureConnection)Serure connection
-
-
-
Method Detail
-
secure
public HertsRpcClientIBuilder secure(boolean isSecureConnection)
Description copied from interface:HertsRpcClientIBuilderSerure connection- Specified by:
securein interfaceHertsRpcClientIBuilder- Parameters:
isSecureConnection- Secure- Returns:
- HertsCoreClientBuilder
-
registerHertsRpcServiceInterface
public <T> HertsRpcClientIBuilder registerHertsRpcServiceInterface(java.lang.Class<T> serviceClass)
Description copied from interface:HertsRpcClientIBuilderHerts interface service Not implementation class. Required @HertsRpc annotation- Specified by:
registerHertsRpcServiceInterfacein interfaceHertsRpcClientIBuilder- Type Parameters:
T- HertsService class type- Parameters:
serviceClass- HertsService- Returns:
- HertsCoreClientBuilder
-
registerHertsRpcReceiver
public HertsRpcClientIBuilder registerHertsRpcReceiver(org.hertsstack.core.service.HertsReceiver hertsReceiver)
Description copied from interface:HertsRpcClientIBuilderHerts receiver service- Specified by:
registerHertsRpcReceiverin interfaceHertsRpcClientIBuilder- Parameters:
hertsReceiver- HertsReceiver- Returns:
- HertsRpcClientIBuilder
-
channel
public HertsRpcClientIBuilder channel(io.grpc.Channel channel)
Description copied from interface:HertsRpcClientIBuilderChannel for gRPC- Specified by:
channelin interfaceHertsRpcClientIBuilder- Parameters:
channel- Channel- Returns:
- HertsCoreClientBuilder
-
interceptor
public HertsRpcClientIBuilder interceptor(io.grpc.ClientInterceptor interceptor)
Description copied from interface:HertsRpcClientIBuilderHerts interceptor- Specified by:
interceptorin interfaceHertsRpcClientIBuilder- Parameters:
interceptor- ClientInterceptor- Returns:
- HertsCoreClientBuilder
-
grpcOption
public HertsRpcClientIBuilder grpcOption(GrpcClientOption option)
Description copied from interface:HertsRpcClientIBuildergRPC option- Specified by:
grpcOptionin interfaceHertsRpcClientIBuilder- Parameters:
option- GrpcClientOption- Returns:
- HertsCoreClientBuilder
-
connect
public HertsRpcClient connect()
Description copied from interface:HertsRpcClientIBuilderConnect to server- Specified by:
connectin interfaceHertsRpcClientIBuilder- Returns:
- HertsRpcClient
-
registerReceivers
public void registerReceivers(io.grpc.Channel channel)
-
getHertsRpcReceivers
public java.util.List<org.hertsstack.core.service.HertsReceiver> getHertsRpcReceivers()
-
getHertsRpcServices
public java.util.List<java.lang.Class<?>> getHertsRpcServices()
-
getConnectedHost
public java.lang.String getConnectedHost()
-
getServerPort
public int getServerPort()
-
getHertsType
public org.hertsstack.core.context.HertsType getHertsType()
-
isSecureConnection
public boolean isSecureConnection()
-
getChannel
public io.grpc.Channel getChannel()
-
getInterceptor
public io.grpc.ClientInterceptor getInterceptor()
-
getOption
public GrpcClientOption getOption()
-
getClientConnection
public org.hertsstack.rpcclient.ClientConnection getClientConnection()
-
-