io.vertx.core.spi.metrics

## Interface EventBusMetrics<H>

- All Superinterfaces:
    Metrics

      public interface EventBusMetrics<H>
      extends Metrics

  The event bus metrics SPI which Vert.x will use to call when each event occurs.
  Author:
    Nick Scavelli

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginHandleMessage(H handler, boolean local)` Called when an handler begin to process a message. The thread model depends on the actual context thats registered the handler.
    `void` | `endHandleMessage(H handler, Throwable failure)` Called when an handler finish to process a message. The thread model depends on the actual context thats registered the handler.
    `H` | `handlerRegistered(String address, boolean replyHandler)` Called when a handler is registered on the event bus. No specific thread and context can be expected when this method is called.
    `void` | `handlerUnregistered(H handler)` Called when a handler has been unregistered from the event bus. No specific thread and context can be expected when this method is called.
    `void` | `messageRead(String address, int numberOfBytes)` A message has been received from the network. No specific thread and context can be expected when this method is called.
    `void` | `messageReceived(String address, boolean publish, boolean local, int handlers)` Called when a message is received. No specific thread and context can be expected when this method is called.
    `void` | `messageSent(String address, boolean publish, boolean local, boolean remote)` Called when a message has been sent or published. No specific thread and context can be expected when this method is called.
    `void` | `messageWritten(String address, int numberOfBytes)` A message has been sent over the network. No specific thread and context can be expected when this method is called.
    `void` | `replyFailure(String address, ReplyFailure failure)` Called whenever there is a reply failure on the event bus. No specific thread and context can be expected when this method is called.

    - ### Methods inherited from interface io.vertx.core.spi.metrics.Metrics

      `close, isEnabled`

- - ### Method Detail

    - #### handlerRegistered

          H handlerRegistered(String address,
                              boolean replyHandler)

      Called when a handler is registered on the event bus.

      No specific thread and context can be expected when this method is called.
      Parameters:
        `address` - the address used to register the handler
        `replyHandler` - true when the handler is a reply handler

    - #### handlerUnregistered

          void handlerUnregistered(H handler)

      Called when a handler has been unregistered from the event bus.

      No specific thread and context can be expected when this method is called.
      Parameters:
        `handler` - the unregistered handler

    - #### beginHandleMessage

          void beginHandleMessage(H handler,
                                  boolean local)

      Called when an handler begin to process a message.

      The thread model depends on the actual context thats registered the handler.

      ### Event loop context

      This method is invoked with the handler event loop thread.

      ### Worker context

      This method is invoked with a worker thread.
      Parameters:
        `handler` - the handler processing the message
        `local` - when the received message is local

    - #### endHandleMessage

          void endHandleMessage(H handler,
                                Throwable failure)

      Called when an handler finish to process a message.

      The thread model depends on the actual context thats registered the handler.

      ### Event loop context

      This method is invoked with the handler event loop thread.

      ### Worker context

      This method is invoked with a worker thread.
      Parameters:
        `handler` - the handler processing the message
        `failure` - an optional failure thrown by handler

    - #### messageSent

          void messageSent(String address,
                           boolean publish,
                           boolean local,
                           boolean remote)

      Called when a message has been sent or published.

      No specific thread and context can be expected when this method is called.
      Parameters:
        `address` - the address
        `publish` - true when the message is published
        `local` - the message is processed locally
        `remote` - the message is sent on the cluster

    - #### messageReceived

          void messageReceived(String address,
                               boolean publish,
                               boolean local,
                               int handlers)

      Called when a message is received.

      No specific thread and context can be expected when this method is called.
      Parameters:
        `address` - the address
        `publish` - true when the message is published
        `local` - true when the message is received locally
        `handlers` - the number of handlers that process the message

    - #### messageWritten

          void messageWritten(String address,
                              int numberOfBytes)

      A message has been sent over the network.

      No specific thread and context can be expected when this method is called.
      Parameters:
        `address` - the message address
        `numberOfBytes` - the number of bytes written

    - #### messageRead

          void messageRead(String address,
                           int numberOfBytes)

      A message has been received from the network.

      No specific thread and context can be expected when this method is called.
      Parameters:
        `address` - the message address
        `numberOfBytes` - the number of bytes read

    - #### replyFailure

          void replyFailure(String address,
                            ReplyFailure failure)

      Called whenever there is a reply failure on the event bus.

      No specific thread and context can be expected when this method is called.
      Parameters:
        `address` - the address
        `failure` - the `ReplyFailure`

Copyright © 2015. All Rights Reserved.