Class BridgeEvent
- java.lang.Object
-
- io.vertx.rxjava3.core.Promise<Boolean>
-
- io.vertx.rxjava3.ext.bridge.BaseBridgeEvent
-
- io.vertx.rxjava3.ext.eventbus.bridge.tcp.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 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 io.vertx.lang.rx.TypeArg<BridgeEvent>__TYPE_ARG-
Fields inherited from class io.vertx.rxjava3.core.Promise
__typeArg_0
-
-
Constructor Summary
Constructors Constructor Description BridgeEvent(BridgeEvent delegate)BridgeEvent(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)Single<Boolean>future()BridgeEventgetDelegate()voidhandle(AsyncResult<Boolean> asyncResult)Succeed or fail this promise with the event.inthashCode()static BridgeEventnewInstance(BridgeEvent arg)Single<Boolean>rxFuture()BridgeEventsetRawMessage(JsonObject message)Get the raw JSON message for the event.NetSocketsocket()Get the SockJSSocket instance corresponding to the eventvoidsucceed(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.-
Methods inherited from class io.vertx.rxjava3.ext.bridge.BaseBridgeEvent
getRawMessage, newInstance, type
-
Methods inherited from class io.vertx.rxjava3.core.Promise
complete, fail, fail, newInstance, newInstance, promise, succeed, tryComplete, tryFail, tryFail
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<BridgeEvent> __TYPE_ARG
-
-
Constructor Detail
-
BridgeEvent
public BridgeEvent(BridgeEvent delegate)
-
BridgeEvent
public BridgeEvent(Object delegate)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classBaseBridgeEvent
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classBaseBridgeEvent
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBaseBridgeEvent
-
getDelegate
public BridgeEvent getDelegate()
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Overrides:
getDelegatein classBaseBridgeEvent
-
complete
public void complete(Boolean result, Throwable failure)
- Overrides:
completein classBaseBridgeEvent
-
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 classBaseBridgeEvent- Parameters:
result- the result
-
succeed
public void succeed(Boolean result)
- Overrides:
succeedin classBaseBridgeEvent
-
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 classBaseBridgeEvent- Parameters:
result- the result- Returns:
falsewhen the future is already completed
-
future
public Single<Boolean> future()
- Overrides:
futurein classBaseBridgeEvent- Returns:
- the associated with this promise, it can be used to be aware of the promise completion
-
rxFuture
public Single<Boolean> rxFuture()
- Overrides:
rxFuturein classBaseBridgeEvent- Returns:
- the associated with this promise, it can be used to be aware of the promise completion
-
setRawMessage
public BridgeEvent setRawMessage(JsonObject message)
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.- Overrides:
setRawMessagein classBaseBridgeEvent- Parameters:
message- the raw message- Returns:
- this reference, so it can be used fluently
-
socket
public NetSocket socket()
Get the SockJSSocket instance corresponding to the event- Returns:
- the SockJSSocket instance
-
handle
public void handle(AsyncResult<Boolean> asyncResult)
Succeed or fail this promise with the event.- Overrides:
handlein classBaseBridgeEvent- Parameters:
asyncResult- the async result to handle
-
newInstance
public static BridgeEvent newInstance(BridgeEvent arg)
-
-