[jboss-svn-commits] JBL Code SVN: r14638 - labs/jbossesb/trunk/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Aug 27 08:41:36 EDT 2007
Author: tcunning
Date: 2007-08-27 08:41:36 -0400 (Mon, 27 Aug 2007)
New Revision: 14638
Modified:
labs/jbossesb/trunk/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksMessageCounter.java
Log:
bug:JBESB-669
Add comments to SmooksMessageCounter.
Modified: labs/jbossesb/trunk/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksMessageCounter.java
===================================================================
--- labs/jbossesb/trunk/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksMessageCounter.java 2007-08-27 12:32:40 UTC (rev 14637)
+++ labs/jbossesb/trunk/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksMessageCounter.java 2007-08-27 12:41:36 UTC (rev 14638)
@@ -48,7 +48,6 @@
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.KeyValuePair;
import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.message.ActionStatusBean;
/**
* Smooks message counter is a MBean that displays shows
@@ -89,26 +88,9 @@
m_config = f_config;
actionArray = m_config.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
-
- initHashes();
}
-
+
/**
- * Return an action id. If there's an action name, use that, if not,
- * use the "action" attribute on the action.
- * @param ct config tree
- * @return action id
- */
- public String getActionId(ConfigTree ct) {
- if (ct.getAttribute("name") != null) {
- return ct.getAttribute("name");
- } else if (ct.getAttribute("action") != null) {
- return ct.getAttribute("action");
- }
- return null;
- }
-
- /**
* Increment the total message count of this service.
*/
public void incrementTotalCount() {
@@ -119,14 +101,6 @@
* Initialize the hashes by setting the counts and the processing time to an initial value of 0.
*/
public void initHashes() {
- ConfigTree[] actionList = m_config.getChildren(ListenerTagNames.ACTION_ELEMENT_TAG);
-
- for (ConfigTree actionConfig : actionList) {
- String actionId = getActionId(actionConfig);
- actionCounterHash.put(actionId + " " + MESSAGE_COUNTER, new Integer(0));
- actionFailedCounterHash.put(actionId + " " + FAILED_MESSAGE_COUNTER, new Integer(0));
- actionProcessTimeHash.put(actionId + " " + PROCESSING_TIME, new Long(0));
- }
serviceCount = new Integer(0);
}
@@ -321,6 +295,10 @@
}
}
+ /**
+ * Initialize the message profile with a count of 0 for the time hash, the processed hash, and the failed hash.
+ * @param messageProfile message profile
+ */
public void initMessageProfile(String messageProfile) {
if (!actionProcessTimeHash.containsKey(messageProfile + " " + PROCESSING_TIME)) {
actionProcessTimeHash.put(messageProfile + " " + PROCESSING_TIME, new Long(0));
@@ -333,9 +311,12 @@
}
}
+
/**
- * Update the ServiceMessageCounter
- * @param asb ActionStatusBean
+ * Update the counts of the SmooksMessageCounter for a particular message profile.
+ * @param procTime time
+ * @param messageProfile profile
+ * @param status status
*/
public void update(long procTime, String messageProfile, String status) {
if ((messageProfile != null) && (!messageProfile.equals(""))) {
@@ -356,6 +337,11 @@
}
}
+ /**
+ * Return the object name, which for a SmooksMessageCounter is the deployment name (x.esb) and the category
+ * (SmooksMessageCounter).
+ * @return object name
+ */
protected ObjectName getObjectName()
{
String deploymentName = "";
More information about the jboss-svn-commits
mailing list