Package org.hertsstack.rpcclient
Class HertsRpcClientBuilder
- java.lang.Object
-
- org.hertsstack.rpcclient.HertsRpcClientBuilder
-
- All Implemented Interfaces:
HertsRpcClient
public class HertsRpcClientBuilder extends java.lang.Object implements HertsRpcClient
-
-
Constructor Summary
Constructors Constructor Description HertsRpcClientBuilder(IBuilder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IBuilderbuilder(java.lang.String connectedHost)static IBuilderbuilder(java.lang.String connectedHost, int serverPort)<T extends org.hertsstack.core.service.HertsService>
TcreateHertsRpcService(java.lang.Class<T> interfaceType)Create herts core interface<T extends org.hertsstack.core.service.HertsService>
TcreateHertsRpcService(java.lang.Class<T> interfaceClass, io.grpc.CallCredentials credentials)Create herts core interfaceio.grpc.ManagedChannelgetChannel()Get channeljava.lang.StringgetClient()Get clientId.org.hertsstack.rpcclient.ClientConnectiongetClientConnection()Get client connectionjava.lang.StringgetConnectedHost()Get connected hostorg.hertsstack.core.context.HertsTypegetHertsCoreType()Get registered herts typebooleanisSecureConnection()Is secure or not
-
-
-
Constructor Detail
-
HertsRpcClientBuilder
public HertsRpcClientBuilder(IBuilder builder)
-
-
Method Detail
-
builder
public static IBuilder builder(java.lang.String connectedHost, int serverPort)
-
builder
public static IBuilder builder(java.lang.String connectedHost)
-
getConnectedHost
public java.lang.String getConnectedHost()
Description copied from interface:HertsRpcClientGet connected host- Specified by:
getConnectedHostin interfaceHertsRpcClient- Returns:
- Connected host
-
isSecureConnection
public boolean isSecureConnection()
Description copied from interface:HertsRpcClientIs secure or not- Specified by:
isSecureConnectionin interfaceHertsRpcClient- Returns:
- Result
-
getHertsCoreType
public org.hertsstack.core.context.HertsType getHertsCoreType()
Description copied from interface:HertsRpcClientGet registered herts type- Specified by:
getHertsCoreTypein interfaceHertsRpcClient- Returns:
- HertsType
-
getClient
public java.lang.String getClient()
Description copied from interface:HertsRpcClientGet clientId.- Specified by:
getClientin interfaceHertsRpcClient- Returns:
- ClientId string
-
getChannel
public io.grpc.ManagedChannel getChannel()
Description copied from interface:HertsRpcClientGet channel- Specified by:
getChannelin interfaceHertsRpcClient- Returns:
- ManagedChannel
-
getClientConnection
public org.hertsstack.rpcclient.ClientConnection getClientConnection()
Description copied from interface:HertsRpcClientGet client connection- Specified by:
getClientConnectionin interfaceHertsRpcClient- Returns:
- modelx.ClientConnection
-
createHertsRpcService
public <T extends org.hertsstack.core.service.HertsService> T createHertsRpcService(java.lang.Class<T> interfaceType)
Description copied from interface:HertsRpcClientCreate herts core interface- Specified by:
createHertsRpcServicein interfaceHertsRpcClient- Type Parameters:
T- Generics- Parameters:
interfaceType- Class type- Returns:
- HertsService
-
createHertsRpcService
public <T extends org.hertsstack.core.service.HertsService> T createHertsRpcService(java.lang.Class<T> interfaceClass, io.grpc.CallCredentials credentials)Description copied from interface:HertsRpcClientCreate herts core interface- Specified by:
createHertsRpcServicein interfaceHertsRpcClient- Type Parameters:
T- Generics- Parameters:
interfaceClass- Class typecredentials- CallCredentials if you want set authentication- Returns:
- HertsService
-
-