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 of
OriginPlugin, IntermediatePlugin, or TerminalPlugin.- Author:
- Jason Nichols (jason@openraven.com)
-
Method Summary
Modifier and TypeMethodDescriptionThe class of the configuration object passed toinit(Object, Logger)id()The unique ID of the plugin.voidInitialize the plugin with a configuration and Logger interface.default voidshutdown()
-
Method Details
-
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
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
The class of the configuration object passed toinit(Object, Logger)- Returns:
-