Table of Contents
Infrastructure plugins
Meandre infrastructure plugins implement the MeandrePlugin interface shown below. They are used to provide particular functionality not provided by the infrastructure.
package org.meandre.plugins; import java.util.Properties; import java.util.logging.Logger; import org.meandre.configuration.CoreConfiguration; /**Interface implemented by the plugins * * @author Amit Kumar * @created Jan 10, 2008 * @Modified by Xavier Llorà * */ public interface MeandrePlugin { /** The name of the plugin. * * @return The name of the plugin */ public String getName(); /** Check if the plugin is a Filter*/ public boolean isFilter(); /** Is the plugin a servlet? * * @return True if it is a servlet */ public boolean isServlet(); /** Is the plugin a resource?. * * @return True if the plugin is a resource */ public boolean isResource(); /** The alias name. If it is a servlet is the context path. * * @return The alias */ public String getAlias(); /** The plugin class name. * * @return The class name */ public String getPluginClassName(); /** Return the plugin properties. * * @return The properties of the plugin */ public Properties getProperties(); /** Sets the logger to use * * @param log The logger */ public void setLogger(Logger log); /**Set this to true plugin was found and instantiated * * @param success */ public void inited(Boolean success); /**Return true or false * * @return */ public boolean isInited(); /** Sets the core configuration object to use. * * @param cnf The core configuration object */ public void setCoreConfiguration ( CoreConfiguration cnf ); }
Comments and considerations.
Plugins are intended to extend the functionality of the Meandre server. They can provide dedicated access to data source, extend the web services available, or simply add some extra machinery/interface to third party software. Please be aware that developing infrastructure plugins requires a good understanding of the Meandre infrastructure. Negligent creation of plugins can lead to catastrophic results. Also, before thinking about implementing an infrastructure plugin, ask yourself if the same goal cannot be achieved by creating specialized components for your flows.
The following steeps must be followed to get a plugin running in the infrastructure.
- Implement a Java class that implements the interface presented above.
- Remember that when added to the infrastructure, the plugin will be instantiate and added at boot time.
- Compile the probe.
- Add a entry to the plugin configuration file for the new probe where the key is the logic name of the plugin (see Meandre server configuration files for more details about the configuration file).
- Add the compiled probe to the class path of Meandre Server (restart the server if appropriate).