Package io.openraven.magpie.api
Interface MagpiePlugin<T>
-
- Type Parameters:
T- The configuration object class to be passed into theinit(Object config, Logger logger)init} method. This is a developer-defined Jackson-serializable POJO and should be distributed with the plugin.
- All Known Subinterfaces:
IntermediatePlugin<T>,OriginPlugin<T>,PolicyOutputPlugin<T>,TerminalPlugin<T>
public interface MagpiePlugin<T>Parent interface for Magpie plugins. This interface is not meant to be directly implemented but instead developers should implement one ofOriginPlugin,IntermediatePlugin, orTerminalPlugin.- Author:
- Jason Nichols (jason@openraven.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Class<T>configType()The class of the configuration object passed toinit(Object, Logger)Stringid()The unique ID of the plugin.voidinit(T config, org.slf4j.Logger logger)Initialize the plugin with a configuration and Logger interface.default voidshutdown()
-
-
-
Method Detail
-
id
String id()
The unique ID of the plugin. The name should follow the form <creator>.<service>.<plugintype>, for example "magpie.aws.discovery". Plugin type should be one- discovery
- transform
- output
- Returns:
- The unique ID of the plugin
-
init
void init(T config, org.slf4j.Logger logger)
Initialize the plugin with a configuration and Logger interface. Plugins should NOT instantiate their own logger and should instead use the provided one. Printing to stdout may break plugins or pipes relying on output in a certain schema. By default loggers print to stderr.- Parameters:
config- A configuration object for this plugin. This is a developer-defined Jackson-serializable POJO and should be distributed with the plugin.logger- An SLF4J logger instance to be used as needed.
-
shutdown
default void shutdown()
-
configType
Class<T> configType()
The class of the configuration object passed toinit(Object, Logger)- Returns:
-
-