Package net.solarnetwork.io.modbus
Interface ModbusClientConnectionObserver
public interface ModbusClientConnectionObserver
API for an observer of ModbusClient connection state.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconnectionClosed(ModbusClient client, ModbusClientConfig config, Throwable exception, boolean willReconnect) A connection has been closed.voidconnectionOpened(ModbusClient client, ModbusClientConfig config) A connection has been established.
-
Method Details
-
connectionOpened
A connection has been established.- Parameters:
client- the client that has established the connectionconfig- the client's configuration
-
connectionClosed
void connectionClosed(ModbusClient client, ModbusClientConfig config, Throwable exception, boolean willReconnect) A connection has been closed.- Parameters:
client- the client whose connection has been closedconfig- the client's configurationexception- an exception, if anywillReconnect- true if the client will automatically attempt to re-establish the connection
-