io.vertx.resourceadapter.impl.WrappedEventBus Maven / Gradle / Ivy
package io.vertx.resourceadapter.impl;
import io.vertx.core.eventbus.DeliveryOptions;
import io.vertx.core.eventbus.EventBus;
import io.vertx.core.eventbus.MessageConsumer;
import io.vertx.core.streams.WriteStream;
import io.vertx.resourceadapter.VertxEventBus;
import java.util.logging.Logger;
/**
* @author Lin Gao
*
*/
@SuppressWarnings("unused")
public class WrappedEventBus implements VertxEventBus {
/** The logger */
private static Logger log = Logger.getLogger(WrappedEventBus.class.getName());
private final EventBus delegate;
public WrappedEventBus(EventBus bus) {
super();
if (bus == null) {
throw new IllegalArgumentException("EventBus can't be null.");
}
this.delegate = bus;
}
public VertxEventBus send(String address, Object message) {
this.delegate.send(address, message);
return this;
}
@Override
public VertxEventBus send(String address, Object message,
DeliveryOptions options) {
this.delegate.send(address, message, options);
return this;
}
@Override
public VertxEventBus publish(String address, Object message) {
this.delegate.publish(address, message);
return this;
}
@Override
public VertxEventBus publish(String address, Object message,
DeliveryOptions options) {
this.delegate.publish(address, message, options);
return this;
}
@Override
public WriteStream sender(String address) {
return this.delegate.sender(address);
}
@Override
public WriteStream sender(String address, DeliveryOptions options) {
return this.delegate.sender(address, options);
}
@Override
public WriteStream publisher(String address) {
return this.delegate.publisher(address);
}
@Override
public WriteStream publisher(String address, DeliveryOptions options) {
return this.delegate.publisher(address, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy