| Modifier and Type | Field and Description |
|---|---|
| protected final CodecManager | |
| protected final ConcurrentMap | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile Handler | |
| protected final EventBusMetrics | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile Handler | |
| private final AtomicLong | |
| protected volatile boolean | |
| protected final VertxInternal |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <T> EventBus | addInboundInterceptor(Handler<DeliveryContext<T>>
the interceptor interceptor)Implements io. Add an interceptor that will be called whenever a message is received by Vert.x |
| private void | addInterceptor(AtomicReferenceFieldUpdater<EventBusImpl, Handler<E>[]> updater, Handler<E> interceptor)
|
| private <T> HandlerHolder | addLocalRegistration(String address, HandlerRegistration<T> registration, boolean replyHandler, boolean localOnly)
|
| public <T> EventBus | addOutboundInterceptor(Handler<DeliveryContext<T>>
the interceptor interceptor)Implements io. Add an interceptor that will be called whenever a message is sent from Vert.x |
| protected <T> HandlerHolder | addRegistration(String address, HandlerRegistration<T> registration, boolean replyHandler, boolean localOnly, Promise<Void> promise)
|
| protected void | |
| protected void | |
| public void | close(Promise<Void> promise)
Implements io. Close the event bus and release any resources held. |
| public EventBus | clusterSerializableChecker(Function<String, Boolean>
the predicate classNamePredicate)Implements io. Register a predicate to invoke when verifying if an object is forbidden to be encoded/decoded as |
| public EventBus | codecSelector(Function<Object, String>
the codec selector selector)Implements io. Set selector to be invoked when the bus has not found any codec for a |
| public <T> MessageConsumer | consumer(MessageConsumerOptions
the consumer options options)Implements io. Create a message consumer against the specified options address. |
| public <T> MessageConsumer | consumer(MessageConsumerOptions
the consumer options options, Handler<Message<T>> the handler that will process the received messages handler)Implements io. Create a consumer and register it against the specified options address. |
| public <T> MessageConsumer | consumer(String
the address that it will register it at address)Implements io. Create a message consumer against the specified address. |
| public <T> MessageConsumer | consumer(String
the address that will register it at address, Handler<Message<T>> the handler that will process the received messages handler)Implements io. Create a consumer and register it against the specified address. |
| protected <T> HandlerHolder | createHandlerHolder(HandlerRegistration<T> registration, boolean replyHandler, boolean localOnly, ContextInternal context)
|
| public MessageImpl | createMessage(boolean send, boolean localOnly, String address, MultiMap headers, Object body, String codecName)
|
| pack-priv <T> ReplyHandler | |
| protected ReplyException | |
| protected String | |
| public EventBusMetrics | getMetrics()
Implements io. Returns the metrics implementation. |
| pack-priv Handler | |
| private boolean | |
| protected boolean | |
| public boolean | isMetricsEnabled()
Overrides default io. Whether the metrics are enabled for this measured object |
| public <T> MessageConsumer | localConsumer(String
the address to register it at address)Implements io. Like |
| public <T> MessageConsumer | localConsumer(String
the address that will register it at address, Handler<Message<T>> the handler that will process the received messages handler)Implements io. Like |
| public <T> OutboundDeliveryContext | newSendContext(MessageImpl<U, V> message, DeliveryOptions options, ReplyHandler<T> handler, Promise<Void> writePromise)
|
| protected HandlerHolder | |
| protected <T> void | |
| protected <T> void | |
| pack-priv Handler | |
| public EventBus | |
| public EventBus | |
| public <T> MessageProducer | publisher(String
The address to publish it to address)Implements io. Create a message publisher against the specified address. |
| public <T> MessageProducer | publisher(String
the address to publish it to address, DeliveryOptions the delivery options options)Implements io. Like |
| public EventBus | registerCodec(MessageCodec<S, R>
the message codec to register codec)Implements io. Register a message codec. |
| public <T> EventBus | registerDefaultCodec(Class<T>
the class for which to use this codec clazz, MessageCodec<T, ?> the message codec to register codec)Implements io. Register a default message codec. |
| public <T> EventBus | removeInboundInterceptor(Handler<DeliveryContext<T>>
the interceptor interceptor)Implements io. Remove an interceptor that was added by |
| private void | removeInterceptor(AtomicReferenceFieldUpdater<EventBusImpl, Handler<E>[]> updater, Handler<E> interceptor)
|
| private <T> void | |
| public <T> EventBus | removeOutboundInterceptor(Handler<DeliveryContext<T>>
the interceptor interceptor)Implements io. Remove an interceptor that was added by |
| protected <T> void | |
| public <T> Future | |
| public EventBus | |
| public EventBus | |
| public <T> MessageProducer | sender(String
the address to send it to address)Implements io. Create a message sender against the specified address. |
| public <T> MessageProducer | sender(String
the address to send it to address, DeliveryOptions the delivery options options)Implements io. Like |
| private <T> void | |
| protected <T> void | |
| public <T> void | |
| public <T> void | sendOrPubInternal(MessageImpl<U, V> message, DeliveryOptions options, ReplyHandler<T> handler, Promise<Void> writePromise)
|
| protected <T> void | |
| public EventBus | serializableChecker(Function<String, Boolean>
the predicate classNamePredicate)Implements io. Register a predicate to invoke when verifying if an object is allowed to be encoded/decoded as |
| public synchronized void | start(Promise<Void> promise)
Implements io. Start the event bus. |
| private Future | |
| public EventBus | unregisterCodec(String
the name of the codec name)Implements io. Unregister a message codec. |
| public EventBus | unregisterDefaultCodec(Class<T>
the class for which the codec was registered clazz)Implements io. Unregister a default message codec. |
| codecManager | back to summary |
|---|---|
| protected final CodecManager codecManager | |
| handlerMap | back to summary |
|---|---|
| protected final ConcurrentMap<String, ConcurrentCyclicSequence<HandlerHolder<T>>> handlerMap | |
| INBOUND_INTERCEPTORS_UPDATER | back to summary |
|---|---|
| private static final AtomicReferenceFieldUpdater<EventBusImpl, Handler<E>[]> INBOUND_INTERCEPTORS_UPDATER | |
| inboundInterceptors | back to summary |
|---|---|
| private volatile Handler<DeliveryContext<T>>[] inboundInterceptors | |
| metrics | back to summary |
|---|---|
| protected final EventBusMetrics<H> metrics | |
| OUTBOUND_INTERCEPTORS_UPDATER | back to summary |
|---|---|
| private static final AtomicReferenceFieldUpdater<EventBusImpl, Handler<E>[]> OUTBOUND_INTERCEPTORS_UPDATER | |
| outboundInterceptors | back to summary |
|---|---|
| private volatile Handler<DeliveryContext<T>>[] outboundInterceptors | |
| replySequence | back to summary |
|---|---|
| private final AtomicLong replySequence | |
| started | back to summary |
|---|---|
| protected volatile boolean started | |
| vertx | back to summary |
|---|---|
| protected final VertxInternal vertx | |
| EventBusImpl | back to summary |
|---|---|
| public EventBusImpl(VertxInternal vertx) | |
| addInboundInterceptor | back to summary |
|---|---|
| public <T> EventBus addInboundInterceptor(Handler<DeliveryContext<T>> interceptor) Implements io. Doc from io. Add an interceptor that will be called whenever a message is received by Vert.x
| |
| addInterceptor | back to summary |
|---|---|
| private void addInterceptor(AtomicReferenceFieldUpdater<EventBusImpl, Handler<E>[]> updater, Handler<E> interceptor) | |
| addLocalRegistration | back to summary |
|---|---|
| private <T> HandlerHolder | |
| addOutboundInterceptor | back to summary |
|---|---|
| public <T> EventBus addOutboundInterceptor(Handler<DeliveryContext<T>> interceptor) Implements io. Doc from io. Add an interceptor that will be called whenever a message is sent from Vert.x
| |
| addRegistration | back to summary |
|---|---|
| protected <T> HandlerHolder | |
| callCompletionHandlerAsync | back to summary |
|---|---|
| protected void callCompletionHandlerAsync(Handler<AsyncResult<Void>> completionHandler) | |
| checkStarted | back to summary |
|---|---|
| protected void checkStarted() | |
| close | back to summary |
|---|---|
| public void close(Promise<Void> promise) Implements io. Doc from io. Close the event bus and release any resources held.
| |
| clusterSerializableChecker | back to summary |
|---|---|
| public EventBus clusterSerializableChecker(Function<String, Boolean> classNamePredicate) Implements io. Doc from io. Register a predicate to invoke when verifying if an object is forbidden to be encoded/decoded as This is only used when Vert.x is clustered. | |
| codecSelector | back to summary |
|---|---|
| public EventBus codecSelector(Function<Object, String> selector) Implements io. Doc from io. Set selector to be invoked when the bus has not found any codec for a
The selector must return the name of a codec which has been registered with either | |
| consumer | back to summary |
|---|---|
| public <T> MessageConsumer Implements io. Doc from io. Create a message consumer against the specified options address.
The returned consumer is not yet registered
at the address, registration will be effective when
| |
| consumer | back to summary |
|---|---|
| public <T> MessageConsumer Implements io. Doc from io. Create a consumer and register it against the specified options address.
| |
| consumer | back to summary |
|---|---|
| public <T> MessageConsumer Implements io. Doc from io. Create a message consumer against the specified address.
The returned consumer is not yet registered
at the address, registration will be effective when
| |
| consumer | back to summary |
|---|---|
| public <T> MessageConsumer Implements io. Doc from io. Create a consumer and register it against the specified address.
| |
| createHandlerHolder | back to summary |
|---|---|
| protected <T> HandlerHolder | |
| createMessage | back to summary |
|---|---|
| public MessageImpl | |
| createReplyHandler | back to summary |
|---|---|
| pack-priv <T> ReplyHandler | |
| deliverMessageLocally | back to summary |
|---|---|
| protected ReplyException deliverMessageLocally(MessageImpl<U, V> msg) | |
| generateReplyAddress | back to summary |
|---|---|
| protected String generateReplyAddress() | |
| getMetrics | back to summary |
|---|---|
| public EventBusMetrics Implements io. Doc from io. Returns the metrics implementation.
| |
| inboundInterceptors | back to summary |
|---|---|
| pack-priv Handler | |
| isLocalOnly | back to summary |
|---|---|
| private boolean isLocalOnly(DeliveryOptions options) | |
| isMessageLocal | back to summary |
|---|---|
| protected boolean isMessageLocal(MessageImpl<U, V> msg) | |
| isMetricsEnabled | back to summary |
|---|---|
| public boolean isMetricsEnabled() Overrides default io. Doc from io. Whether the metrics are enabled for this measured object
| |
| localConsumer | back to summary |
|---|---|
| public <T> MessageConsumer Implements io. Doc from io. Like
| |
| localConsumer | back to summary |
|---|---|
| public <T> MessageConsumer Implements io. Doc from io. Like
| |
| newSendContext | back to summary |
|---|---|
| public <T> OutboundDeliveryContext | |
| nextHandler | back to summary |
|---|---|
| protected HandlerHolder | |
| onLocalRegistration | back to summary |
|---|---|
| protected <T> void onLocalRegistration(HandlerHolder<T> handlerHolder, Promise<Void> promise) | |
| onLocalUnregistration | back to summary |
|---|---|
| protected <T> void onLocalUnregistration(HandlerHolder<T> handlerHolder, Promise<Void> promise) | |
| outboundInterceptors | back to summary |
|---|---|
| pack-priv Handler | |
| publish | back to summary |
|---|---|
public EventBus publish(String address, Object message)
| |
| publish | back to summary |
|---|---|
public EventBus publish(String address, Object message, DeliveryOptions options)
| |
| publisher | back to summary |
|---|---|
| public <T> MessageProducer Implements io. Doc from io. Create a message publisher against the specified address.
The returned publisher will invoke the
| |
| publisher | back to summary |
|---|---|
| public <T> MessageProducer Implements io. Doc from io. Like
| |
| registerCodec | back to summary |
|---|---|
| public EventBus registerCodec(MessageCodec<S, R> codec) Implements io. Doc from io. Register a message codec. You can register a message codec if you want to send any non standard message across the event bus. E.g. you might want to send POJOs directly across the event bus. To use a message codec for a send, you should specify it in the delivery options.
| |
| registerDefaultCodec | back to summary |
|---|---|
| public <T> EventBus registerDefaultCodec(Class<T> clazz, MessageCodec<T, ?> codec) Implements io. Doc from io. Register a default message codec. You can register a message codec if you want to send any non standard message across the event bus. E.g. you might want to send POJOs directly across the event bus. Default message codecs will be used to serialise any messages of the specified type on the event bus without the codec having to be specified in the delivery options.
| |
| removeInboundInterceptor | back to summary |
|---|---|
| public <T> EventBus removeInboundInterceptor(Handler<DeliveryContext<T>> interceptor) Implements io. Doc from io. Remove an interceptor that was added by
| |
| removeInterceptor | back to summary |
|---|---|
| private void removeInterceptor(AtomicReferenceFieldUpdater<EventBusImpl, Handler<E>[]> updater, Handler<E> interceptor) | |
| removeLocalRegistration | back to summary |
|---|---|
| private <T> void removeLocalRegistration(HandlerHolder<T> holder) | |
| removeOutboundInterceptor | back to summary |
|---|---|
| public <T> EventBus removeOutboundInterceptor(Handler<DeliveryContext<T>> interceptor) Implements io. Doc from io. Remove an interceptor that was added by
| |
| removeRegistration | back to summary |
|---|---|
| protected <T> void removeRegistration(HandlerHolder<T> handlerHolder, Promise<Void> promise) | |
| request | back to summary |
|---|---|
public <T> Future
| |
| send | back to summary |
|---|---|
public EventBus send(String address, Object message)
| |
| send | back to summary |
|---|---|
public EventBus send(String address, Object message, DeliveryOptions options)
| |
| sender | back to summary |
|---|---|
| public <T> MessageProducer Implements io. Doc from io. Create a message sender against the specified address.
The returned sender will invoke the
| |
| sender | back to summary |
|---|---|
| public <T> MessageProducer Implements io. Doc from io. Like
| |
| sendLocally | back to summary |
|---|---|
| private <T> void sendLocally(OutboundDeliveryContext<T> sendContext) | |
| sendOrPub | back to summary |
|---|---|
| protected <T> void sendOrPub(OutboundDeliveryContext<T> sendContext) | |
| sendOrPubInternal | back to summary |
|---|---|
| public <T> void sendOrPubInternal(OutboundDeliveryContext<T> senderCtx) | |
| sendOrPubInternal | back to summary |
|---|---|
| public <T> void sendOrPubInternal(MessageImpl<U, V> message, DeliveryOptions options, ReplyHandler<T> handler, Promise<Void> writePromise) | |
| sendReply | back to summary |
|---|---|
| protected <T> void sendReply(MessageImpl<U, V> replyMessage, DeliveryOptions options, ReplyHandler<T> replyHandler) | |
| serializableChecker | back to summary |
|---|---|
| public EventBus serializableChecker(Function<String, Boolean> classNamePredicate) Implements io. Doc from io. Register a predicate to invoke when verifying if an object is allowed to be encoded/decoded as This is only used when Vert.x is clustered. | |
| start | back to summary |
|---|---|
| public synchronized void start(Promise<Void> promise) Implements io. Doc from io. Start the event bus.
| |
| unregisterAll | back to summary |
|---|---|
| private Future | |
| unregisterCodec | back to summary |
|---|---|
| public EventBus unregisterCodec(String name) Implements io. Doc from io. Unregister a message codec. | |
| unregisterDefaultCodec | back to summary |
|---|---|
| public EventBus unregisterDefaultCodec(Class<T> clazz) Implements io. Doc from io. Unregister a default message codec. | |