org.embulk.spi.Extension Maven / Gradle / Ivy
package org.embulk.spi;
import com.google.inject.Module;
import java.util.List;
import org.embulk.EmbulkSystemProperties;
/**
* Extension is a module to extend the execution framework using Guice.
* Unlike plugins, extensions can overwrite or add core components such as
* BufferManager, PluginSource, etc.
* Extension is not designed for users but for framework developers to make
* core components loosely coupled.
*
* An example extension to add a custom PluginSource will be as following:
*
*
* class MyPluginSourceExtension
* implements Extension, Module
* {
* public static class MyPluginSource
* implements PluginSource
* {
* // ...
* }
*
* {@literal @}Override
* public void configure(Binder binder)
* {
* Multibinder<PluginSource> multibinder = Multibinder.newSetBinder(binder, PluginSource.class);
* multibinder.addBinding().to(MyPluginSource.class);
* }
*
* {@literal @}Override
* public List<Module> getModules()
* {
* return ImmutableList.<Module>of(this);
* }
* }
*
*/
public interface Extension {
List getModules(final EmbulkSystemProperties embulkSystemProperties);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy