Package io.vertx.reactivex.ext.bridge
Class BaseBridgeEvent
- java.lang.Object
-
- io.vertx.reactivex.core.Promise<Boolean>
-
- io.vertx.reactivex.ext.bridge.BaseBridgeEvent
-
- Direct Known Subclasses:
BridgeEvent
,BridgeEvent
public class BaseBridgeEvent extends Promise<Boolean>
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 Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<BaseBridgeEvent>
__TYPE_ARG
-
Fields inherited from class io.vertx.reactivex.core.Promise
__typeArg_0
-
-
Constructor Summary
Constructors Constructor Description BaseBridgeEvent(BaseBridgeEvent delegate)
BaseBridgeEvent(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete(Boolean result)
Set the result.void
complete(Boolean result, Throwable failure)
boolean
equals(Object o)
Future<Boolean>
future()
BaseBridgeEvent
getDelegate()
JsonObject
getRawMessage()
Get the raw JSON message for the event.void
handle(AsyncResult<Boolean> asyncResult)
Succeed or fail this promise with the event.int
hashCode()
static BaseBridgeEvent
newInstance(BaseBridgeEvent arg)
Single<Boolean>
rxFuture()
BaseBridgeEvent
setRawMessage(JsonObject message)
Override the raw JSON message for the event.void
succeed(Boolean result)
String
toString()
boolean
tryComplete(Boolean result)
LikePromise.complete(T, java.lang.Throwable)
but returnsfalse
when the promise is already completed instead of throwing anIllegalStateException
, it returnstrue
otherwise.BridgeEventType
type()
-
Methods inherited from class io.vertx.reactivex.core.Promise
complete, fail, fail, newInstance, newInstance, promise, succeed, tryComplete, tryFail, tryFail
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<BaseBridgeEvent> __TYPE_ARG
-
-
Constructor Detail
-
BaseBridgeEvent
public BaseBridgeEvent(BaseBridgeEvent delegate)
-
BaseBridgeEvent
public BaseBridgeEvent(Object delegate)
-
-
Method Detail
-
getDelegate
public BaseBridgeEvent getDelegate()
- Overrides:
getDelegate
in classPromise<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.
-
tryComplete
public boolean tryComplete(Boolean result)
LikePromise.complete(T, java.lang.Throwable)
but returnsfalse
when the promise is already completed instead of throwing anIllegalStateException
, it returnstrue
otherwise.- Overrides:
tryComplete
in classPromise<Boolean>
- Parameters:
result
- the result- Returns:
false
when the future is already completed
-
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(io.vertx.core.json.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.
-
newInstance
public static BaseBridgeEvent newInstance(BaseBridgeEvent arg)
-
-