vertx-lang-scala-docs_2.12 3.5.2.CR2 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

# Message 

###
Companion object Message

#### class Message[T] extends AnyRef

Represents a message that is received from the event bus in a handler.

Messages have a io.vertx.scala.core.eventbus.Message#body, which can be null, and also io.vertx.scala.core.eventbus.Message#headers, which can be empty.

If the message was sent specifying a reply handler it will also have a io.vertx.scala.core.eventbus.Message#replyAddress. In that case the message can be replied to using that reply address, or, more simply by just using io.vertx.scala.core.eventbus.Message#reply.

If you want to notify the sender that processing failed, then io.vertx.scala.core.eventbus.Message#fail can be called.

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Message
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new Message(_asJava: AnyRef)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T])

### 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.  def address(): String

   The address the message was sent to

5.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
6.  def asJava: AnyRef
7.  def body(): T

   The body of the message.

   The body of the message. Can be null.

   returns

     the body, or null.

8.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @native() @throws( ... )
9.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
10.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
11.  def fail(failureCode: Int, message: String): Unit

    Signal to the sender that processing of this message failed.

    Signal to the sender that processing of this message failed.

    If the message was sent specifying a result handler the handler will be called with a failure corresponding to the failure code and message specified here.

    failureCode

      A failure code to pass back to the sender

    message

      A message to pass back to the sender

12.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
13.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
14.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
15.  def headers(): MultiMap

    Multi-map of message headers.

    Multi-map of message headers. Can be empty

    returns

      the headers

16.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
17.  def isSend(): Boolean

    Signals if this message represents a send or publish event.

    Signals if this message represents a send or publish event.

    returns

      true if this is a send.

18.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
19.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
20.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
21.  def reply[R](message: AnyRef, options: DeliveryOptions, replyHandler: Handler[AsyncResult[Message[R]]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[R]): Unit

    The same as `reply(R message, DeliveryOptions)` but you can specify handler for the reply - i.e.

    The same as `reply(R message, DeliveryOptions)` but you can specify handler for the reply - i.e. to receive the reply to the reply.

    message

      the reply message

    options

      the delivery optionssee DeliveryOptions

    replyHandler

      the reply handler for the reply.

22.  def reply(message: AnyRef, options: DeliveryOptions): Unit

    Link io.vertx.scala.core.eventbus.Message#reply but allows you to specify delivery options for the reply.

    Link io.vertx.scala.core.eventbus.Message#reply but allows you to specify delivery options for the reply.

    message

      the reply message

    options

      the delivery optionssee DeliveryOptions

23.  def reply[R](message: AnyRef, replyHandler: Handler[AsyncResult[Message[R]]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[R]): Unit

    The same as `reply(R message)` but you can specify handler for the reply - i.e.

    The same as `reply(R message)` but you can specify handler for the reply - i.e. to receive the reply to the reply.

    message

      the message to reply with.

    replyHandler

      the reply handler for the reply.

24.  def reply(message: AnyRef): Unit

    Reply to this message.

    Reply to this message.

    If the message was sent specifying a reply handler, that handler will be called when it has received a reply. If the message wasn't sent specifying a receipt handler this method does nothing.

    message

      the message to reply with.

25.  def replyAddress(): Option[String]

    The reply address.

    The reply address. Can be null.

    returns

      the reply address, or null, if message was sent without a reply handler.

26.  def replyFuture[R](message: AnyRef, options: DeliveryOptions)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[R]): scala.concurrent.Future[Message[R]]

    Like reply but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

27.  def replyFuture[R](message: AnyRef)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[R]): scala.concurrent.Future[Message[R]]

    Like reply but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

28.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
29.  def toString(): String
    Definition Classes
      AnyRef → Any
30.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
31.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
32.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped