vertx-lang-scala-docs_2.12 3.9.1 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
- DeliveryContext
- DeliveryOptions
- EventBus
- EventBusOptions
- Message
- MessageConsumer
- MessageProducer

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 can be replied to 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. * @return 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. * @param 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 * @return 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. * @return 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: Option[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. * @param message the reply message

    options

      the delivery options see DeliveryOptions

    replyHandler

      the reply handler for the reply.

22.  def reply(message: Option[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. * @param message the reply message

    options

      the delivery options see DeliveryOptions

23.  def reply[R](message: Option[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. * @param 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. * @param message the message to reply with.

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

    The reply address.

    The reply address. Can be null. * @return the reply address, or null, if message was sent without a reply handler.

26.  def replyAndRequest[R](message: Option[AnyRef], options: DeliveryOptions, replyHandler: Handler[AsyncResult[Message[R]]])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[R]): Unit

    Like but specifying `options` that can be used to configure the delivery.

    Like but specifying `options` that can be used to configure the delivery. * @param message the message body, may be `null`

    options

      delivery options see DeliveryOptions

    replyHandler

      reply handler will be called when any reply from the recipient is received

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

    Reply to this message, specifying a `replyHandler` for the reply - i.e.

    Reply to this message, specifying a `replyHandler` for the reply - i.e. to receive the reply to the reply.

    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. * @param message the message to reply with.

    replyHandler

      the reply handler for the reply.

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

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

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

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

30.  def replyFuture[R](message: Option[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.

31.  def replyFuture[R](message: Option[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.

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

### Inherited from AnyRef

### Inherited from Any

### Ungrouped