Packages

class MessageConsumer[T] extends ReadStream[Message[T]]

An event bus consumer object representing a stream of message to an io.vertx.scala.core.eventbus.EventBus address that can be read from.

The io.vertx.scala.core.eventbus.EventBus#consumer or io.vertx.scala.core.eventbus.EventBus#localConsumer creates a new consumer, the returned consumer is not yet registered against the event bus. Registration is effective after the io.vertx.scala.core.eventbus.MessageConsumer#handler method is invoked.

The consumer is unregistered from the event bus using the io.vertx.scala.core.eventbus.MessageConsumer#unregister method or by calling the io.vertx.scala.core.eventbus.MessageConsumer#handler with a null value..

Linear Supertypes
ReadStream[Message[T]], StreamBase, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MessageConsumer
  2. ReadStream
  3. StreamBase
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MessageConsumer(_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

    returns

    The address the handler was registered with.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def asJava: AnyRef
    Definition Classes
    MessageConsumerReadStreamStreamBase
  7. def bodyStream(): ReadStream[T]

    returns

    a read stream for the body of the message stream.

  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  9. def completionFuture(): scala.concurrent.Future[Unit]

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

  10. def completionHandler(completionHandler: Handler[AsyncResult[Unit]]): Unit

    Optional method which can be called to indicate when the registration has been propagated across the cluster.

    Optional method which can be called to indicate when the registration has been propagated across the cluster. * @param completionHandler the completion handler

  11. def endHandler(endHandler: Handler[Unit]): MessageConsumer[T]

    Set an end handler.

    Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called. * @return a reference to this, so the API can be used fluently

    Definition Classes
    MessageConsumerReadStream
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def exceptionHandler(handler: Handler[Throwable]): MessageConsumer[T]

    Set an exception handler on the read stream.

    Set an exception handler on the read stream. * @param handler the exception handler

    returns

    a reference to this, so the API can be used fluently

    Definition Classes
    MessageConsumerReadStreamStreamBase
  15. def fetch(amount: Long): MessageConsumer[T]

    Fetch the specified amount of elements.

    Fetch the specified amount of elements. If the ReadStream has been paused, reading will recommence with the specified amount of items, otherwise the specified amount will be added to the current stream demand. * @return a reference to this, so the API can be used fluently

    Definition Classes
    MessageConsumerReadStream
  16. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def getMaxBufferedMessages(): Int

    returns

    the maximum number of messages that can be buffered when this stream is paused

  19. def handler(handler: Handler[Message[T]]): MessageConsumer[T]

    Set a data handler.

    Set a data handler. As data is read, the handler will be called with the data. * @return a reference to this, so the API can be used fluently

    Definition Classes
    MessageConsumerReadStream
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def isRegistered(): Boolean

    returns

    true if the current consumer is registered

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. def pause(): MessageConsumer[T]

    Pause the ReadStream, it sets the buffer in fetch mode and clears the actual demand.

    Pause the ReadStream, it sets the buffer in fetch mode and clears the actual demand.

    While it's paused, no data will be sent to the data handler. * @return a reference to this, so the API can be used fluently

    Definition Classes
    MessageConsumerReadStream
  27. def resume(): MessageConsumer[T]

    Resume reading, and sets the buffer in flowing mode.

    Resume reading, and sets the buffer in flowing mode.

    If the ReadStream has been paused, reading will recommence on it. * @return a reference to this, so the API can be used fluently

    Definition Classes
    MessageConsumerReadStream
  28. def setMaxBufferedMessages(maxBufferedMessages: Int): MessageConsumer[T]

    Set the number of messages this registration will buffer when this stream is paused.

    Set the number of messages this registration will buffer when this stream is paused. The default value is 1000.

    When a new value is set, buffered messages may be discarded to reach the new value. The most recent messages will be kept. * @param maxBufferedMessages the maximum number of messages that can be buffered

    returns

    this registration

  29. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. def unregister(completionHandler: Handler[AsyncResult[Unit]]): Unit

    Unregisters the handler which created this registration * @param completionHandler the handler called when the unregister is done.

    Unregisters the handler which created this registration * @param completionHandler the handler called when the unregister is done. For example in a cluster when all nodes of the event bus have been unregistered.

  32. def unregister(): Unit

    Unregisters the handler which created this registration

  33. def unregisterFuture(): scala.concurrent.Future[Unit]

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

  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 ReadStream[Message[T]]

Inherited from StreamBase

Inherited from AnyRef

Inherited from Any

Ungrouped