Skip to content

Custom Java Plugins


AMI is an extendable platform such that java plugins can be integrated at various touch points throughout the product. There are various types of plugins, each for supporting a particular purpose. Regardless of type, there are certain guidelines to follow when embedding a plugin into AMI:

  1. Write a Java class which implements the appropriate interface.

    • Each plugin should have a universally unique ID, returned by getPluginId()
    • Many plugins operate as "factories" which create instances of class. For example, the Datasource Plugin creates Datasource Adapters on demand
    • The compiled class(es) must be added to the classpath. This is most easily done by bundling them into a jar and placing the jar in the lib directory. All jars in the lib directory are automatically added to the class path
  2. Add the fully qualified Java class name to the appropriate property.

    • The name of the property coincides with the type of plugin
    • Defaults for a given plugin type are found in the config/ file. You should override the property in the config/ file).

In all cases, the plugins indirectly implement the AmiPlugin interface. Plugins are instantiated and initialized during startup, such that the failure of a plugin to startup will cause AMI to hard fail on startup. The exact reason for failure can be found in the log files.

Plugin List