@ManagedResource public class LifecycleMessageSourceMetrics extends Object implements MessageSourceMetrics, org.springframework.context.Lifecycle
MessageSourceMetrics
that exposes in addition the Lifecycle
interface. The lifecycle methods can
be used to start and stop polling endpoints, for instance, in a live system.Constructor and Description |
---|
LifecycleMessageSourceMetrics(org.springframework.context.Lifecycle lifecycle,
MessageSourceMetrics delegate) |
Modifier and Type | Method and Description |
---|---|
int |
getMessageCount() |
long |
getMessageCountLong() |
String |
getName() |
String |
getSource() |
boolean |
isRunning() |
void |
reset() |
void |
start() |
void |
stop() |
public LifecycleMessageSourceMetrics(org.springframework.context.Lifecycle lifecycle, MessageSourceMetrics delegate)
@ManagedOperation public void reset()
reset
in interface MessageSourceMetrics
@ManagedAttribute public boolean isRunning()
isRunning
in interface org.springframework.context.Lifecycle
@ManagedOperation public void start()
start
in interface org.springframework.context.Lifecycle
@ManagedOperation public void stop()
stop
in interface org.springframework.context.Lifecycle
public String getName()
getName
in interface MessageSourceMetrics
public String getSource()
getSource
in interface MessageSourceMetrics
public int getMessageCount()
getMessageCount
in interface MessageSourceMetrics
MessageSourceMetrics.getMessageCount()
public long getMessageCountLong()
getMessageCountLong
in interface MessageSourceMetrics
Copyright © 2015. All rights reserved.