Class BridgeEvent
java.lang.Object
io.vertx.rxjava3.core.Promise<Boolean>
io.vertx.rxjava3.ext.bridge.BaseBridgeEvent
io.vertx.rxjava3.eventbus.bridge.grpc.BridgeEvent
- All Implemented Interfaces:
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 Summary
FieldsFields inherited from class Promise
__typeArg_0 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSet the result.voidbooleanfuture()voidhandle(AsyncResult<Boolean> asyncResult) Succeed or fail this promise with the event.inthashCode()static BridgeEventnewInstance(BridgeEvent arg) rxFuture()setRawMessage(JsonObject message) Sets the raw JSON message for this bridge event.voidtoString()booleantryComplete(Boolean result) LikePromise.complete(T, Throwable)but returnsfalsewhen the promise is already completed instead of throwing anIllegalStateException, it returnstrueotherwise.Methods inherited from class BaseBridgeEvent
getRawMessage, newInstance, typeMethods inherited from class Promise
complete, fail, fail, newInstance, newInstance, promise, succeed, tryComplete, tryFail, tryFail
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
BridgeEvent
-
BridgeEvent
-
-
Method Details
-
toString
- Overrides:
toStringin classBaseBridgeEvent
-
equals
- Overrides:
equalsin classBaseBridgeEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseBridgeEvent
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Overrides:
getDelegatein classBaseBridgeEvent
-
complete
- Overrides:
completein classBaseBridgeEvent
-
complete
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
- Overrides:
succeedin classBaseBridgeEvent
-
tryComplete
LikePromise.complete(T, 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
- Overrides:
futurein classBaseBridgeEvent- Returns:
- the associated with this promise, it can be used to be aware of the promise completion
-
rxFuture
- Overrides:
rxFuturein classBaseBridgeEvent- Returns:
- the associated with this promise, it can be used to be aware of the promise completion
-
setRawMessage
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:
setRawMessagein classBaseBridgeEvent- Parameters:
message- the raw JSON message to set- Returns:
- this reference, so it can be used fluently in method chaining
-
handle
Succeed or fail this promise with the event.- Overrides:
handlein classBaseBridgeEvent- Parameters:
asyncResult- the async result to handle
-
newInstance
-