public class GRPCServiceFactory extends Object implements com.bosch.iot.dm.rpc.ServiceFactory, AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
GRPCServiceFactory.Builder |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the service factory.
|
void |
close(boolean gracefull,
long awaitMS)
Closes the client with option to close it gracefully (e.g.
|
protected void |
finalize() |
static GRPCServiceFactory.Builder |
newBuilder() |
<S> S |
service(Class<S> serviceInterface)
Get remote service.
|
<S> S |
service(String fullyQualifiedServiceName,
Class<S> serviceInterface)
Get remote service.
|
<S> S |
service(String serviceName,
com.bosch.iot.dm.util.Version version,
Class<S> serviceInterface)
Get remote service.
|
public static GRPCServiceFactory.Builder newBuilder()
public <S> S service(Class<S> serviceInterface)
service
in interface com.bosch.iot.dm.rpc.ServiceFactory
S
- service typeserviceInterface
- the service interface classpublic <S> S service(String serviceName, com.bosch.iot.dm.util.Version version, Class<S> serviceInterface)
service
in interface com.bosch.iot.dm.rpc.ServiceFactory
S
- service typeserviceName
- service name (with marshaler suffix if needed)version
- service versionserviceInterface
- the service interface classpublic <S> S service(String fullyQualifiedServiceName, Class<S> serviceInterface)
service
in interface com.bosch.iot.dm.rpc.ServiceFactory
S
- service typefullyQualifiedServiceName
- fully qualified service name (i.e. containing service name and version)serviceInterface
- the service interface classpublic 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.