Top Description Fields Methods
io.vertx.core.spi.metrics

public Interface EventBusMetrics<H>

extends Metrics
Known Direct Implementers
io.vertx.core.metrics.impl.DummyVertxMetrics.DummyEventBusMetrics
Imports
io.vertx.core.eventbus.Message, .ReplyFailure

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

Field Summary

Inherited from io.vertx.core.spi.metrics.Metrics:
DISABLE_METRICS_PROPERTY_NAMEMETRICS_ENABLED

Method Summary

Modifier and TypeMethod and Description
public default void
discardMessage(H
the handler processing the message
handler
,
boolean
when the scheduled message is local
local
,
Message<?>
the discarded message
msg
)

Discard a message.

public default H
handlerRegistered(String
the address used to register the handler
address
,
String
null when the handler is not a reply handler, otherwise the address this handler is replying to
repliedAddress
)

Called when a handler is registered on the event bus.

public default void
handlerUnregistered(H
the unregistered handler
handler
)

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

public default void
messageDelivered(H
the handler processing the message
handler
,
boolean
when the handled message is local
local
)

Called when an handler has been delivered a message.

public default void
messageRead(String
the message address
address
,
int
the number of bytes read
numberOfBytes
)

A message has been received from the network.

public default void
messageReceived(String
the address
address
,
boolean
true when the message is published
publish
,
boolean
true when the message is received locally
local
,
int
the number of handlers that process the message
handlers
)

Called when a message is received.

public default void
messageSent(String
the address
address
,
boolean
true when the message is published
publish
,
boolean
the message is processed locally
local
,
boolean
the message is sent on the cluster
remote
)

Called when a message has been sent or published.

public default void
messageWritten(String
the message address
address
,
int
the number of bytes written
numberOfBytes
)

A message has been sent over the network.

public default void
replyFailure(String
the address
address
,
ReplyFailure failure)

Called whenever the event bus delivers a reply failure to the sender/publisher, the reply failure indicates the nature of the failure.

public default void
scheduleMessage(H
the handler processing the message
handler
,
boolean
when the scheduled message is local
local
)

Schedule a message for processing.

Inherited from io.vertx.core.spi.metrics.Metrics:
close

Method Detail

discardMessageback to summary
public default void discardMessage(H handler, boolean local, Message<?> msg)

Discard a message.

Parameters
handler:H

the handler processing the message

local:boolean

when the scheduled message is local

msg:Message<?>

the discarded message

handlerRegisteredback to summary
public default H handlerRegistered(String address, String repliedAddress)

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:String

the address used to register the handler

repliedAddress:String

null when the handler is not a reply handler, otherwise the address this handler is replying to

handlerUnregisteredback to summary
public default 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:H

the unregistered handler

messageDeliveredback to summary
public default void messageDelivered(H handler, boolean local)

Called when an handler has been delivered a message. No specific thread and context can be expected when this method is called.

Parameters
handler:H

the handler processing the message

local:boolean

when the handled message is local

messageReadback to summary
public default 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:String

the message address

numberOfBytes:int

the number of bytes read

messageReceivedback to summary
public default 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:String

the address

publish:boolean

true when the message is published

local:boolean

true when the message is received locally

handlers:int

the number of handlers that process the message

messageSentback to summary
public default 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:String

the address

publish:boolean

true when the message is published

local:boolean

the message is processed locally

remote:boolean

the message is sent on the cluster

messageWrittenback to summary
public default 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:String

the message address

numberOfBytes:int

the number of bytes written

replyFailureback to summary
public default void replyFailure(String address, ReplyFailure failure)

Called whenever the event bus delivers a reply failure to the sender/publisher, the reply failure indicates the nature of the failure.

No specific thread and context can be expected when this method is called.

Parameters
address:String

the address

failure:ReplyFailure

the io.vertx.core.eventbus.ReplyFailure

scheduleMessageback to summary
public default void scheduleMessage(H handler, boolean local)

Schedule a message for processing.

No specific thread and context can be expected when this method is called.

Parameters
handler:H

the handler processing the message

local:boolean

when the scheduled message is local