org.jboss.soa.esb.listeners.message
Class MessageCounter

java.lang.Object
  extended by org.jboss.soa.esb.listeners.message.MessageCounter
All Implemented Interfaces:
MessageCounterMBean

public class MessageCounter
extends java.lang.Object
implements MessageCounterMBean

MessageCounter is a MBean implementation which keeps track of message data and metadata.

Author:
tcunning@redhat.com

Constructor Summary
MessageCounter()
           
 
Method Summary
 java.lang.Double getAverageSuccessTime()
          Get the average time to process a message.
 long getFailedBytes()
           
 int getFailedMessageCount()
          Get the total number of failed messages.
 java.lang.String getLastFailedMessageDate()
          Get the time the last message was processed at.
 java.lang.String getLastSuccessfulMessageDate()
          Get the time the last message was processed at.
 long getProcessedBytes()
           
 int getSuccessfulMessageCount()
          Get the total number of successfully processed messages.
 int getTotalMessageCount()
          Get the total number of processed messages, both successful and failed.
 void resetCounts()
          Reset the counts - this resets the totals and the last message time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageCounter

public MessageCounter()
Method Detail

getFailedMessageCount

public int getFailedMessageCount()
Get the total number of failed messages.

Specified by:
getFailedMessageCount in interface MessageCounterMBean
Returns:
total number of failed messages

getLastSuccessfulMessageDate

public java.lang.String getLastSuccessfulMessageDate()
Get the time the last message was processed at.

Specified by:
getLastSuccessfulMessageDate in interface MessageCounterMBean
Returns:
time the last message was processed at

getLastFailedMessageDate

public java.lang.String getLastFailedMessageDate()
Get the time the last message was processed at.

Specified by:
getLastFailedMessageDate in interface MessageCounterMBean
Returns:
time the last message was processed at

getTotalMessageCount

public int getTotalMessageCount()
Get the total number of processed messages, both successful and failed.

Specified by:
getTotalMessageCount in interface MessageCounterMBean
Returns:
total number of processed messages

getSuccessfulMessageCount

public int getSuccessfulMessageCount()
Get the total number of successfully processed messages.

Specified by:
getSuccessfulMessageCount in interface MessageCounterMBean
Returns:
total number of successfully processed messages

getProcessedBytes

public long getProcessedBytes()
Specified by:
getProcessedBytes in interface MessageCounterMBean

getFailedBytes

public long getFailedBytes()
Specified by:
getFailedBytes in interface MessageCounterMBean

getAverageSuccessTime

public java.lang.Double getAverageSuccessTime()
Get the average time to process a message.

Specified by:
getAverageSuccessTime in interface MessageCounterMBean
Returns:
average time to process a message

resetCounts

public void resetCounts()
Reset the counts - this resets the totals and the last message time.

Specified by:
resetCounts in interface MessageCounterMBean