vertx-lang-scala-docs_2.12 3.4.0 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package core
  Definition Classes
    scala
-  package eventbus
  Definition Classes
    core
- DeliveryOptions
- EventBus
- EventBusOptions
- Message
- MessageConsumer
- MessageProducer
- SendContext

c

io.vertx.scala.core.eventbus

# EventBus 

###
Companion object EventBus

#### 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.

Linear Supertypes
Measured, AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. EventBus
2. Measured
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new EventBus(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def asJava: AnyRef
   Definition Classes
     EventBus → Measured
6.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... )
7.  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

8.  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

9.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
10.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
11.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
12.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
13.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
14.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
15.  def isMetricsEnabled(): Boolean

    Whether the metrics are enabled for this measured object

    Whether the metrics are enabled for this measured object

    returns

      true if the metrics are enabled

    Definition Classes
      EventBus → Measured
16.  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

17.  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

18.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
19.  final def notify(): Unit
    Definition Classes
      AnyRef
20.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
21.  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

22.  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

23.  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

24.  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

25.  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

26.  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

27.  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

28.  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

29.  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.

30.  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.

31.  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

32.  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

33.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
34.  def toString(): String
    Definition Classes
      AnyRef → Any
35.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
36.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
37.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from Measured

### Inherited from AnyRef

### Inherited from Any

### Ungrouped