public class GRPCClient extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
GRPCClient.Builder |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the client.
|
void |
close(boolean gracefull,
long awaitMS)
Closes the client with option to close it gracefully (e.g.
|
static GRPCClient |
getInstance(boolean ssl,
String host,
int port)
Deprecated.
|
static GRPCClient |
getInstance(boolean ssl,
String host,
int port,
io.vertx.core.Vertx vertx)
Deprecated.
|
static GRPCClient.Builder |
newBuilder()
Returns a builder for
GRPCClient . |
<S> S |
service(Class<S> serviceInterface,
Credential credential)
Get remote service.
|
<S> S |
service(String fullyQualifiedServiceName,
Class<S> serviceInterface,
Credential credential)
Get remote service.
|
<S> S |
service(String serviceName,
com.bosch.iot.dm.util.Version version,
Class<S> serviceInterface,
Credential credential)
Get remote service.
|
public static GRPCClient.Builder newBuilder()
GRPCClient
.@Deprecated public static GRPCClient getInstance(boolean ssl, String host, int port)
GRPCClient
.
ssl
- if SSL/TLS shall be usedhost
- remote hostport
- remote portGRPCClient
instance with specified target@Deprecated public static GRPCClient getInstance(boolean ssl, String host, int port, io.vertx.core.Vertx vertx)
GRPCClient
.
ssl
- if SSL/TLS shall be usedhost
- remote hostport
- remote portvertx
- vertx instance to be usedGRPCClient
instance with specified targetpublic <S> S service(Class<S> serviceInterface, Credential credential)
S
- service typeserviceInterface
- the service interface classcredential
- credentials to authorize the callerpublic <S> S service(String serviceName, com.bosch.iot.dm.util.Version version, Class<S> serviceInterface, Credential credential)
S
- service typeserviceName
- service name (with marshaler suffix if needed)version
- service versionserviceInterface
- the service interface classcredential
- credentials to authorize the callerpublic <S> S service(String fullyQualifiedServiceName, Class<S> serviceInterface, Credential credential)
S
- service typefullyQualifiedServiceName
- fully qualified service name (i.e. containing service name and version)serviceInterface
- the service interface classcredential
- credentials to authorize the callerpublic void close() throws InterruptedException
close
in interface AutoCloseable
InterruptedException
- if interruptedpublic void close(boolean gracefull, long awaitMS) throws InterruptedException
gracefull
- if to wait for execution of current callsawaitMS
- milliseconds to await for termination. If non-positive no termination is awaitedInterruptedException
- if interruptedCopyright © 2022 Bosch.IO GmbH. All rights reserved.