- java.lang.Object
-
- vertxval.VerticleRef<I,O>
-
- Type Parameters:
I
- the type of the input message sent to this verticleO
- the type of the output message returned by this verticle
public class VerticleRef<I,O> extends Object
It represents a reference to a Verticle, the unit of computation. It allows to send messages to the Verticle with the methodtell(DeliveryOptions)
, or establish conversations with the methodask(DeliveryOptions)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description λ<I,O>
ask()
Method to establish a conversation with this verticle: a message is sent and then a message is received.λ<I,O>
ask(io.vertx.core.eventbus.DeliveryOptions options)
Method to establish a conversation with this verticle: a message is sent and then a message is received.Consumer<I>
tell()
Method to send a message to this verticle.Consumer<I>
tell(io.vertx.core.eventbus.DeliveryOptions options)
Method to send a message to this verticle.λc<I,O>
trace()
λc<I,O>
trace(io.vertx.core.eventbus.DeliveryOptions options)
io.vertx.core.Future<Void>
undeploy()
Undeploy all the instances of this verticle
-
-
-
Method Detail
-
ask
public λ<I,O> ask(io.vertx.core.eventbus.DeliveryOptions options)
Method to establish a conversation with this verticle: a message is sent and then a message is received.- Parameters:
options
- the delivery options- Returns:
- a function that takes an object of type I and returns an object of type O wrapped in a future
-
ask
public λ<I,O> ask()
Method to establish a conversation with this verticle: a message is sent and then a message is received.- Returns:
- a function that takes an object of type I and returns an object of type O wrapped in a future
-
tell
public Consumer<I> tell(io.vertx.core.eventbus.DeliveryOptions options)
Method to send a message to this verticle.- Parameters:
options
- the delivery options- Returns:
- a consumer that takes an object of type I
-
tell
public Consumer<I> tell()
Method to send a message to this verticle.- Returns:
- a consumer that takes an object of type I
-
undeploy
public io.vertx.core.Future<Void> undeploy()
Undeploy all the instances of this verticle- Returns:
- a future that will be completed when all the instances are undeployed
-
-