public class GatewayClientBuilder extends Object
Constructor and Description |
---|
GatewayClientBuilder()
Constructs a GatewayClientBuilder object
|
Modifier and Type | Method and Description |
---|---|
GatewayClientBuilder |
addAllConnectionInfo(Collection<ConnectionInfo> connectionInfos)
Adds all the connections.
|
GatewayClientBuilder |
addConnectionInfo(ConnectionInfo connectionInfo)
Adds a connection info
|
GatewayClientBuilder |
addDeviceEventHandler(DeviceEventHandler handler)
Add a device event handler that is called when a device is added, or removed
|
GatewayClient |
build()
Constructs a new GatewayClient object upon invocation
|
GatewayClientBuilder |
setConfigFilePath(String configFilePath)
Sets the config file path for custom configs of gateway devices
|
public GatewayClientBuilder()
public GatewayClientBuilder addConnectionInfo(ConnectionInfo connectionInfo)
connectionInfo
- The Connection InformationNullPointerException
- if connectionInfo
is nullpublic GatewayClientBuilder addAllConnectionInfo(Collection<ConnectionInfo> connectionInfos)
connectionInfos
- List of ConnectionInfo to addNullPointerException
- if connectionInfo
is nullpublic GatewayClientBuilder addDeviceEventHandler(DeviceEventHandler handler)
handler
- Listener to consume device eventsNullPointerException
- if handler is nullpublic GatewayClientBuilder setConfigFilePath(String configFilePath)
configFilePath
- Config File PathNullPointerException
- if configFilePath is emptypublic GatewayClient build() throws GatewayConnectionException
GatewayConnectionException
- if there were any problems connection to, or configuring,
any of the specified network interfaces represented by the ConnectionInfo object list.Copyright © 2020. All rights reserved.