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 IBuilder
builder(java.lang.String connectedHost)
static IBuilder
builder(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.ManagedChannel
getChannel()
Get channeljava.lang.String
getClient()
Get clientId.org.hertsstack.rpcclient.ClientConnection
getClientConnection()
Get client connectionjava.lang.String
getConnectedHost()
Get connected hostorg.hertsstack.core.context.HertsType
getHertsCoreType()
Get registered herts typeboolean
isSecureConnection()
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:HertsRpcClient
Get connected host- Specified by:
getConnectedHost
in interfaceHertsRpcClient
- Returns:
- Connected host
-
isSecureConnection
public boolean isSecureConnection()
Description copied from interface:HertsRpcClient
Is secure or not- Specified by:
isSecureConnection
in interfaceHertsRpcClient
- Returns:
- Result
-
getHertsCoreType
public org.hertsstack.core.context.HertsType getHertsCoreType()
Description copied from interface:HertsRpcClient
Get registered herts type- Specified by:
getHertsCoreType
in interfaceHertsRpcClient
- Returns:
- HertsType
-
getClient
public java.lang.String getClient()
Description copied from interface:HertsRpcClient
Get clientId.- Specified by:
getClient
in interfaceHertsRpcClient
- Returns:
- ClientId string
-
getChannel
public io.grpc.ManagedChannel getChannel()
Description copied from interface:HertsRpcClient
Get channel- Specified by:
getChannel
in interfaceHertsRpcClient
- Returns:
- ManagedChannel
-
getClientConnection
public org.hertsstack.rpcclient.ClientConnection getClientConnection()
Description copied from interface:HertsRpcClient
Get client connection- Specified by:
getClientConnection
in interfaceHertsRpcClient
- Returns:
- modelx.ClientConnection
-
createHertsRpcService
public <T extends org.hertsstack.core.service.HertsService> T createHertsRpcService(java.lang.Class<T> interfaceType)
Description copied from interface:HertsRpcClient
Create herts core interface- Specified by:
createHertsRpcService
in 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:HertsRpcClient
Create herts core interface- Specified by:
createHertsRpcService
in interfaceHertsRpcClient
- Type Parameters:
T
- Generics- Parameters:
interfaceClass
- Class typecredentials
- CallCredentials if you want set authentication- Returns:
- HertsService
-
-