Interface MetricsCollector
- All Known Implementing Classes:
MicrometerMetricsCollector, NoOpMetricsCollector
public interface MetricsCollector
Interface to collect execution data of the client.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The client-to-broker dispositions.static enum
The broker-to-client dispositions. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when aConnection
is closed.void
Called when aConsumer
is closed.void
Called when aPublisher
is closed.void
consume()
void
consumeDisposition
(MetricsCollector.ConsumeDisposition disposition) void
Called when a newConnection
is opened.void
Called when a newConsumer
is opened.void
Called when a newPublisher
is opened.void
publish()
Called when aMessage
is published.void
publishDisposition
(MetricsCollector.PublishDisposition disposition) Called when aMessage
is settled by the broker.void
readBytes
(int readBytes) Called when a connection reads bytes from its socket.void
writtenBytes
(int writtenBytes) Called when a connection writes bytes to its socket.
-
Method Details
-
openConnection
void openConnection()Called when a newConnection
is opened. -
closeConnection
void closeConnection()Called when aConnection
is closed. -
openPublisher
void openPublisher()Called when a newPublisher
is opened. -
closePublisher
void closePublisher()Called when aPublisher
is closed. -
openConsumer
void openConsumer()Called when a newConsumer
is opened. -
closeConsumer
void closeConsumer()Called when aConsumer
is closed. -
publish
void publish()Called when aMessage
is published. -
publishDisposition
Called when aMessage
is settled by the broker.- Parameters:
disposition
- disposition (outcome)
-
consume
-
consumeDisposition
- Parameters:
disposition
-
-
writtenBytes
void writtenBytes(int writtenBytes) Called when a connection writes bytes to its socket.- Parameters:
writtenBytes
- the number of written bytes
-
readBytes
void readBytes(int readBytes) Called when a connection reads bytes from its socket.- Parameters:
readBytes
- the number of read bytes
-