Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.soa.esb.listeners.message
Class ServiceMessageCounter

    java.lang.Object
      org.jboss.soa.esb.listeners.message.ServiceMessageCounter

All Implemented Interfaces:
  javax.management.DynamicMBean

    public class ServiceMessageCounter

extends java.lang.Object
implements javax.management.DynamicMBean

Service message counter is a MBean that displays an action-by-action breakdown of how many failed and successful messages have been processed and shows the processing time of each.

Since:
  Version 4.2
Author:
  tcunning@redhat.com

Field Summary
`static java.lang.String` | `RESET_COUNTER`

Constructor Summary
`ServiceMessageCounter(ConfigTree f_config)` Constructor

Method Summary
`java.lang.String` | `getActionId(ConfigTree ct)` Return an action id.
`java.lang.Object` | `getAttribute(java.lang.String key)`
`javax.management.AttributeList` | `getAttributes(java.lang.String[] arg0)`
`javax.management.MBeanInfo` | `getMBeanInfo()` This creates the MBeanInfo object provided.
`protected javax.management.ObjectName` | `getObjectName()`
`void` | `incrementTotalCount()` Increment the total message count of this service.
`void` | `initHashes()` Initialize the hashes by setting the counts and the processing time to an initial value of 0.
`java.lang.Object` | `invoke(java.lang.String method, java.lang.Object[] arg1, java.lang.String[] arg2)`
`protected void` | `registerMBean()` Register this MBean with JBoss.
`void` | `resetCounter()` Reset the counters - set all the entries in the action counter hash and in the action process time hash to zero.
`void` | `setAttribute(javax.management.Attribute arg0)`
`javax.management.AttributeList` | `setAttributes(javax.management.AttributeList arg0)`
`void` | `update(ActionStatusBean asb)` Update the ServiceMessageCounter

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RESET_COUNTER

    public static final java.lang.String RESET_COUNTER

See Also:
  Constant Field Values

Constructor Detail

### ServiceMessageCounter

    public ServiceMessageCounter(ConfigTree f_config)

  Constructor

  Parameters:
    `f_config` - config tree

Method Detail

### getActionId

    public java.lang.String getActionId(ConfigTree ct)

  Return an action id. If there's an action name, use that, if not, use the "action" attribute on the action.

  Parameters:
    `ct` - config tree
  Returns:
    action id

### incrementTotalCount

    public void incrementTotalCount()

  Increment the total message count of this service.

### initHashes

    public void initHashes()

  Initialize the hashes by setting the counts and the processing time to an initial value of 0.

### resetCounter

    public void resetCounter()

  Reset the counters - set all the entries in the action counter hash and in the action process time hash to zero.

### getMBeanInfo

    public javax.management.MBeanInfo getMBeanInfo()

  This creates the MBeanInfo object provided. We are returning generic text for the attribute descriptions (the word Property and the name of the attribute), all of the attributes are read-only, and we provide four invocation methods - start/stop/initialise/destroy on the Lifecycle.

  Specified by:
    `getMBeanInfo` in interface `javax.management.DynamicMBean`

### getAttribute

    public java.lang.Object getAttribute(java.lang.String key)
                                  throws javax.management.AttributeNotFoundException,
                                         javax.management.MBeanException,
                                         javax.management.ReflectionException

  Specified by:
    `getAttribute` in interface `javax.management.DynamicMBean`
  Throws:
    `javax.management.AttributeNotFoundException`
    `javax.management.MBeanException`
    `javax.management.ReflectionException`

### getAttributes

    public javax.management.AttributeList getAttributes(java.lang.String[] arg0)

  Specified by:
    `getAttributes` in interface `javax.management.DynamicMBean`

### invoke

    public java.lang.Object invoke(java.lang.String method,
                                   java.lang.Object[] arg1,
                                   java.lang.String[] arg2)
                            throws javax.management.MBeanException,
                                   javax.management.ReflectionException

  Specified by:
    `invoke` in interface `javax.management.DynamicMBean`
  Throws:
    `javax.management.MBeanException`
    `javax.management.ReflectionException`

### setAttribute

    public void setAttribute(javax.management.Attribute arg0)
                      throws javax.management.AttributeNotFoundException,
                             javax.management.InvalidAttributeValueException,
                             javax.management.MBeanException,
                             javax.management.ReflectionException

  Specified by:
    `setAttribute` in interface `javax.management.DynamicMBean`
  Throws:
    `javax.management.AttributeNotFoundException`
    `javax.management.InvalidAttributeValueException`
    `javax.management.MBeanException`
    `javax.management.ReflectionException`

### setAttributes

    public javax.management.AttributeList setAttributes(javax.management.AttributeList arg0)

  Specified by:
    `setAttributes` in interface `javax.management.DynamicMBean`

### registerMBean

    protected void registerMBean()

  Register this MBean with JBoss.

### update

    public void update(ActionStatusBean asb)

  Update the ServiceMessageCounter

  Parameters:
    `asb` - ActionStatusBean

### getObjectName

    protected javax.management.ObjectName getObjectName()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD