Sha256: 8b5a71b47afad5a3a56cbc94b10f78f93ffa1134c46ed399c70450a2a641994c

Contents?: true

Size: 1.2 KB

Versions: 5

Compression:

Stored size: 1.2 KB

Contents

package org.embulk.spi;

import java.util.List;
import com.google.inject.Module;
import org.embulk.config.ConfigSource;

/**
 * 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 developpers to make
 * core components loosely coupled.
 *
 * An example extention to add a custom PluginSource will be as following:
 *
 * <code>
 * class MyPluginSourceExtension
 *         implements Extension, Module
 * {
 *     public static class MyPluginSource
 *             implements PluginSource
 *     {
 *         // ...
 *     }
 *
 *     {@literal @}Override
 *     public void configure(Binder binder)
 *     {
 *         Multibinder&lt;PluginSource&gt; multibinder = Multibinder.newSetBinder(binder, PluginSource.class);
 *         multibinder.addBinding().to(MyPluginSource.class);
 *     }
 *
 *     {@literal @}Override
 *     public List&lt;Module&gt; getModules()
 *     {
 *         return ImmutableList.&lt;Module&gt;of(this);
 *     }
 * }
 * </code>
 */
public interface Extension
{
    List<Module> getModules(ConfigSource systemConfig);
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
embulk-0.6.27 embulk-core/src/main/java/org/embulk/spi/Extension.java
embulk-0.6.26 embulk-core/src/main/java/org/embulk/spi/Extension.java
embulk-0.6.25 embulk-core/src/main/java/org/embulk/spi/Extension.java
embulk-0.6.24 embulk-core/src/main/java/org/embulk/spi/Extension.java
embulk-0.6.23 embulk-core/src/main/java/org/embulk/spi/Extension.java