/*
* 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.amqp;
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.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import java.util.UUID;
import java.time.Instant;
Builder to create a new AmqpMessage
.
Reference about the different metadata can be found on
AMQP message properties.
Note that the body is set using withBodyAs*
method depending on the passed type.
NOTE: This class has been automatically generated from the original
non RX-ified interface using Vert.x codegen. /**
* Builder to create a new {@link io.vertx.reactivex.amqp.AmqpMessage}.
* <p>
* Reference about the different metadata can be found on
* <a href="http://docs.oasis-open.org/amqp/core/v1.0/amqp-core-messaging-v1.0.html#type-properties">AMQP message properties</a>.
* <p>
* Note that the body is set using <code>withBodyAs*</code> method depending on the passed type.
*
* <p/>
* NOTE: This class has been automatically generated from the {@link io.vertx.amqp.AmqpMessageBuilder original} non RX-ified interface using Vert.x codegen.
*/
@io.vertx.lang.rx.RxGen(io.vertx.amqp.AmqpMessageBuilder.class)
public class AmqpMessageBuilder {
@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;
AmqpMessageBuilder that = (AmqpMessageBuilder) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public static final io.vertx.lang.rx.TypeArg<AmqpMessageBuilder> __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>( obj -> new AmqpMessageBuilder((io.vertx.amqp.AmqpMessageBuilder) obj),
AmqpMessageBuilder::getDelegate
);
private final io.vertx.amqp.AmqpMessageBuilder delegate;
public AmqpMessageBuilder(io.vertx.amqp.AmqpMessageBuilder delegate) {
this.delegate = delegate;
}
public io.vertx.amqp.AmqpMessageBuilder getDelegate() {
return delegate;
}
Returns: a new instance of AmqpMessageBuilder
/**
* @return a new instance of {@link io.vertx.reactivex.amqp.AmqpMessageBuilder}
*/
public static io.vertx.reactivex.amqp.AmqpMessageBuilder create() {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(io.vertx.amqp.AmqpMessageBuilder.create());
return ret;
}
Returns: the message.
/**
* @return the message.
*/
public io.vertx.reactivex.amqp.AmqpMessage build() {
io.vertx.reactivex.amqp.AmqpMessage ret = io.vertx.reactivex.amqp.AmqpMessage.newInstance(delegate.build());
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder priority(short priority) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.priority(priority));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder durable(boolean durable) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.durable(durable));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder ttl(long ttl) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.ttl(ttl));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder firstAcquirer(boolean first) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.firstAcquirer(first));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder deliveryCount(int count) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.deliveryCount(count));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder id(String id) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.id(id));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder address(String address) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.address(address));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder replyTo(String replyTo) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.replyTo(replyTo));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder correlationId(String correlationId) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.correlationId(correlationId));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withBody(String value) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withBody(value));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withSymbolAsBody(String value) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withSymbolAsBody(value));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder subject(String subject) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.subject(subject));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder contentType(String ct) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.contentType(ct));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder contentEncoding(String ct) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.contentEncoding(ct));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder expiryTime(long expiry) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.expiryTime(expiry));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder creationTime(long ct) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.creationTime(ct));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder groupId(String gi) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.groupId(gi));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder replyToGroupId(String rt) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.replyToGroupId(rt));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder applicationProperties(JsonObject props) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.applicationProperties(props));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withBooleanAsBody(boolean v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withBooleanAsBody(v));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withByteAsBody(byte v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withByteAsBody(v));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withShortAsBody(short v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withShortAsBody(v));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withIntegerAsBody(int v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withIntegerAsBody(v));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withLongAsBody(long v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withLongAsBody(v));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withFloatAsBody(float v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withFloatAsBody(v));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withDoubleAsBody(double v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withDoubleAsBody(v));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withCharAsBody(char c) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withCharAsBody(c));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withBufferAsBody(io.vertx.reactivex.core.buffer.Buffer buffer) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withBufferAsBody(buffer.getDelegate()));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withJsonObjectAsBody(JsonObject json) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withJsonObjectAsBody(json));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withJsonArrayAsBody(JsonArray json) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withJsonArrayAsBody(json));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withInstantAsBody(Instant v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withInstantAsBody(v));
return ret;
}
public io.vertx.reactivex.amqp.AmqpMessageBuilder withUuidAsBody(UUID v) {
io.vertx.reactivex.amqp.AmqpMessageBuilder ret = io.vertx.reactivex.amqp.AmqpMessageBuilder.newInstance(delegate.withUuidAsBody(v));
return ret;
}
public static AmqpMessageBuilder newInstance(io.vertx.amqp.AmqpMessageBuilder arg) {
return arg != null ? new AmqpMessageBuilder(arg) : null;
}
}