All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.qsy7.data.pipe.modules.event.bus.EventBusSink Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package io.github.qsy7.data.pipe.modules.event.bus;

import com.google.common.eventbus.EventBus;
import io.github.qsy7.data.pipe.impl.AbstractSink;
import io.github.qsy7.data.pipe.modules.event.bus.api.model.EventBusSinkConfiguration;
import java.io.Serializable;
import jakarta.inject.Inject;

public class EventBusSink extends AbstractSink {
  protected final EventBus eventBus;

  @Inject
  public EventBusSink(EventBus eventBus) {

    this.eventBus = eventBus;
  }

  @Override
  protected void doConfigure() {}

  @Override
  public void accept(Serializable record) {
    eventBus.post(record);
  }

  public void close() {}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy