Extending the Plugin in Java
To add your own custom functionality to the plugin:
- Create a new Java library that links to the JAR files in the lib/ folder in the Advanced Clustering plugin zip file.
- In your Java library, create a class that implements the com.mirth.connect.plugins.clustering.server.core.ClusterEventHandler interface, and add your custom functionality to this class.
Note: You may want to retain a reference to the com .mirth.connect.plugins.clustering.server.core. Cluster instance that is passed to the onInit method because you can use this object to monitor and manipulate the cluster.
- Build the project as a JAR file, and add it to the custom-lib folder in your Mirth® Connect installation.
- Verify that the server.includecustomlib = true line exists in your conf/mirth.properties file.
- Run this query on your Mirth® Connect database: UPDATE CONFIGURATION SET VALUE = '$your fully qualified Java class name here$' WHERE NAME = 'cluster-event-handlers' AND category = 'Advanced Clustering'
- Restart Mirth® Connect.
For further assistance, contact NextGen Support.