
package uk.co.wingpath.modbus;

import java.io.*;

/**
* Interface for handlers of Modbus responses.
*/
public interface ModbusResponseHandler
{
    /**
    * Called when a Modbus transaction has finished.
    * The transaction will contain a response (see
    * {@link ModbusTransaction#getResponse}) and
    * possibly an exception (see {@link ModbusTransaction#getException}).
    * If an error response has been received, the transaction will contain
    * exception constructed from the response.
    * If an exception has been set for some other error, the transaction will
    * contain an error response contructed from the exception.
    * @param trans the transaction.
    */
    public void handleResponse (ModbusTransaction trans);
}

