@IntegrationManagedResource public class LifecycleMessageHandlerMetrics extends java.lang.Object implements MessageHandlerMetrics, org.springframework.context.Lifecycle, ConfigurableMetricsAware<AbstractMessageHandlerMetrics>
MessageHandlerMetrics
that exposes in addition the Lifecycle
interface. The lifecycle methods can
be used to stop and start polling endpoints, for instance, in a live system.IntegrationManagement.ManagementOverrides
Modifier and Type | Field and Description |
---|---|
protected MessageHandlerMetrics |
delegate |
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
LifecycleMessageHandlerMetrics(org.springframework.context.Lifecycle lifecycle,
MessageHandlerMetrics delegate) |
Modifier and Type | Method and Description |
---|---|
void |
configureMetrics(AbstractMessageHandlerMetrics metrics) |
int |
getActiveCount() |
long |
getActiveCountLong() |
MessageHandlerMetrics |
getDelegate() |
Statistics |
getDuration() |
int |
getErrorCount() |
long |
getErrorCountLong() |
int |
getHandleCount() |
long |
getHandleCountLong() |
java.lang.String |
getManagedName() |
java.lang.String |
getManagedType() |
double |
getMaxDuration() |
double |
getMeanDuration() |
double |
getMinDuration() |
IntegrationManagement.ManagementOverrides |
getOverrides()
Return the overrides.
|
double |
getStandardDeviationDuration() |
boolean |
isCountsEnabled() |
boolean |
isLoggingEnabled() |
boolean |
isRunning() |
boolean |
isStatsEnabled() |
void |
reset() |
void |
setCountsEnabled(boolean countsEnabled) |
void |
setLoggingEnabled(boolean enabled) |
void |
setManagedName(java.lang.String name) |
void |
setManagedType(java.lang.String source) |
void |
setStatsEnabled(boolean statsEnabled) |
void |
start() |
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerMetricsCaptor
protected final MessageHandlerMetrics delegate
public LifecycleMessageHandlerMetrics(org.springframework.context.Lifecycle lifecycle, MessageHandlerMetrics delegate)
public MessageHandlerMetrics getDelegate()
public void configureMetrics(AbstractMessageHandlerMetrics metrics)
configureMetrics
in interface ConfigurableMetricsAware<AbstractMessageHandlerMetrics>
@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 void reset()
reset
in interface IntegrationManagement
public int getErrorCount()
getErrorCount
in interface MessageHandlerMetrics
public int getHandleCount()
getHandleCount
in interface MessageHandlerMetrics
public double getMaxDuration()
getMaxDuration
in interface MessageHandlerMetrics
public double getMeanDuration()
getMeanDuration
in interface MessageHandlerMetrics
public double getMinDuration()
getMinDuration
in interface MessageHandlerMetrics
public double getStandardDeviationDuration()
getStandardDeviationDuration
in interface MessageHandlerMetrics
public Statistics getDuration()
getDuration
in interface MessageHandlerMetrics
public java.lang.String getManagedName()
getManagedName
in interface MessageHandlerMetrics
public java.lang.String getManagedType()
getManagedType
in interface MessageHandlerMetrics
public int getActiveCount()
getActiveCount
in interface MessageHandlerMetrics
public long getHandleCountLong()
getHandleCountLong
in interface MessageHandlerMetrics
public long getErrorCountLong()
getErrorCountLong
in interface MessageHandlerMetrics
public long getActiveCountLong()
getActiveCountLong
in interface MessageHandlerMetrics
public void setStatsEnabled(boolean statsEnabled)
setStatsEnabled
in interface IntegrationStatsManagement
public void setCountsEnabled(boolean countsEnabled)
setCountsEnabled
in interface IntegrationManagement
public boolean isStatsEnabled()
isStatsEnabled
in interface IntegrationStatsManagement
public boolean isCountsEnabled()
isCountsEnabled
in interface IntegrationManagement
public void setLoggingEnabled(boolean enabled)
setLoggingEnabled
in interface IntegrationManagement
public boolean isLoggingEnabled()
isLoggingEnabled
in interface IntegrationManagement
public void setManagedName(java.lang.String name)
setManagedName
in interface MessageHandlerMetrics
public void setManagedType(java.lang.String source)
setManagedType
in interface MessageHandlerMetrics
public IntegrationManagement.ManagementOverrides getOverrides()
IntegrationManagement
getOverrides
in interface IntegrationManagement