Class BridgeEvent

All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class BridgeEvent extends BaseBridgeEvent implements io.vertx.lang.rx.RxDelegate
Represents an event that occurs on the gRPC event bus bridge.

Bridge events are generated when clients interact with the EventBus through the gRPC bridge. These events can be used to implement custom authorization logic, logging, or monitoring.

Events include:

  • SEND - When a client sends a message to an address
  • PUBLISH - When a client publishes a message to an address
  • RECEIVE - When a client receives a message from an address it has subscribed to
  • REGISTER - When a client registers a handler for an address
  • UNREGISTER - When a client unregisters a handler for an address

Each event can be allowed or denied by calling the setHandler method.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final io.vertx.lang.rx.TypeArg<BridgeEvent> __TYPE_ARG
  • Constructor Details

    • BridgeEvent

      public BridgeEvent(BridgeEvent delegate)
    • BridgeEvent

      public BridgeEvent(Object delegate)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class BaseBridgeEvent
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class BaseBridgeEvent
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseBridgeEvent
    • getDelegate

      public BridgeEvent getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
      Overrides:
      getDelegate in class BaseBridgeEvent
    • complete

      public void complete(Boolean result, Throwable failure)
      Overrides:
      complete in class BaseBridgeEvent
    • complete

      public void complete(Boolean result)
      Set the result. Any handler will be called, if there is one, and the promise will be marked as completed.

      Any handler set on the associated promise will be called.

      Overrides:
      complete in class BaseBridgeEvent
      Parameters:
      result - the result
    • succeed

      public void succeed(Boolean result)
      Overrides:
      succeed in class BaseBridgeEvent
    • tryComplete

      public boolean tryComplete(Boolean result)
      Like Promise.complete(T, Throwable) but returns false when the promise is already completed instead of throwing an IllegalStateException, it returns true otherwise.
      Overrides:
      tryComplete in class BaseBridgeEvent
      Parameters:
      result - the result
      Returns:
      false when the future is already completed
    • future

      public Future<Boolean> future()
      Overrides:
      future in class BaseBridgeEvent
      Returns:
      the associated with this promise, it can be used to be aware of the promise completion
    • rxFuture

      public Single<Boolean> rxFuture()
      Overrides:
      rxFuture in class BaseBridgeEvent
      Returns:
      the associated with this promise, it can be used to be aware of the promise completion
    • setRawMessage

      public BridgeEvent setRawMessage(JsonObject message)
      Sets the raw JSON message for this bridge event.

      The raw message contains the actual data being sent over the EventBus. This method allows modifying the message content before it's processed, which can be useful for message transformation or content filtering.

      Overrides:
      setRawMessage in class BaseBridgeEvent
      Parameters:
      message - the raw JSON message to set
      Returns:
      this reference, so it can be used fluently in method chaining
    • handle

      public void handle(AsyncResult<Boolean> asyncResult)
      Succeed or fail this promise with the event.
      Overrides:
      handle in class BaseBridgeEvent
      Parameters:
      asyncResult - the async result to handle
    • newInstance

      public static BridgeEvent newInstance(BridgeEvent arg)