/*
* Copyright 2014 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.vertx.reactivex.rabbitmq;
import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.Flowable;
import io.reactivex.Single;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import io.vertx.rabbitmq.RabbitMQOptions;
import io.vertx.core.json.JsonObject;
import io.vertx.rabbitmq.QueueOptions;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
NOTE: This class has been automatically generated from the original
non RX-ified interface using Vert.x codegen. /**
*
* <p/>
* NOTE: This class has been automatically generated from the {@link io.vertx.rabbitmq.RabbitMQClient original} non RX-ified interface using Vert.x codegen.
*/
@io.vertx.lang.rx.RxGen(io.vertx.rabbitmq.RabbitMQClient.class)
public class RabbitMQClient {
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RabbitMQClient that = (RabbitMQClient) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public static final io.vertx.lang.rx.TypeArg<RabbitMQClient> __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>( obj -> new RabbitMQClient((io.vertx.rabbitmq.RabbitMQClient) obj),
RabbitMQClient::getDelegate
);
private final io.vertx.rabbitmq.RabbitMQClient delegate;
public RabbitMQClient(io.vertx.rabbitmq.RabbitMQClient delegate) {
this.delegate = delegate;
}
public io.vertx.rabbitmq.RabbitMQClient getDelegate() {
return delegate;
}
Create and return a client configured with the default options.
Params: - vertx – the vertx instance
Returns: the client
/**
* Create and return a client configured with the default options.
* @param vertx the vertx instance
* @return the client
*/
public static io.vertx.reactivex.rabbitmq.RabbitMQClient create(io.vertx.reactivex.core.Vertx vertx) {
io.vertx.reactivex.rabbitmq.RabbitMQClient ret = io.vertx.reactivex.rabbitmq.RabbitMQClient.newInstance(io.vertx.rabbitmq.RabbitMQClient.create(vertx.getDelegate()));
return ret;
}
Create and return a client.
Params: - vertx – the vertx instance
- config – the client config
Returns: the client
/**
* Create and return a client.
* @param vertx the vertx instance
* @param config the client config
* @return the client
*/
public static io.vertx.reactivex.rabbitmq.RabbitMQClient create(io.vertx.reactivex.core.Vertx vertx, RabbitMQOptions config) {
io.vertx.reactivex.rabbitmq.RabbitMQClient ret = io.vertx.reactivex.rabbitmq.RabbitMQClient.newInstance(io.vertx.rabbitmq.RabbitMQClient.create(vertx.getDelegate(), config));
return ret;
}
Acknowledge one or several received messages. Supply the deliveryTag from the AMQP.Basic.GetOk or AMQP.Basic.Deliver
method containing the received message being acknowledged.
Params: - deliveryTag –
- multiple –
- resultHandler –
/**
* Acknowledge one or several received messages. Supply the deliveryTag from the AMQP.Basic.GetOk or AMQP.Basic.Deliver
* method containing the received message being acknowledged.
* @param deliveryTag
* @param multiple
* @param resultHandler
*/
public void basicAck(long deliveryTag, boolean multiple, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.basicAck(deliveryTag, multiple, resultHandler);
}
Acknowledge one or several received messages. Supply the deliveryTag from the AMQP.Basic.GetOk or AMQP.Basic.Deliver
method containing the received message being acknowledged.
Params: - deliveryTag –
- multiple –
Returns:
/**
* Acknowledge one or several received messages. Supply the deliveryTag from the AMQP.Basic.GetOk or AMQP.Basic.Deliver
* method containing the received message being acknowledged.
* @param deliveryTag
* @param multiple
* @return
*/
public Single<JsonObject> rxBasicAck(long deliveryTag, boolean multiple) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
basicAck(deliveryTag, multiple, handler);
});
}
Reject one or several received messages.
Params: - deliveryTag –
- multiple –
- requeue –
- resultHandler –
/**
* Reject one or several received messages.
* @param deliveryTag
* @param multiple
* @param requeue
* @param resultHandler
*/
public void basicNack(long deliveryTag, boolean multiple, boolean requeue, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.basicNack(deliveryTag, multiple, requeue, resultHandler);
}
Reject one or several received messages.
Params: - deliveryTag –
- multiple –
- requeue –
Returns:
/**
* Reject one or several received messages.
* @param deliveryTag
* @param multiple
* @param requeue
* @return
*/
public Single<JsonObject> rxBasicNack(long deliveryTag, boolean multiple, boolean requeue) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
basicNack(deliveryTag, multiple, requeue, handler);
});
}
Retrieve a message from a queue using AMQP.Basic.Get
Params: - queue –
- autoAck –
- resultHandler –
/**
* Retrieve a message from a queue using AMQP.Basic.Get
* @param queue
* @param autoAck
* @param resultHandler
*/
public void basicGet(String queue, boolean autoAck, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.basicGet(queue, autoAck, resultHandler);
}
Retrieve a message from a queue using AMQP.Basic.Get
Params: - queue –
- autoAck –
Returns:
/**
* Retrieve a message from a queue using AMQP.Basic.Get
* @param queue
* @param autoAck
* @return
*/
public Single<JsonObject> rxBasicGet(String queue, boolean autoAck) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
basicGet(queue, autoAck, handler);
});
}
Use basicConsumer
instead
Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.
Params: - queue –
- address –
- resultHandler –
/**
* Use {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsumer} instead
* <p>
* Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.
* @param queue
* @param address
* @param resultHandler
*/
@Deprecated()
public void basicConsume(String queue, String address, Handler<AsyncResult<String>> resultHandler) {
delegate.basicConsume(queue, address, resultHandler);
}
Use basicConsumer
instead
Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.
Params: - queue –
- address –
Returns:
/**
* Use {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsumer} instead
* <p>
* Start a non-nolocal, non-exclusive consumer, with auto acknowledgement and a server-generated consumerTag.
* @param queue
* @param address
* @return
*/
@Deprecated()
public Single<String> rxBasicConsume(String queue, String address) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
basicConsume(queue, address, handler);
});
}
Use basicConsumer
instead
Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag.
Params: - queue –
- address –
- autoAck –
- resultHandler –
/**
* Use {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsumer} instead
* <p>
* Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag.
* @param queue
* @param address
* @param autoAck
* @param resultHandler
*/
@Deprecated()
public void basicConsume(String queue, String address, boolean autoAck, Handler<AsyncResult<String>> resultHandler) {
delegate.basicConsume(queue, address, autoAck, resultHandler);
}
Use basicConsumer
instead
Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag.
Params: - queue –
- address –
- autoAck –
Returns:
/**
* Use {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsumer} instead
* <p>
* Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag.
* @param queue
* @param address
* @param autoAck
* @return
*/
@Deprecated()
public Single<String> rxBasicConsume(String queue, String address, boolean autoAck) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
basicConsume(queue, address, autoAck, handler);
});
}
Use basicConsumer
instead
Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag and error handler
Params: - queue –
- address –
- autoAck –
- resultHandler –
- errorHandler –
/**
* Use {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsumer} instead
* <p>
* Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag and error handler
* @param queue
* @param address
* @param autoAck
* @param resultHandler
* @param errorHandler
*/
@Deprecated()
public void basicConsume(String queue, String address, boolean autoAck, Handler<AsyncResult<String>> resultHandler, Handler<Throwable> errorHandler) {
delegate.basicConsume(queue, address, autoAck, resultHandler, errorHandler);
}
Instead of using this and basicConsume
method, basicConsumer
and RabbitMQConsumer.cancel
instead This method should be called when you want to cancel consumption from a queue, started by calling basicConsume
.
Params: - consumerTag –
/**
* Instead of using this and {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsume} method,
* {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsumer} and {@link io.vertx.reactivex.rabbitmq.RabbitMQConsumer#cancel} instead
* <p>
* This method should be called when you want to cancel consumption from a queue,
* started by calling {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsume}.
* @param consumerTag
*/
@Deprecated()
public void basicCancel(String consumerTag) {
delegate.basicCancel(consumerTag);
}
Instead of using this and basicConsume
method, basicConsumer
and RabbitMQConsumer.cancel
instead This method should be called when you want to cancel consumption from a queue, started by calling basicConsume
.
Params: - consumerTag –
- resultHandler –
/**
* Instead of using this and {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsume} method,
* {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsumer} and {@link io.vertx.reactivex.rabbitmq.RabbitMQConsumer#cancel} instead
* <p>
* This method should be called when you want to cancel consumption from a queue,
* started by calling {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsume}.
* @param consumerTag
* @param resultHandler
*/
@Deprecated()
public void basicCancel(String consumerTag, Handler<AsyncResult<Void>> resultHandler) {
delegate.basicCancel(consumerTag, resultHandler);
}
Instead of using this and basicConsume
method, basicConsumer
and RabbitMQConsumer.cancel
instead This method should be called when you want to cancel consumption from a queue, started by calling basicConsume
.
Params: - consumerTag –
Returns:
/**
* Instead of using this and {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsume} method,
* {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsumer} and {@link io.vertx.reactivex.rabbitmq.RabbitMQConsumer#cancel} instead
* <p>
* This method should be called when you want to cancel consumption from a queue,
* started by calling {@link io.vertx.reactivex.rabbitmq.RabbitMQClient#basicConsume}.
* @param consumerTag
* @return
*/
@Deprecated()
public Completable rxBasicCancel(String consumerTag) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
basicCancel(consumerTag, handler);
});
}
Params: - queue –
- resultHandler –
/**
* @param queue
* @param resultHandler
*/
public void basicConsumer(String queue, Handler<AsyncResult<io.vertx.reactivex.rabbitmq.RabbitMQConsumer>> resultHandler) {
delegate.basicConsumer(queue, new Handler<AsyncResult<io.vertx.rabbitmq.RabbitMQConsumer>>() {
public void handle(AsyncResult<io.vertx.rabbitmq.RabbitMQConsumer> ar) {
if (ar.succeeded()) {
resultHandler.handle(io.vertx.core.Future.succeededFuture(io.vertx.reactivex.rabbitmq.RabbitMQConsumer.newInstance(ar.result())));
} else {
resultHandler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
}
}
});
}
Params: - queue –
Returns:
/**
* @param queue
* @return
*/
public Single<io.vertx.reactivex.rabbitmq.RabbitMQConsumer> rxBasicConsumer(String queue) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
basicConsumer(queue, handler);
});
}
Create a consumer with the given options
.
Params: - queue – the name of a queue
- options – options for queue
- resultHandler – a handler through which you can find out the operation status; if the operation succeeds you can begin to receive messages through an instance of
RabbitMQConsumer
/**
* Create a consumer with the given <code>options</code>.
* @param queue the name of a queue
* @param options options for queue
* @param resultHandler a handler through which you can find out the operation status; if the operation succeeds you can begin to receive messages through an instance of {@link io.vertx.reactivex.rabbitmq.RabbitMQConsumer}
*/
public void basicConsumer(String queue, QueueOptions options, Handler<AsyncResult<io.vertx.reactivex.rabbitmq.RabbitMQConsumer>> resultHandler) {
delegate.basicConsumer(queue, options, new Handler<AsyncResult<io.vertx.rabbitmq.RabbitMQConsumer>>() {
public void handle(AsyncResult<io.vertx.rabbitmq.RabbitMQConsumer> ar) {
if (ar.succeeded()) {
resultHandler.handle(io.vertx.core.Future.succeededFuture(io.vertx.reactivex.rabbitmq.RabbitMQConsumer.newInstance(ar.result())));
} else {
resultHandler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
}
}
});
}
Create a consumer with the given options
.
Params: - queue – the name of a queue
- options – options for queue
Returns:
/**
* Create a consumer with the given <code>options</code>.
* @param queue the name of a queue
* @param options options for queue
* @return
*/
public Single<io.vertx.reactivex.rabbitmq.RabbitMQConsumer> rxBasicConsumer(String queue, QueueOptions options) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
basicConsumer(queue, options, handler);
});
}
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception,
which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.
Params: - exchange –
- routingKey –
- message –
- resultHandler –
/**
* Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception,
* which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.
* @param exchange
* @param routingKey
* @param message
* @param resultHandler
*/
public void basicPublish(String exchange, String routingKey, JsonObject message, Handler<AsyncResult<Void>> resultHandler) {
delegate.basicPublish(exchange, routingKey, message, resultHandler);
}
Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception,
which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.
Params: - exchange –
- routingKey –
- message –
Returns:
/**
* Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception,
* which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.
* @param exchange
* @param routingKey
* @param message
* @return
*/
public Completable rxBasicPublish(String exchange, String routingKey, JsonObject message) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
basicPublish(exchange, routingKey, message, handler);
});
}
Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish()
will have to be confirmed.
Params: - resultHandler –
/**
* Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish()
* will have to be confirmed.
* @param resultHandler
*/
public void confirmSelect(Handler<AsyncResult<Void>> resultHandler) {
delegate.confirmSelect(resultHandler);
}
Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish()
will have to be confirmed.
Returns:
/**
* Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish()
* will have to be confirmed.
* @return
*/
public Completable rxConfirmSelect() {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
confirmSelect(handler);
});
}
Wait until all messages published since the last call have been either ack'd or nack'd by the broker.
This will incur slight performance loss at the expense of higher write consistency.
If desired, multiple calls to basicPublish() can be batched before confirming.
Params: - resultHandler –
/**
* Wait until all messages published since the last call have been either ack'd or nack'd by the broker.
* This will incur slight performance loss at the expense of higher write consistency.
* If desired, multiple calls to basicPublish() can be batched before confirming.
* @param resultHandler
*/
public void waitForConfirms(Handler<AsyncResult<Void>> resultHandler) {
delegate.waitForConfirms(resultHandler);
}
Wait until all messages published since the last call have been either ack'd or nack'd by the broker.
This will incur slight performance loss at the expense of higher write consistency.
If desired, multiple calls to basicPublish() can be batched before confirming.
Returns:
/**
* Wait until all messages published since the last call have been either ack'd or nack'd by the broker.
* This will incur slight performance loss at the expense of higher write consistency.
* If desired, multiple calls to basicPublish() can be batched before confirming.
* @return
*/
public Completable rxWaitForConfirms() {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
waitForConfirms(handler);
});
}
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.
Params: - timeout –
- resultHandler –
/**
* Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.
* @param timeout
* @param resultHandler
*/
public void waitForConfirms(long timeout, Handler<AsyncResult<Void>> resultHandler) {
delegate.waitForConfirms(timeout, resultHandler);
}
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.
Params: - timeout –
Returns:
/**
* Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.
* @param timeout
* @return
*/
public Completable rxWaitForConfirms(long timeout) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
waitForConfirms(timeout, handler);
});
}
Request a specific prefetchCount "quality of service" settings
for this channel.
Params: - prefetchCount – maximum number of messages that the server will deliver, 0 if unlimited
- resultHandler – handler called when operation is done with a result of the operation
/**
* Request a specific prefetchCount "quality of service" settings
* for this channel.
* @param prefetchCount maximum number of messages that the server will deliver, 0 if unlimited
* @param resultHandler handler called when operation is done with a result of the operation
*/
public void basicQos(int prefetchCount, Handler<AsyncResult<Void>> resultHandler) {
delegate.basicQos(prefetchCount, resultHandler);
}
Request a specific prefetchCount "quality of service" settings
for this channel.
Params: - prefetchCount – maximum number of messages that the server will deliver, 0 if unlimited
Returns:
/**
* Request a specific prefetchCount "quality of service" settings
* for this channel.
* @param prefetchCount maximum number of messages that the server will deliver, 0 if unlimited
* @return
*/
public Completable rxBasicQos(int prefetchCount) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
basicQos(prefetchCount, handler);
});
}
Request a specific prefetchCount "quality of service" settings
for this channel.
Params: - prefetchCount – maximum number of messages that the server will deliver, 0 if unlimited
- global – true if the settings should be applied to the entire channel rather than each consumer
- resultHandler – handler called when operation is done with a result of the operation
/**
* Request a specific prefetchCount "quality of service" settings
* for this channel.
* @param prefetchCount maximum number of messages that the server will deliver, 0 if unlimited
* @param global true if the settings should be applied to the entire channel rather than each consumer
* @param resultHandler handler called when operation is done with a result of the operation
*/
public void basicQos(int prefetchCount, boolean global, Handler<AsyncResult<Void>> resultHandler) {
delegate.basicQos(prefetchCount, global, resultHandler);
}
Request a specific prefetchCount "quality of service" settings
for this channel.
Params: - prefetchCount – maximum number of messages that the server will deliver, 0 if unlimited
- global – true if the settings should be applied to the entire channel rather than each consumer
Returns:
/**
* Request a specific prefetchCount "quality of service" settings
* for this channel.
* @param prefetchCount maximum number of messages that the server will deliver, 0 if unlimited
* @param global true if the settings should be applied to the entire channel rather than each consumer
* @return
*/
public Completable rxBasicQos(int prefetchCount, boolean global) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
basicQos(prefetchCount, global, handler);
});
}
Request specific "quality of service" settings.
These settings impose limits on the amount of data the server
will deliver to consumers before requiring acknowledgements.
Thus they provide a means of consumer-initiated flow control.
Params: - prefetchSize – maximum amount of content (measured in octets) that the server will deliver, 0 if unlimited
- prefetchCount – maximum number of messages that the server will deliver, 0 if unlimited
- global – true if the settings should be applied to the entire channel rather than each consumer
- resultHandler – handler called when operation is done with a result of the operation
/**
* Request specific "quality of service" settings.
*
* These settings impose limits on the amount of data the server
* will deliver to consumers before requiring acknowledgements.
* Thus they provide a means of consumer-initiated flow control.
* @param prefetchSize maximum amount of content (measured in octets) that the server will deliver, 0 if unlimited
* @param prefetchCount maximum number of messages that the server will deliver, 0 if unlimited
* @param global true if the settings should be applied to the entire channel rather than each consumer
* @param resultHandler handler called when operation is done with a result of the operation
*/
public void basicQos(int prefetchSize, int prefetchCount, boolean global, Handler<AsyncResult<Void>> resultHandler) {
delegate.basicQos(prefetchSize, prefetchCount, global, resultHandler);
}
Request specific "quality of service" settings.
These settings impose limits on the amount of data the server
will deliver to consumers before requiring acknowledgements.
Thus they provide a means of consumer-initiated flow control.
Params: - prefetchSize – maximum amount of content (measured in octets) that the server will deliver, 0 if unlimited
- prefetchCount – maximum number of messages that the server will deliver, 0 if unlimited
- global – true if the settings should be applied to the entire channel rather than each consumer
Returns:
/**
* Request specific "quality of service" settings.
*
* These settings impose limits on the amount of data the server
* will deliver to consumers before requiring acknowledgements.
* Thus they provide a means of consumer-initiated flow control.
* @param prefetchSize maximum amount of content (measured in octets) that the server will deliver, 0 if unlimited
* @param prefetchCount maximum number of messages that the server will deliver, 0 if unlimited
* @param global true if the settings should be applied to the entire channel rather than each consumer
* @return
*/
public Completable rxBasicQos(int prefetchSize, int prefetchCount, boolean global) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
basicQos(prefetchSize, prefetchCount, global, handler);
});
}
Declare an exchange.
Params: - exchange –
- type –
- durable –
- autoDelete –
- resultHandler –
/**
* Declare an exchange.
* @param exchange
* @param type
* @param durable
* @param autoDelete
* @param resultHandler
*/
public void exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, Handler<AsyncResult<Void>> resultHandler) {
delegate.exchangeDeclare(exchange, type, durable, autoDelete, resultHandler);
}
Declare an exchange.
Params: - exchange –
- type –
- durable –
- autoDelete –
Returns:
/**
* Declare an exchange.
* @param exchange
* @param type
* @param durable
* @param autoDelete
* @return
*/
public Completable rxExchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
exchangeDeclare(exchange, type, durable, autoDelete, handler);
});
}
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.
Params: - exchange –
- type –
- durable –
- autoDelete –
- config –
- resultHandler –
/**
* Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.
* @param exchange
* @param type
* @param durable
* @param autoDelete
* @param config
* @param resultHandler
*/
public void exchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, JsonObject config, Handler<AsyncResult<Void>> resultHandler) {
delegate.exchangeDeclare(exchange, type, durable, autoDelete, config, resultHandler);
}
Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.
Params: - exchange –
- type –
- durable –
- autoDelete –
- config –
Returns:
/**
* Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.
* @param exchange
* @param type
* @param durable
* @param autoDelete
* @param config
* @return
*/
public Completable rxExchangeDeclare(String exchange, String type, boolean durable, boolean autoDelete, JsonObject config) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
exchangeDeclare(exchange, type, durable, autoDelete, config, handler);
});
}
Delete an exchange, without regard for whether it is in use or not.
Params: - exchange –
- resultHandler –
/**
* Delete an exchange, without regard for whether it is in use or not.
* @param exchange
* @param resultHandler
*/
public void exchangeDelete(String exchange, Handler<AsyncResult<Void>> resultHandler) {
delegate.exchangeDelete(exchange, resultHandler);
}
Delete an exchange, without regard for whether it is in use or not.
Params: - exchange –
Returns:
/**
* Delete an exchange, without regard for whether it is in use or not.
* @param exchange
* @return
*/
public Completable rxExchangeDelete(String exchange) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
exchangeDelete(exchange, handler);
});
}
Bind an exchange to an exchange.
Params: - destination –
- source –
- routingKey –
- resultHandler –
/**
* Bind an exchange to an exchange.
* @param destination
* @param source
* @param routingKey
* @param resultHandler
*/
public void exchangeBind(String destination, String source, String routingKey, Handler<AsyncResult<Void>> resultHandler) {
delegate.exchangeBind(destination, source, routingKey, resultHandler);
}
Bind an exchange to an exchange.
Params: - destination –
- source –
- routingKey –
Returns:
/**
* Bind an exchange to an exchange.
* @param destination
* @param source
* @param routingKey
* @return
*/
public Completable rxExchangeBind(String destination, String source, String routingKey) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
exchangeBind(destination, source, routingKey, handler);
});
}
Unbind an exchange from an exchange.
Params: - destination –
- source –
- routingKey –
- resultHandler –
/**
* Unbind an exchange from an exchange.
* @param destination
* @param source
* @param routingKey
* @param resultHandler
*/
public void exchangeUnbind(String destination, String source, String routingKey, Handler<AsyncResult<Void>> resultHandler) {
delegate.exchangeUnbind(destination, source, routingKey, resultHandler);
}
Unbind an exchange from an exchange.
Params: - destination –
- source –
- routingKey –
Returns:
/**
* Unbind an exchange from an exchange.
* @param destination
* @param source
* @param routingKey
* @return
*/
public Completable rxExchangeUnbind(String destination, String source, String routingKey) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
exchangeUnbind(destination, source, routingKey, handler);
});
}
Actively declare a server-named exclusive, autodelete, non-durable queue.
Params: - resultHandler –
/**
* Actively declare a server-named exclusive, autodelete, non-durable queue.
* @param resultHandler
*/
public void queueDeclareAuto(Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.queueDeclareAuto(resultHandler);
}
Actively declare a server-named exclusive, autodelete, non-durable queue.
Returns:
/**
* Actively declare a server-named exclusive, autodelete, non-durable queue.
* @return
*/
public Single<JsonObject> rxQueueDeclareAuto() {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
queueDeclareAuto(handler);
});
}
Declare a queue
Params: - queue –
- durable –
- exclusive –
- autoDelete –
- resultHandler –
/**
* Declare a queue
* @param queue
* @param durable
* @param exclusive
* @param autoDelete
* @param resultHandler
*/
public void queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.queueDeclare(queue, durable, exclusive, autoDelete, resultHandler);
}
Declare a queue
Params: - queue –
- durable –
- exclusive –
- autoDelete –
Returns:
/**
* Declare a queue
* @param queue
* @param durable
* @param exclusive
* @param autoDelete
* @return
*/
public Single<JsonObject> rxQueueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
queueDeclare(queue, durable, exclusive, autoDelete, handler);
});
}
Declare a queue with config options
Params: - queue –
- durable –
- exclusive –
- autoDelete –
- config –
- resultHandler –
/**
* Declare a queue with config options
* @param queue
* @param durable
* @param exclusive
* @param autoDelete
* @param config
* @param resultHandler
*/
public void queueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, JsonObject config, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.queueDeclare(queue, durable, exclusive, autoDelete, config, resultHandler);
}
Declare a queue with config options
Params: - queue –
- durable –
- exclusive –
- autoDelete –
- config –
Returns:
/**
* Declare a queue with config options
* @param queue
* @param durable
* @param exclusive
* @param autoDelete
* @param config
* @return
*/
public Single<JsonObject> rxQueueDeclare(String queue, boolean durable, boolean exclusive, boolean autoDelete, JsonObject config) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
queueDeclare(queue, durable, exclusive, autoDelete, config, handler);
});
}
Delete a queue, without regard for whether it is in use or has messages on it
Params: - queue –
- resultHandler –
/**
* Delete a queue, without regard for whether it is in use or has messages on it
* @param queue
* @param resultHandler
*/
public void queueDelete(String queue, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.queueDelete(queue, resultHandler);
}
Delete a queue, without regard for whether it is in use or has messages on it
Params: - queue –
Returns:
/**
* Delete a queue, without regard for whether it is in use or has messages on it
* @param queue
* @return
*/
public Single<JsonObject> rxQueueDelete(String queue) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
queueDelete(queue, handler);
});
}
Delete a queue
Params: - queue –
- ifUnused –
- ifEmpty –
- resultHandler –
/**
* Delete a queue
* @param queue
* @param ifUnused
* @param ifEmpty
* @param resultHandler
*/
public void queueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty, Handler<AsyncResult<JsonObject>> resultHandler) {
delegate.queueDeleteIf(queue, ifUnused, ifEmpty, resultHandler);
}
Delete a queue
Params: - queue –
- ifUnused –
- ifEmpty –
Returns:
/**
* Delete a queue
* @param queue
* @param ifUnused
* @param ifEmpty
* @return
*/
public Single<JsonObject> rxQueueDeleteIf(String queue, boolean ifUnused, boolean ifEmpty) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
queueDeleteIf(queue, ifUnused, ifEmpty, handler);
});
}
Bind a queue to an exchange
Params: - queue –
- exchange –
- routingKey –
- resultHandler –
/**
* Bind a queue to an exchange
* @param queue
* @param exchange
* @param routingKey
* @param resultHandler
*/
public void queueBind(String queue, String exchange, String routingKey, Handler<AsyncResult<Void>> resultHandler) {
delegate.queueBind(queue, exchange, routingKey, resultHandler);
}
Bind a queue to an exchange
Params: - queue –
- exchange –
- routingKey –
Returns:
/**
* Bind a queue to an exchange
* @param queue
* @param exchange
* @param routingKey
* @return
*/
public Completable rxQueueBind(String queue, String exchange, String routingKey) {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
queueBind(queue, exchange, routingKey, handler);
});
}
Returns the number of messages in a queue ready to be delivered.
Params: - queue –
- resultHandler –
/**
* Returns the number of messages in a queue ready to be delivered.
* @param queue
* @param resultHandler
*/
public void messageCount(String queue, Handler<AsyncResult<Long>> resultHandler) {
delegate.messageCount(queue, resultHandler);
}
Returns the number of messages in a queue ready to be delivered.
Params: - queue –
Returns:
/**
* Returns the number of messages in a queue ready to be delivered.
* @param queue
* @return
*/
public Single<Long> rxMessageCount(String queue) {
return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
messageCount(queue, handler);
});
}
Start the rabbitMQ client. Create the connection and the chanel.
Params: - resultHandler –
/**
* Start the rabbitMQ client. Create the connection and the chanel.
* @param resultHandler
*/
public void start(Handler<AsyncResult<Void>> resultHandler) {
delegate.start(resultHandler);
}
Start the rabbitMQ client. Create the connection and the chanel.
Returns:
/**
* Start the rabbitMQ client. Create the connection and the chanel.
* @return
*/
public Completable rxStart() {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
start(handler);
});
}
Stop the rabbitMQ client. Close the connection and its chanel.
Params: - resultHandler –
/**
* Stop the rabbitMQ client. Close the connection and its chanel.
* @param resultHandler
*/
public void stop(Handler<AsyncResult<Void>> resultHandler) {
delegate.stop(resultHandler);
}
Stop the rabbitMQ client. Close the connection and its chanel.
Returns:
/**
* Stop the rabbitMQ client. Close the connection and its chanel.
* @return
*/
public Completable rxStop() {
return io.vertx.reactivex.impl.AsyncResultCompletable.toCompletable(handler -> {
stop(handler);
});
}
Check if a connection is open
Returns: true when the connection is open, false otherwise
/**
* Check if a connection is open
* @return true when the connection is open, false otherwise
*/
public boolean isConnected() {
boolean ret = delegate.isConnected();
return ret;
}
Check if a channel is open
Returns: true when the connection is open, false otherwise
/**
* Check if a channel is open
* @return true when the connection is open, false otherwise
*/
public boolean isOpenChannel() {
boolean ret = delegate.isOpenChannel();
return ret;
}
public static RabbitMQClient newInstance(io.vertx.rabbitmq.RabbitMQClient arg) {
return arg != null ? new RabbitMQClient(arg) : null;
}
}