org.vertx.scala.core

eventbus

package eventbus

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. eventbus
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. implicit class BooleanData extends MessageData

  2. implicit class BufferData extends MessageData

  3. implicit class ByteArrayData extends MessageData

  4. implicit class CharacterData extends MessageData

  5. implicit class DoubleData extends MessageData

  6. final class EventBus extends Self

    A distributed lightweight event bus which can encompass multiple vert.x instances.

    A distributed lightweight event bus which can encompass multiple vert.x instances. The event bus implements publish / subscribe, point to point messaging and request-response messaging.

    Messages sent over the event bus are represented by instances of the org.vertx.scala.core.eventbus.Message class.

    For publish / subscribe, messages can be published to an address using one of the publish methods. An address is a simple java.lang.String instance.

    Handlers are registered against an address. There can be multiple handlers registered against each address, and a particular handler can be registered against multiple addresses. The event bus will route a sent message to all handlers which are registered against that address.

    For point to point messaging, messages can be sent to an address using one of the send methods. The messages will be delivered to a single handler, if one is registered on that address. If more than one handler is registered on the same address, Vert.x will choose one and deliver the message to that. Vert.x will aim to fairly distribute messages in a round-robin way, but does not guarantee strict round-robin under all circumstances.

    All messages sent over the bus are transient. On event of failure of all or part of the event bus messages may be lost. Applications should be coded to cope with lost messages, e.g. by resending them, and making application services idempotent.

    The order of messages received by any specific handler from a specific sender should match the order of messages sent from that sender.

    When sending a message, a reply handler can be provided. If so, it will be called when the reply from the receiver has been received. Reply messages can also be replied to, etc, ad infinitum

    Different event bus instances can be clustered together over a network, to give a single logical event bus.

    Instances of EventBus are thread-safe.

    If handlers are registered from an event loop, they will be executed using that same event loop. If they are registered from outside an event loop (i.e. when using Vert.x embedded) then Vert.x will assign an event loop to the handler and use it to deliver messages to that handler.

  7. implicit class FloatData extends MessageData

  8. implicit class IntegerData extends MessageData

  9. implicit class JBufferData extends JMessageData

  10. sealed trait JMessageData extends MessageData

  11. implicit class JsonArrayData extends MessageData

  12. implicit class JsonObjectData extends MessageData

  13. implicit class LongData extends MessageData

  14. final class Message[T] extends AnyRef

    Represents a message on the event bus.

    Represents a message on the event bus.

    Instances of this class are not thread-safe

  15. sealed trait MessageData extends AnyRef

  16. case class RegisteredHandler[X] extends Product with Serializable

    A RegisteredHandler can be unregistered at a later point in time.

  17. implicit class ShortData extends MessageData

  18. implicit class StringData extends MessageData

Value Members

  1. object EventBus

    Companion object for EventBus.

  2. object Message

    Companion object for Message.

  3. implicit def anyToMessageData(any: Any): MessageData

Inherited from AnyRef

Inherited from Any

Ungrouped