io.github.qsy7.data.pipe.modules.event.bus.EventBusSink Maven / Gradle / Ivy
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() {}
}