Class MessageSource
- java.lang.Object
-
- io.vertx.mutiny.servicediscovery.types.MessageSource
-
public class MessageSource extends Object
Service type for data producer. Providers are publishing data to a specific event bus address. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<MessageSource>
__TYPE_ARG
static String
TYPE
static String
UNKNOWN
Unknown type.
-
Constructor Summary
Constructors Constructor Description MessageSource(io.vertx.servicediscovery.types.MessageSource delegate)
MessageSource(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static io.vertx.servicediscovery.Record
createRecord(String name, String address)
static io.vertx.servicediscovery.Record
createRecord(String name, String address, String type)
static io.vertx.servicediscovery.Record
createRecord(String name, String address, String type, io.vertx.core.json.JsonObject metadata)
boolean
equals(Object o)
static <T> io.smallrye.mutiny.Uni<MessageConsumer<T>>
getConsumer(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Convenient method that looks for a message source and provides the configured .static <T> io.smallrye.mutiny.Uni<MessageConsumer<T>>
getConsumer(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Convenient method that looks for a message source and provides the configured .static <T> MessageConsumer<T>
getConsumerAndAwait(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Blocking variant ofgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)
.static <T> MessageConsumer<T>
getConsumerAndAwait(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Blocking variant ofgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)
.static <T> void
getConsumerAndForget(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Variant ofgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)
that ignores the result of the operation.static <T> void
getConsumerAndForget(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Variant ofgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)
that ignores the result of the operation.io.vertx.servicediscovery.types.MessageSource
getDelegate()
int
hashCode()
static MessageSource
newInstance(io.vertx.servicediscovery.types.MessageSource arg)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<MessageSource> __TYPE_ARG
-
UNKNOWN
public static final String UNKNOWN
Unknown type.- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MessageSource
public MessageSource(io.vertx.servicediscovery.types.MessageSource delegate)
-
MessageSource
public MessageSource(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.servicediscovery.types.MessageSource getDelegate()
-
createRecord
public static io.vertx.servicediscovery.Record createRecord(String name, String address, String type, io.vertx.core.json.JsonObject metadata)
- Parameters:
name
- the name of the serviceaddress
- the address on which the data is senttype
- the type of payload (fully qualified name of the class)metadata
- additional metadata- Returns:
- the created record
-
createRecord
public static io.vertx.servicediscovery.Record createRecord(String name, String address, String type)
- Parameters:
name
- the name of the serviceaddress
- the address on which the data is senttype
- the type of payload- Returns:
- the created record
-
createRecord
public static io.vertx.servicediscovery.Record createRecord(String name, String address)
- Parameters:
name
- the name of the serviceaddress
- the address on which the data is sent.- Returns:
- the created record
-
getConsumer
@CheckReturnValue public static <T> io.smallrye.mutiny.Uni<MessageConsumer<T>> getConsumer(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
discovery
- The service discovery instancefilter
- The filter, optional- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
getConsumerAndAwait
public static <T> MessageConsumer<T> getConsumerAndAwait(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Blocking variant ofgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
discovery
- The service discovery instancefilter
- The filter, optional- Returns:
- the MessageConsumer
instance produced by the operation.
-
getConsumerAndForget
public static <T> void getConsumerAndForget(ServiceDiscovery discovery, io.vertx.core.json.JsonObject filter)
Variant ofgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)
that ignores the result of the operation.This method subscribes on the result of
getConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,JsonObject)
but you don't need to compose it with other operations.- Parameters:
discovery
- The service discovery instancefilter
- The filter, optional
-
getConsumer
@CheckReturnValue public static <T> io.smallrye.mutiny.Uni<MessageConsumer<T>> getConsumer(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Convenient method that looks for a message source and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
discovery
- The service discovery instancefilter
- The filter, must not benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
getConsumerAndAwait
public static <T> MessageConsumer<T> getConsumerAndAwait(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Blocking variant ofgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
discovery
- The service discovery instancefilter
- The filter, must not benull
- Returns:
- the MessageConsumer
instance produced by the operation.
-
getConsumerAndForget
public static <T> void getConsumerAndForget(ServiceDiscovery discovery, Function<io.vertx.servicediscovery.Record,Boolean> filter)
Variant ofgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)
that ignores the result of the operation.This method subscribes on the result of
getConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromgetConsumer(io.vertx.mutiny.servicediscovery.ServiceDiscovery,Function)
but you don't need to compose it with other operations.- Parameters:
discovery
- The service discovery instancefilter
- The filter, must not benull
-
newInstance
public static MessageSource newInstance(io.vertx.servicediscovery.types.MessageSource arg)
-
-