Class BaseBridgeEvent

java.lang.Object
io.vertx.rxjava3.core.Promise<Boolean>
io.vertx.rxjava3.ext.bridge.BaseBridgeEvent
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
Direct Known Subclasses:
BridgeEvent, BridgeEvent, BridgeEvent

public class BaseBridgeEvent extends Promise<Boolean> implements io.vertx.lang.rx.RxDelegate
Represents an event that occurs on the event bus bridge.

Please consult the documentation for a full explanation.

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<BaseBridgeEvent> __TYPE_ARG
  • Constructor Details

    • BaseBridgeEvent

      public BaseBridgeEvent(BaseBridgeEvent delegate)
    • BaseBridgeEvent

      public BaseBridgeEvent(Object delegate)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Promise<Boolean>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Promise<Boolean>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Promise<Boolean>
    • getDelegate

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

      public void complete(Boolean result, Throwable failure)
      Overrides:
      complete in class Promise<Boolean>
    • 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 Promise<Boolean>
      Parameters:
      result - the result
    • succeed

      public void succeed(Boolean result)
      Overrides:
      succeed in class Promise<Boolean>
    • 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 Promise<Boolean>
      Parameters:
      result - the result
      Returns:
      false when the future is already completed
    • future

      public Single<Boolean> future()
      Overrides:
      future in class Promise<Boolean>
      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 Promise<Boolean>
      Returns:
      the associated with this promise, it can be used to be aware of the promise completion
    • type

      public BridgeEventType type()
      Returns:
      the type of the event
    • getRawMessage

      public JsonObject getRawMessage()
      Get the raw JSON message for the event. This will be null for SOCKET_CREATED or SOCKET_CLOSED events as there is no message involved. If the returned message is modified, setRawMessage(JsonObject) should be called with the new message.
      Returns:
      the raw JSON message for the event
    • setRawMessage

      public BaseBridgeEvent setRawMessage(JsonObject message)
      Override the raw JSON message for the event. It is ideally using it when publish back message from server to client in RECEIVE event
      Parameters:
      message - the raw message
      Returns:
      this reference, so it can be used fluently
    • handle

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

      public static BaseBridgeEvent newInstance(BaseBridgeEvent arg)