public class BridgeEvent extends BaseBridgeEvent
Please consult the documentation for a full explanation.
NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<BridgeEvent> |
__TYPE_ARG |
__typeArg_0
Constructor and Description |
---|
BridgeEvent(BridgeEvent delegate) |
Modifier and Type | Method and Description |
---|---|
void |
complete(Boolean result)
Set the result.
|
Handler<AsyncResult<Boolean>> |
completer()
Deprecated.
|
<U> Future<U> |
compose(Function<Boolean,Future<U>> mapper)
Compose this future with a
mapper function. |
<U> Future<U> |
compose(Handler<Boolean> handler,
Future<U> next)
Compose this future with a provided
next future. |
boolean |
equals(Object o) |
BridgeEvent |
getDelegate() |
int |
hashCode() |
<U> Future<U> |
map(Function<Boolean,U> mapper)
Apply a
mapper function on this future. |
static BridgeEvent |
newInstance(BridgeEvent arg) |
Future<Boolean> |
otherwise(Boolean value)
Map the failure of a future to a specific
value . |
Future<Boolean> |
otherwise(Function<Throwable,Boolean> mapper)
Apply a
mapper function on this future. |
Future<Boolean> |
otherwiseEmpty()
Map the failure of a future to
null . |
Future<Boolean> |
recover(Function<Throwable,Future<Boolean>> mapper)
Handles a failure of this Future by returning the result of another Future.
|
Boolean |
result()
The result of the operation.
|
rx.Single<Boolean> |
rxSetHandler()
Set a handler for the result.
|
Future<Boolean> |
setHandler(Handler<AsyncResult<Boolean>> handler)
Set a handler for the result.
|
rx.Observable<Boolean> |
setHandlerObservable()
Deprecated.
use
rxSetHandler() instead |
BridgeEvent |
setRawMessage(JsonObject message)
Get the raw JSON message for the event.
|
SockJSSocket |
socket()
Get the SockJSSocket instance corresponding to the event
|
String |
toString() |
boolean |
tryComplete(Boolean result)
Set the failure.
|
getRawMessage, newInstance, type
cause, complete, fail, fail, failed, failedFuture, failedFuture, future, future, isComplete, map, mapEmpty, newInstance, newInstance, succeeded, succeededFuture, succeededFuture, tryComplete, tryFail, tryFail
public static final TypeArg<BridgeEvent> __TYPE_ARG
public BridgeEvent(BridgeEvent delegate)
public String toString()
toString
in class BaseBridgeEvent
public boolean equals(Object o)
equals
in class BaseBridgeEvent
public int hashCode()
hashCode
in class BaseBridgeEvent
public BridgeEvent getDelegate()
getDelegate
in class BaseBridgeEvent
public Future<Boolean> setHandler(Handler<AsyncResult<Boolean>> handler)
If the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.
setHandler
in class BaseBridgeEvent
handler
- the Handler that will be called with the result@Deprecated public rx.Observable<Boolean> setHandlerObservable()
rxSetHandler()
insteadIf the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.
setHandlerObservable
in class Future<Boolean>
public rx.Single<Boolean> rxSetHandler()
If the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.
rxSetHandler
in class BaseBridgeEvent
public void complete(Boolean result)
complete
in class BaseBridgeEvent
result
- the resultpublic boolean tryComplete(Boolean result)
tryComplete
in class BaseBridgeEvent
result
- the resultpublic Boolean result()
result
in class BaseBridgeEvent
public <U> Future<U> compose(Handler<Boolean> handler, Future<U> next)
next
future.
When this (the one on which compose
is called) future succeeds, the handler
will be called with
the completed value, this handler should complete the next future.
If the handler
throws an exception, the returned future will be failed with this exception.
When this future fails, the failure will be propagated to the next
future and the handler
will not be called.
compose
in class BaseBridgeEvent
handler
- the handlernext
- the next futurepublic <U> Future<U> compose(Function<Boolean,Future<U>> mapper)
mapper
function.
When this future (the one on which compose
is called) succeeds, the mapper
will be called with
the completed value and this mapper returns another future object. This returned future completion will complete
the future returned by this method call.
If the mapper
throws an exception, the returned future will be failed with this exception.
When this future fails, the failure will be propagated to the returned future and the mapper
will not be called.
compose
in class BaseBridgeEvent
mapper
- the mapper functionpublic <U> Future<U> map(Function<Boolean,U> mapper)
mapper
function on this future.
When this future succeeds, the mapper
will be called with the completed value and this mapper
returns a value. This value will complete the future returned by this method call.
If the mapper
throws an exception, the returned future will be failed with this exception.
When this future fails, the failure will be propagated to the returned future and the mapper
will not be called.
map
in class BaseBridgeEvent
mapper
- the mapper function@Deprecated public Handler<AsyncResult<Boolean>> completer()
completer
in class BaseBridgeEvent
public Future<Boolean> recover(Function<Throwable,Future<Boolean>> mapper)
recover
in class BaseBridgeEvent
mapper
- A function which takes the exception of a failure and returns a new future.public Future<Boolean> otherwise(Function<Throwable,Boolean> mapper)
mapper
function on this future.
When this future fails, the mapper
will be called with the completed value and this mapper
returns a value. This value will complete the future returned by this method call.
If the mapper
throws an exception, the returned future will be failed with this exception.
When this future succeeds, the result will be propagated to the returned future and the mapper
will not be called.
otherwise
in class BaseBridgeEvent
mapper
- the mapper functionpublic Future<Boolean> otherwise(Boolean value)
value
.
When this future fails, this value
will complete the future returned by this method call.
When this future succeeds, the result will be propagated to the returned future.
otherwise
in class BaseBridgeEvent
value
- the value that eventually completes the mapped futurepublic Future<Boolean> otherwiseEmpty()
null
.
This is a convenience for future.otherwise((T) null)
.
When this future fails, the null
value will complete the future returned by this method call.
When this future succeeds, the result will be propagated to the returned future.
otherwiseEmpty
in class BaseBridgeEvent
public BridgeEvent setRawMessage(JsonObject message)
setRawMessage
in class BaseBridgeEvent
message
- the raw messagepublic SockJSSocket socket()
public static BridgeEvent newInstance(BridgeEvent arg)
Copyright © 2019 Eclipse. All rights reserved.