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

java.lang.Object
  extended by org.jboss.soa.esb.listeners.message.MessageCounterStatistics

public class MessageCounterStatistics
extends java.lang.Object

Extraction of core from MessageCounter bean.

Author:
tcunning@redhat.com

Constructor Summary
MessageCounterStatistics()
          Constructor.
 
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.
static MessageCounterStatistics getMessageCounterStatistics()
           
 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.
 void update(MessageStatusBean msb)
          Update the message counter based on the MessageStatusBean that is returned from the observable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageCounterStatistics

public MessageCounterStatistics()
Constructor.

Method Detail

getFailedMessageCount

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

Returns:
total number of failed messages

getLastSuccessfulMessageDate

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

Returns:
time the last message was processed at

getLastFailedMessageDate

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

Returns:
time the last message was processed at

getTotalMessageCount

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

Returns:
total number of processed messages

getSuccessfulMessageCount

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

Returns:
total number of successfully processed messages

getProcessedBytes

public long getProcessedBytes()

getFailedBytes

public long getFailedBytes()

update

public void update(MessageStatusBean msb)
Update the message counter based on the MessageStatusBean that is returned from the observable.

Parameters:
o - the observable object
arg - the MessageStatusBean

getAverageSuccessTime

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

Returns:
average time to process a message

resetCounts

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


getMessageCounterStatistics

public static MessageCounterStatistics getMessageCounterStatistics()