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 HertsRpcClientIBuilder
channel(io.grpc.Channel channel)
Channel for gRPCHertsRpcClient
connect()
Connect to serverio.grpc.Channel
getChannel()
org.hertsstack.rpcclient.ClientConnection
getClientConnection()
java.lang.String
getConnectedHost()
java.util.List<org.hertsstack.core.service.HertsReceiver>
getHertsRpcReceivers()
java.util.List<java.lang.Class<?>>
getHertsRpcServices()
org.hertsstack.core.context.HertsType
getHertsType()
io.grpc.ClientInterceptor
getInterceptor()
GrpcClientOption
getOption()
int
getServerPort()
HertsRpcClientIBuilder
grpcOption(GrpcClientOption option)
gRPC optionHertsRpcClientIBuilder
interceptor(io.grpc.ClientInterceptor interceptor)
Herts interceptorboolean
isSecureConnection()
HertsRpcClientIBuilder
registerHertsRpcReceiver(org.hertsstack.core.service.HertsReceiver hertsReceiver)
Herts receiver service<T> HertsRpcClientIBuilder
registerHertsRpcServiceInterface(java.lang.Class<T> serviceClass)
Herts interface service Not implementation class.void
registerReceivers(io.grpc.Channel channel)
HertsRpcClientIBuilder
secure(boolean isSecureConnection)
Serure connection
-
-
-
Method Detail
-
secure
public HertsRpcClientIBuilder secure(boolean isSecureConnection)
Description copied from interface:HertsRpcClientIBuilder
Serure connection- Specified by:
secure
in interfaceHertsRpcClientIBuilder
- Parameters:
isSecureConnection
- Secure- Returns:
- HertsCoreClientBuilder
-
registerHertsRpcServiceInterface
public <T> HertsRpcClientIBuilder registerHertsRpcServiceInterface(java.lang.Class<T> serviceClass)
Description copied from interface:HertsRpcClientIBuilder
Herts interface service Not implementation class. Required @HertsRpc annotation- Specified by:
registerHertsRpcServiceInterface
in 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:HertsRpcClientIBuilder
Herts receiver service- Specified by:
registerHertsRpcReceiver
in interfaceHertsRpcClientIBuilder
- Parameters:
hertsReceiver
- HertsReceiver- Returns:
- HertsRpcClientIBuilder
-
channel
public HertsRpcClientIBuilder channel(io.grpc.Channel channel)
Description copied from interface:HertsRpcClientIBuilder
Channel for gRPC- Specified by:
channel
in interfaceHertsRpcClientIBuilder
- Parameters:
channel
- Channel- Returns:
- HertsCoreClientBuilder
-
interceptor
public HertsRpcClientIBuilder interceptor(io.grpc.ClientInterceptor interceptor)
Description copied from interface:HertsRpcClientIBuilder
Herts interceptor- Specified by:
interceptor
in interfaceHertsRpcClientIBuilder
- Parameters:
interceptor
- ClientInterceptor- Returns:
- HertsCoreClientBuilder
-
grpcOption
public HertsRpcClientIBuilder grpcOption(GrpcClientOption option)
Description copied from interface:HertsRpcClientIBuilder
gRPC option- Specified by:
grpcOption
in interfaceHertsRpcClientIBuilder
- Parameters:
option
- GrpcClientOption- Returns:
- HertsCoreClientBuilder
-
connect
public HertsRpcClient connect()
Description copied from interface:HertsRpcClientIBuilder
Connect to server- Specified by:
connect
in 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()
-
-