Package io.vertx.reactivex.ext.bridge
Class BaseBridgeEvent
- java.lang.Object
-
- io.vertx.reactivex.core.Promise<Boolean>
-
- io.vertx.reactivex.ext.bridge.BaseBridgeEvent
-
- All Implemented Interfaces:
RxDelegate
- Direct Known Subclasses:
BridgeEvent,BridgeEvent
public class BaseBridgeEvent extends io.vertx.reactivex.core.Promise<Boolean> implements 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
originalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<BaseBridgeEvent>__TYPE_ARG
-
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 voidcomplete(Boolean result)Set the result.voidcomplete(Boolean result, Throwable failure)booleanequals(Object o)Future<Boolean>future()BaseBridgeEventgetDelegate()JsonObjectgetRawMessage()Get the raw JSON message for the event.voidhandle(AsyncResult<Boolean> asyncResult)Succeed or fail this promise with the event.inthashCode()static BaseBridgeEventnewInstance(BaseBridgeEvent arg)io.reactivex.Single<Boolean>rxFuture()BaseBridgeEventsetRawMessage(JsonObject message)Override the raw JSON message for the event.voidsucceed(Boolean result)StringtoString()booleantryComplete(Boolean result)LikePromise.complete(T, java.lang.Throwable)but returnsfalsewhen the promise is already completed instead of throwing anIllegalStateException, it returnstrueotherwise.BridgeEventTypetype()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<BaseBridgeEvent> __TYPE_ARG
-
-
Constructor Detail
-
BaseBridgeEvent
public BaseBridgeEvent(BaseBridgeEvent delegate)
-
BaseBridgeEvent
public BaseBridgeEvent(Object delegate)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classio.vertx.reactivex.core.Promise<Boolean>
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classio.vertx.reactivex.core.Promise<Boolean>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classio.vertx.reactivex.core.Promise<Boolean>
-
getDelegate
public BaseBridgeEvent getDelegate()
- Specified by:
getDelegatein interfaceRxDelegate- Overrides:
getDelegatein classio.vertx.reactivex.core.Promise<Boolean>
-
complete
public void complete(Boolean result, Throwable failure)
- Overrides:
completein classio.vertx.reactivex.core.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:
completein classio.vertx.reactivex.core.Promise<Boolean>- Parameters:
result- the result
-
succeed
public void succeed(Boolean result)
- Overrides:
succeedin classio.vertx.reactivex.core.Promise<Boolean>
-
tryComplete
public boolean tryComplete(Boolean result)
LikePromise.complete(T, java.lang.Throwable)but returnsfalsewhen the promise is already completed instead of throwing anIllegalStateException, it returnstrueotherwise.- Overrides:
tryCompletein classio.vertx.reactivex.core.Promise<Boolean>- Parameters:
result- the result- Returns:
falsewhen the future is already completed
-
future
public Future<Boolean> future()
- Overrides:
futurein classio.vertx.reactivex.core.Promise<Boolean>- Returns:
- the associated with this promise, it can be used to be aware of the promise completion
-
rxFuture
public io.reactivex.Single<Boolean> rxFuture()
- Overrides:
rxFuturein classio.vertx.reactivex.core.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(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.- Overrides:
handlein classio.vertx.reactivex.core.Promise<Boolean>- Parameters:
asyncResult- the async result to handle
-
newInstance
public static BaseBridgeEvent newInstance(BaseBridgeEvent arg)
-
-