The OpenDOF Connection Reconnecting Listener for Java provides a simple API that monitors the state of connections and attempts to keep them connected.
If a connection associated with a Reconnecting Listener is disconnected, the listener attempts to connect it. Using a smart back-off timer, the listener continues attempting to connect until it is successful. The listener then continues to listen, and the cycle is repeated if the connection becomes disconnected again.
To use this API, simply import it and pass an instance of it as an argument to the DOFConnection.addStateListener method, as in the following example:
import org.opendof.sdk.ReconnectingStateListener; aDOFConnectionInstance.addStateListener(new ReconnectingStateListener());
For more information, refer to the associated Javadocs.
This project uses Apache Ant and Apache Ivy to build and resolve dependencies. In addition, a Java Development Kit (JDK) of 1.7 or greater is required.
To build, make sure any dependencies are available in a configured Ivy repository, and execute ant dist in the root of the project (this is the default ant target).
To publish the build to your local ivy repository (and make it available for other builds to depend on), execute ant publish.
If you plan to make a complete distribution including source, you will also need to use the dist-src and publish-src targets.
Typically, these would be executed prior to the binary build (dist and publish targets), since they require a clean directory.
Issues can be reported through the issue tracking system of the OpenDOF Project at https://issue.opendof.org
Information on the process for reporting an issue can be found at https://opendof.org/report-an-issue.