class EventBus extends Measured
A Vert.x event-bus is a light-weight distributed messaging system which allows different parts of your application, or different applications and services to communicate with each in a loosely coupled way.
An event-bus supports publish-subscribe messaging, point-to-point messaging and request-response messaging.
Message delivery is best-effort and messages can be lost if failure of all or part of the event bus occurs.
Please refer to the documentation for more information on the event bus.
- Alphabetic
- By Inheritance
- EventBus
- Measured
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new EventBus(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
consumer[T](address: String, handler: Handler[Message[T]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): MessageConsumer[T]
Create a consumer and register it against the specified address.
Create a consumer and register it against the specified address.
- address
the address that will register it at
- handler
the handler that will process the received messages
- returns
the event bus message consumer
-
def
consumer[T](address: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): MessageConsumer[T]
Create a message consumer against the specified address.
Create a message consumer against the specified address.
The returned consumer is not yet registered at the address, registration will be effective when io.vertx.scala.core.eventbus.MessageConsumer#handler is called.
- address
the address that it will register it at
- returns
the event bus message consumer
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isMetricsEnabled(): Boolean
Whether the metrics are enabled for this measured object
-
def
localConsumer[T](address: String, handler: Handler[Message[T]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): MessageConsumer[T]
Like io.vertx.scala.core.eventbus.EventBus#consumer but the address won't be propagated across the cluster.
Like io.vertx.scala.core.eventbus.EventBus#consumer but the address won't be propagated across the cluster.
- address
the address that will register it at
- handler
the handler that will process the received messages
- returns
the event bus message consumer
-
def
localConsumer[T](address: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): MessageConsumer[T]
Like io.vertx.scala.core.eventbus.EventBus#consumer but the address won't be propagated across the cluster.
Like io.vertx.scala.core.eventbus.EventBus#consumer but the address won't be propagated across the cluster.
- address
the address to register it at
- returns
the event bus message consumer
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
publish(address: String, message: AnyRef, options: DeliveryOptions): EventBus
Like io.vertx.scala.core.eventbus.EventBus#publish but specifying
options
that can be used to configure the delivery.Like io.vertx.scala.core.eventbus.EventBus#publish but specifying
options
that can be used to configure the delivery.- address
the address to publish it to
- message
the message, may be
null
- options
the delivery optionssee DeliveryOptions
- returns
a reference to this, so the API can be used fluently
-
def
publish(address: String, message: AnyRef): EventBus
Publish a message.
Publish a message. The message will be delivered to all handlers registered to the address.
- address
the address to publish it to
- message
the message, may be
null
- returns
a reference to this, so the API can be used fluently
-
def
publisher[T](address: String, options: DeliveryOptions)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): MessageProducer[T]
Like io.vertx.scala.core.eventbus.EventBus#publisher but specifying delivery options that will be used for configuring the delivery of the message.
Like io.vertx.scala.core.eventbus.EventBus#publisher but specifying delivery options that will be used for configuring the delivery of the message.
- address
the address to publish it to
- options
the delivery optionssee DeliveryOptions
- returns
The publisher
-
def
publisher[T](address: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): MessageProducer[T]
Create a message publisher against the specified address.
Create a message publisher against the specified address.
The returned publisher will invoke the io.vertx.scala.core.eventbus.EventBus#publish method when the stream io.vertx.scala.core.streams.WriteStream#write method is called with the publisher address and the provided data.
- address
The address to publish it to
- returns
The publisher
-
def
send[T](address: String, message: AnyRef, options: DeliveryOptions, replyHandler: Handler[AsyncResult[Message[T]]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): EventBus
Like io.vertx.scala.core.eventbus.EventBus#send but specifying a
replyHandler
that will be called if the recipient subsequently replies to the message.Like io.vertx.scala.core.eventbus.EventBus#send but specifying a
replyHandler
that will be called if the recipient subsequently replies to the message.- address
the address to send it to
- message
the message, may be
null
- options
delivery optionssee DeliveryOptions
- replyHandler
reply handler will be called when any reply from the recipient is received, may be
null
- returns
a reference to this, so the API can be used fluently
-
def
send(address: String, message: AnyRef, options: DeliveryOptions): EventBus
Like io.vertx.scala.core.eventbus.EventBus#send but specifying
options
that can be used to configure the delivery.Like io.vertx.scala.core.eventbus.EventBus#send but specifying
options
that can be used to configure the delivery.- address
the address to send it to
- message
the message, may be
null
- options
delivery optionssee DeliveryOptions
- returns
a reference to this, so the API can be used fluently
-
def
send[T](address: String, message: AnyRef, replyHandler: Handler[AsyncResult[Message[T]]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): EventBus
Like io.vertx.scala.core.eventbus.EventBus#send but specifying a
replyHandler
that will be called if the recipient subsequently replies to the message.Like io.vertx.scala.core.eventbus.EventBus#send but specifying a
replyHandler
that will be called if the recipient subsequently replies to the message.- address
the address to send it to
- message
the message, may be
null
- replyHandler
reply handler will be called when any reply from the recipient is received, may be
null
- returns
a reference to this, so the API can be used fluently
-
def
send(address: String, message: AnyRef): EventBus
Sends a message.
Sends a message.
The message will be delivered to at most one of the handlers registered to the address.
- address
the address to send it to
- message
the message, may be
null
- returns
a reference to this, so the API can be used fluently
-
def
sendFuture[T](address: String, message: AnyRef, options: DeliveryOptions)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): scala.concurrent.Future[Message[T]]
Like send but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
sendFuture[T](address: String, message: AnyRef)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): scala.concurrent.Future[Message[T]]
Like send but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
sender[T](address: String, options: DeliveryOptions)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): MessageProducer[T]
Like io.vertx.scala.core.eventbus.EventBus#sender but specifying delivery options that will be used for configuring the delivery of the message.
Like io.vertx.scala.core.eventbus.EventBus#sender but specifying delivery options that will be used for configuring the delivery of the message.
- address
the address to send it to
- options
the delivery optionssee DeliveryOptions
- returns
The sender
-
def
sender[T](address: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): MessageProducer[T]
Create a message sender against the specified address.
Create a message sender against the specified address.
The returned sender will invoke the io.vertx.scala.core.eventbus.EventBus#send method when the stream io.vertx.scala.core.streams.WriteStream#write method is called with the sender address and the provided data.
- address
the address to send it to
- returns
The sender
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )