You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2009/09/02 17:25:21 UTC

svn commit: r810562 [1/2] - in /incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae: jmx/monitor/ message/ monitor/ monitor/statistics/ spi/transport/ spi/transport/vm/

Author: cwiklik
Date: Wed Sep  2 15:25:17 2009
New Revision: 810562

URL: http://svn.apache.org/viewvc?rev=810562&view=rev
Log:
UIMA-1541 Reformatted to conform to UIMA formatting guidelines. No other changes included.

Modified:
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/BasicUimaJmxMonitorListener.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/JmxMonitorListener.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/ServiceMetrics.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/SingleLineUimaJmxMonitorListener.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/MessageContext.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UIMAMessage.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaEEShutdownTriggerEvent.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/BaseMonitor.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/Monitor.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/MonitorBaseImpl.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/BaseStatistic.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/DelegateStats.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatistic.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatisticMBean.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatistic.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBaseImpl.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBean.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistic.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistics.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/TimerStats.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/UIMAStatistic.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/SpiListener.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaMessageDispatcher.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaTransport.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmMessage.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmMessageDispatcher.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmMessageListener.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmQueue.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmQueueMBean.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/VmTransport.java

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/BasicUimaJmxMonitorListener.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/BasicUimaJmxMonitorListener.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/BasicUimaJmxMonitorListener.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/BasicUimaJmxMonitorListener.java Wed Sep  2 15:25:17 2009
@@ -26,88 +26,118 @@
 import org.apache.uima.util.Level;
 
 /**
- * This class implements {@link JmxMonitorListener} interface. It provides basic formatting
- * for UIMA-AS service metrics. All metrics are formatted and logged into a uima log if 
- * one is defined. Otherwise, the output is dumped to stdout.
+ * This class implements {@link JmxMonitorListener} interface. It provides basic formatting for
+ * UIMA-AS service metrics. All metrics are formatted and logged into a uima log if one is defined.
+ * Otherwise, the output is dumped to stdout.
+ * 
  * 
- *
  */
 public class BasicUimaJmxMonitorListener implements JmxMonitorListener {
 
-	private static final Class CLASS_NAME = JmxMonitorListener.class;
-	private int maxNameLength=0;
+  private static final Class CLASS_NAME = JmxMonitorListener.class;
+
+  private int maxNameLength = 0;
 
-	/**
-	 * Constructor 
-	 * 
-	 * @param aMaxNameLength - the longest name of the UIMA-AS service. This is use to 
-	 * pad other names so that the output is easier to read.
-	 * 
-	 */
-	public BasicUimaJmxMonitorListener( int aMaxNameLength )
-	{
-		maxNameLength = aMaxNameLength;
-	}
-	
-	/**
-	 * Callback method called by the JmxMonitor after each checkpoint. 
-	 * 
-	 * @param sampleTime - last checkpoint time
-	 * @param metrics - an array of ServiceMetrics objects, each holding metrics for a specific
-	 * UIMA AS service.
-	 */
-	public void onNewMetrics(long sampleTime, ServiceMetrics[] metrics) {
-		
-		for( ServiceMetrics serviceMetrics: metrics )
-		{
-			//	Log metrics including shadow CAS pool metric for remote CAS multiplier. Filter out the top level service
-			if ( serviceMetrics.isCasMultiplier() && serviceMetrics.isServiceRemote() && !serviceMetrics.isTopLevelService() )
-			{
+  /**
+   * Constructor
+   * 
+   * @param aMaxNameLength
+   *          - the longest name of the UIMA-AS service. This is use to pad other names so that the
+   *          output is easier to read.
+   * 
+   */
+  public BasicUimaJmxMonitorListener(int aMaxNameLength) {
+    maxNameLength = aMaxNameLength;
+  }
+
+  /**
+   * Callback method called by the JmxMonitor after each checkpoint.
+   * 
+   * @param sampleTime
+   *          - last checkpoint time
+   * @param metrics
+   *          - an array of ServiceMetrics objects, each holding metrics for a specific UIMA AS
+   *          service.
+   */
+  public void onNewMetrics(long sampleTime, ServiceMetrics[] metrics) {
+
+    for (ServiceMetrics serviceMetrics : metrics) {
+      // Log metrics including shadow CAS pool metric for remote CAS multiplier. Filter out the top
+      // level service
+      if (serviceMetrics.isCasMultiplier() && serviceMetrics.isServiceRemote()
+              && !serviceMetrics.isTopLevelService()) {
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
-          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "run", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_service_idle_time_shadow_cas_pool_INFO", new Object[] { format((double)sampleTime/1000000),padName(serviceMetrics.getServiceName()),serviceMetrics.isCasMultiplier(), serviceMetrics.isServiceRemote(),format(serviceMetrics.getIdleTime()),  serviceMetrics.getProcessCount(), serviceMetrics.getInputQueueDepth(), serviceMetrics.getReplyQueueDepth(),format(serviceMetrics.getShadowCasPoolWaitTime()) , format(serviceMetrics.getAnalysisTime()), serviceMetrics.getProcessThreadCount(), serviceMetrics.getCmFreeCasInstanceCount(), serviceMetrics.getSvcFreeCasInstanceCount()});
+          UIMAFramework.getLogger(CLASS_NAME).logrb(
+                  Level.INFO,
+                  CLASS_NAME.getName(),
+                  "run",
+                  UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAEE_service_idle_time_shadow_cas_pool_INFO",
+                  new Object[] { format((double) sampleTime / 1000000),
+                      padName(serviceMetrics.getServiceName()), serviceMetrics.isCasMultiplier(),
+                      serviceMetrics.isServiceRemote(), format(serviceMetrics.getIdleTime()),
+                      serviceMetrics.getProcessCount(), serviceMetrics.getInputQueueDepth(),
+                      serviceMetrics.getReplyQueueDepth(),
+                      format(serviceMetrics.getShadowCasPoolWaitTime()),
+                      format(serviceMetrics.getAnalysisTime()),
+                      serviceMetrics.getProcessThreadCount(),
+                      serviceMetrics.getCmFreeCasInstanceCount(),
+                      serviceMetrics.getSvcFreeCasInstanceCount() });
         }
-			}
-			else
-			{
+      } else {
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
-          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "run", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_service_idle_time_cas_pool_INFO", new Object[] { format((double)sampleTime/1000000),padName(serviceMetrics.getServiceName()),serviceMetrics.isCasMultiplier(), serviceMetrics.isServiceRemote(),format(serviceMetrics.getIdleTime()),  serviceMetrics.getProcessCount(), serviceMetrics.getInputQueueDepth(),serviceMetrics.getReplyQueueDepth(), format(serviceMetrics.getCasPoolWaitTime()) , format(serviceMetrics.getAnalysisTime()), serviceMetrics.getProcessThreadCount(), serviceMetrics.getCmFreeCasInstanceCount(), serviceMetrics.getSvcFreeCasInstanceCount()});
+          UIMAFramework.getLogger(CLASS_NAME).logrb(
+                  Level.INFO,
+                  CLASS_NAME.getName(),
+                  "run",
+                  UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAEE_service_idle_time_cas_pool_INFO",
+                  new Object[] { format((double) sampleTime / 1000000),
+                      padName(serviceMetrics.getServiceName()), serviceMetrics.isCasMultiplier(),
+                      serviceMetrics.isServiceRemote(), format(serviceMetrics.getIdleTime()),
+                      serviceMetrics.getProcessCount(), serviceMetrics.getInputQueueDepth(),
+                      serviceMetrics.getReplyQueueDepth(),
+                      format(serviceMetrics.getCasPoolWaitTime()),
+                      format(serviceMetrics.getAnalysisTime()),
+                      serviceMetrics.getProcessThreadCount(),
+                      serviceMetrics.getCmFreeCasInstanceCount(),
+                      serviceMetrics.getSvcFreeCasInstanceCount() });
         }
-			}
-		}
-		//	Log group delimiter to make it easier to see metrics for this interval 
-		onNewSamplingInterval();
-	}
+      }
+    }
+    // Log group delimiter to make it easier to see metrics for this interval
+    onNewSamplingInterval();
+  }
 
-	public void onNewSamplingInterval() 	{
+  public void onNewSamplingInterval() {
     if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
-      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "run", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_marker_INFO", new Object[] { });
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "run",
+              UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_marker_INFO", new Object[] {});
+    }
+  }
+
+  private String format(double value) {
+    NumberFormat formatter = new DecimalFormat();
+    formatter.setMinimumFractionDigits(0);
+    formatter.setMaximumFractionDigits(0);
+
+    return formatter.format(value);
+  }
+
+  private String format2(double value) {
+    NumberFormat formatter = new DecimalFormat("0.00");
+
+    return formatter.format(value);
+  }
+
+  private String padName(String aName) {
+    StringBuffer name = new StringBuffer(aName);
+    if (aName.length() < maxNameLength) {
+      for (int i = aName.length(); i < maxNameLength; i++) {
+        name.append(' ');
+      }
     }
-	}
-	private String format( double value)
-	{
-		NumberFormat formatter = new DecimalFormat();
-		formatter.setMinimumFractionDigits(0);
-		formatter.setMaximumFractionDigits(0);
-
-		return formatter.format(value);
-	}
-	private String format2( double value)
-	{
-		NumberFormat formatter = new DecimalFormat("0.00");
-
-		return formatter.format(value);
-	}
-	private String padName( String aName )
-	{
-		StringBuffer name = new StringBuffer(aName);
-		if ( aName.length() < maxNameLength )
-		{
-			for( int i=aName.length(); i < maxNameLength; i++ )
-			{
-				name.append(' ');
-			}
-		}
-		return name.toString();
-	}
+    return name.toString();
+  }
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/JmxMonitorListener.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/JmxMonitorListener.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/JmxMonitorListener.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/JmxMonitorListener.java Wed Sep  2 15:25:17 2009
@@ -21,14 +21,16 @@
 import org.apache.uima.aae.jmx.monitor.ServiceMetrics;
 
 public interface JmxMonitorListener {
-	/**
-	 * Provides metrics for all UIMA AS services collected during a checkpoint. This
-	 * method is called by the {@link JmxMonitor} after each checkpoint with the latest
-	 * metrics. The metrics are deltas except for queue depth attribute.
-	 * 
-	 * @param sampleTime - last checkpoint time
-	 * @param metrics - an array of ServiceMetrics objects, each holding metrics for a specific
-	 * UIMA AS service.
-	 */
-	public void onNewMetrics(long sampleTime, ServiceMetrics[] metrics);
+  /**
+   * Provides metrics for all UIMA AS services collected during a checkpoint. This method is called
+   * by the {@link JmxMonitor} after each checkpoint with the latest metrics. The metrics are deltas
+   * except for queue depth attribute.
+   * 
+   * @param sampleTime
+   *          - last checkpoint time
+   * @param metrics
+   *          - an array of ServiceMetrics objects, each holding metrics for a specific UIMA AS
+   *          service.
+   */
+  public void onNewMetrics(long sampleTime, ServiceMetrics[] metrics);
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/ServiceMetrics.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/ServiceMetrics.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/ServiceMetrics.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/ServiceMetrics.java Wed Sep  2 15:25:17 2009
@@ -20,126 +20,174 @@
 
 public class ServiceMetrics {
 
-	private double timestamp;
-	private String serviceName;
-	private double idleTime;
-	private long processCount;
-	private double casPoolWaitTime;
-	private double shadowCasPoolWaitTime;
-	private double timeInCMGetNext;
-	private int samplingInterval;
-	private boolean isServiceRemote;
-	private boolean isCasMultiplier;
-	private boolean topLevelService;
-	private long inputQueueDepth;
-	private long replyQueueDepth;
-	private int processThreadCount;
-	private double analysisTime;
-	private int cmFreeCasInstanceCount;
-	private int svcFreeCasInstanceCount;
-	
-	public boolean isTopLevelService() {
-		return topLevelService;
-	}
-	public void setTopLevelService(boolean topLevelService) {
-		this.topLevelService = topLevelService;
-	}
-	public double getTimestamp() {
-		return timestamp;
-	}
-	public void setTimestamp(double timestamp) {
-		this.timestamp = timestamp;
-	}
-	public String getServiceName() {
-		return serviceName;
-	}
-	public void setServiceName(String serviceName) {
-		this.serviceName = serviceName;
-	}
-	public double getIdleTime() {
-		return idleTime;
-	}
-	public void setIdleTime(double idleTime) {
-		this.idleTime = idleTime;
-	}
-	public long getProcessCount() {
-		return processCount;
-	}
-	public void setProcessCount(long processCount) {
-		this.processCount = processCount;
-	}
-	public double getCasPoolWaitTime() {
-		return casPoolWaitTime;
-	}
-	public void setCasPoolWaitTime(double casPoolWaitTime) {
-		this.casPoolWaitTime = casPoolWaitTime;
-	}
-	public double getShadowCasPoolWaitTime() {
-		return shadowCasPoolWaitTime;
-	}
-	public void setShadowCasPoolWaitTime(double shadowCasPoolWaitTime) {
-		this.shadowCasPoolWaitTime = shadowCasPoolWaitTime;
-	}
-	public double getTimeInCMGetNext() {
-		return timeInCMGetNext;
-	}
-	public void setTimeInCMGetNext(double timeInCMGetNext) {
-		this.timeInCMGetNext = timeInCMGetNext;
-	}
-	public int getSamplingInterval() {
-		return samplingInterval;
-	}
-	public void setSamplingInterval(int samplingInterval) {
-		this.samplingInterval = samplingInterval;
-	}
-	public boolean isServiceRemote() {
-		return isServiceRemote;
-	}
-	public void setServiceRemote(boolean isServiceRemote) {
-		this.isServiceRemote = isServiceRemote;
-	}
-	public boolean isCasMultiplier() {
-		return isCasMultiplier;
-	}
-	public void setCasMultiplier(boolean isCasMultiplier) {
-		this.isCasMultiplier = isCasMultiplier;
-	}
-	public long getInputQueueDepth() {
-		return inputQueueDepth;
-	}
-	public void setInputQueueDepth(long queueDepth) {
-		this.inputQueueDepth = queueDepth;
-	}
-	public long getReplyQueueDepth() {
-		return replyQueueDepth;
-	}
-	public void setReplyQueueDepth(long queueDepth) {
-		this.replyQueueDepth = queueDepth;
-	}
-	public int getProcessThreadCount() {
-		return processThreadCount;
-	}
-	public void setProcessThreadCount(int aProcessThreadCount) {
-		processThreadCount = aProcessThreadCount;
-	}
-	public double getAnalysisTime() {
-		return analysisTime;
-	}
-	public void setAnalysisTime(double analysisTime) {
-		this.analysisTime = analysisTime;
-	}
-	public int getCmFreeCasInstanceCount() {
-		return cmFreeCasInstanceCount;
-	}
-	public void setCmFreeCasInstanceCount(int cmFreeCasInstanceCount) {
-		this.cmFreeCasInstanceCount = cmFreeCasInstanceCount;
-	}
+  private double timestamp;
+
+  private String serviceName;
+
+  private double idleTime;
+
+  private long processCount;
+
+  private double casPoolWaitTime;
+
+  private double shadowCasPoolWaitTime;
+
+  private double timeInCMGetNext;
+
+  private int samplingInterval;
+
+  private boolean isServiceRemote;
+
+  private boolean isCasMultiplier;
+
+  private boolean topLevelService;
+
+  private long inputQueueDepth;
+
+  private long replyQueueDepth;
+
+  private int processThreadCount;
+
+  private double analysisTime;
+
+  private int cmFreeCasInstanceCount;
+
+  private int svcFreeCasInstanceCount;
+
+  public boolean isTopLevelService() {
+    return topLevelService;
+  }
+
+  public void setTopLevelService(boolean topLevelService) {
+    this.topLevelService = topLevelService;
+  }
+
+  public double getTimestamp() {
+    return timestamp;
+  }
+
+  public void setTimestamp(double timestamp) {
+    this.timestamp = timestamp;
+  }
+
+  public String getServiceName() {
+    return serviceName;
+  }
+
+  public void setServiceName(String serviceName) {
+    this.serviceName = serviceName;
+  }
+
+  public double getIdleTime() {
+    return idleTime;
+  }
+
+  public void setIdleTime(double idleTime) {
+    this.idleTime = idleTime;
+  }
+
+  public long getProcessCount() {
+    return processCount;
+  }
+
+  public void setProcessCount(long processCount) {
+    this.processCount = processCount;
+  }
+
+  public double getCasPoolWaitTime() {
+    return casPoolWaitTime;
+  }
+
+  public void setCasPoolWaitTime(double casPoolWaitTime) {
+    this.casPoolWaitTime = casPoolWaitTime;
+  }
+
+  public double getShadowCasPoolWaitTime() {
+    return shadowCasPoolWaitTime;
+  }
+
+  public void setShadowCasPoolWaitTime(double shadowCasPoolWaitTime) {
+    this.shadowCasPoolWaitTime = shadowCasPoolWaitTime;
+  }
+
+  public double getTimeInCMGetNext() {
+    return timeInCMGetNext;
+  }
+
+  public void setTimeInCMGetNext(double timeInCMGetNext) {
+    this.timeInCMGetNext = timeInCMGetNext;
+  }
+
+  public int getSamplingInterval() {
+    return samplingInterval;
+  }
+
+  public void setSamplingInterval(int samplingInterval) {
+    this.samplingInterval = samplingInterval;
+  }
+
+  public boolean isServiceRemote() {
+    return isServiceRemote;
+  }
+
+  public void setServiceRemote(boolean isServiceRemote) {
+    this.isServiceRemote = isServiceRemote;
+  }
+
+  public boolean isCasMultiplier() {
+    return isCasMultiplier;
+  }
+
+  public void setCasMultiplier(boolean isCasMultiplier) {
+    this.isCasMultiplier = isCasMultiplier;
+  }
+
+  public long getInputQueueDepth() {
+    return inputQueueDepth;
+  }
+
+  public void setInputQueueDepth(long queueDepth) {
+    this.inputQueueDepth = queueDepth;
+  }
+
+  public long getReplyQueueDepth() {
+    return replyQueueDepth;
+  }
+
+  public void setReplyQueueDepth(long queueDepth) {
+    this.replyQueueDepth = queueDepth;
+  }
+
+  public int getProcessThreadCount() {
+    return processThreadCount;
+  }
+
+  public void setProcessThreadCount(int aProcessThreadCount) {
+    processThreadCount = aProcessThreadCount;
+  }
+
+  public double getAnalysisTime() {
+    return analysisTime;
+  }
+
+  public void setAnalysisTime(double analysisTime) {
+    this.analysisTime = analysisTime;
+  }
+
+  public int getCmFreeCasInstanceCount() {
+    return cmFreeCasInstanceCount;
+  }
+
+  public void setCmFreeCasInstanceCount(int cmFreeCasInstanceCount) {
+    this.cmFreeCasInstanceCount = cmFreeCasInstanceCount;
+  }
+
   public int getSvcFreeCasInstanceCount() {
     return svcFreeCasInstanceCount;
   }
+
   public void setSvcFreeCasInstanceCount(int svcFreeCasInstanceCount) {
     this.svcFreeCasInstanceCount = svcFreeCasInstanceCount;
   }
 
-	
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/SingleLineUimaJmxMonitorListener.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/SingleLineUimaJmxMonitorListener.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/SingleLineUimaJmxMonitorListener.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/jmx/monitor/SingleLineUimaJmxMonitorListener.java Wed Sep  2 15:25:17 2009
@@ -28,116 +28,116 @@
 import org.apache.uima.util.Level;
 
 /**
- * This class implements {@link JmxMonitorListener} interface. It provides basic formatting
- * for UIMA-AS service metrics. All metrics are formatted and logged into a uima log if 
- * one is defined. Otherwise, the output is dumped to stdout.
+ * This class implements {@link JmxMonitorListener} interface. It provides basic formatting for
+ * UIMA-AS service metrics. All metrics are formatted and logged into a uima log if one is defined.
+ * Otherwise, the output is dumped to stdout.
+ * 
  * 
- *
  */
 public class SingleLineUimaJmxMonitorListener implements JmxMonitorListener {
 
-	private static final Class CLASS_NAME = JmxMonitorListener.class;
-	private boolean firsttime = true;
-	private double lastSampleTime = 0;
-	private double period;
-
-	/**
-	 * Constructor 
-	 * 
-	 * @param aMaxNameLength - the longest name of the UIMA-AS service. This is use to 
-	 * pad other names so that the output is easier to read.
-	 * 
-	 */
-	public SingleLineUimaJmxMonitorListener()
-	{
-	}
-	
-	/**
-	 * Callback method called by the JmxMonitor after each checkpoint. 
-	 * 
-	 * @param sampleTime - last checkpoint time
-	 * @param metrics - an array of ServiceMetrics objects, each holding metrics for a specific
-	 * UIMA AS service.
-	 */
-	public void onNewMetrics(long sampleTime, ServiceMetrics[] metrics) {
-		
-		String items;
-
-		if (firsttime) {
-			firsttime = false;
-			items ="\t Timestamp";
-			for( ServiceMetrics serviceMetrics: metrics ) {
-				String srvName = serviceMetrics.getServiceName();
-				srvName = srvName.substring(0, srvName.indexOf("_Service Performance"));
-				if (serviceMetrics.isTopLevelService()) {
-					srvName = "(S)" + srvName;
-				}
-				else if (serviceMetrics.isServiceRemote()) {
-					srvName = "(R)" + srvName;
-				}
-				items = items + "\t" + srvName + "-CPU";
-				items = items + "\t" + srvName + "-Idle";
-				items = items + "\t" + srvName + "-CASes";
-				items = items + "\t" + srvName + "-InQ";
-				if (!serviceMetrics.isTopLevelService()) {
-					items = items + "\t" + srvName + "-RepQ";
-				}
-				if (serviceMetrics.isTopLevelService() ||
-						(serviceMetrics.isCasMultiplier() && serviceMetrics.isServiceRemote()) ) {
-					items = items + "\t" + srvName + "-CPW";
-				}
-				if (serviceMetrics.isCasMultiplier() && !serviceMetrics.isServiceRemote() ) {
-					items = items + "\t" + srvName + "-CmFreeCP";
-				}
-				if ( serviceMetrics.isTopLevelService() ) {
+  private static final Class CLASS_NAME = JmxMonitorListener.class;
+
+  private boolean firsttime = true;
+
+  private double lastSampleTime = 0;
+
+  private double period;
+
+  /**
+   * Constructor
+   * 
+   * @param aMaxNameLength
+   *          - the longest name of the UIMA-AS service. This is use to pad other names so that the
+   *          output is easier to read.
+   * 
+   */
+  public SingleLineUimaJmxMonitorListener() {
+  }
+
+  /**
+   * Callback method called by the JmxMonitor after each checkpoint.
+   * 
+   * @param sampleTime
+   *          - last checkpoint time
+   * @param metrics
+   *          - an array of ServiceMetrics objects, each holding metrics for a specific UIMA AS
+   *          service.
+   */
+  public void onNewMetrics(long sampleTime, ServiceMetrics[] metrics) {
+
+    String items;
+
+    if (firsttime) {
+      firsttime = false;
+      items = "\t Timestamp";
+      for (ServiceMetrics serviceMetrics : metrics) {
+        String srvName = serviceMetrics.getServiceName();
+        srvName = srvName.substring(0, srvName.indexOf("_Service Performance"));
+        if (serviceMetrics.isTopLevelService()) {
+          srvName = "(S)" + srvName;
+        } else if (serviceMetrics.isServiceRemote()) {
+          srvName = "(R)" + srvName;
+        }
+        items = items + "\t" + srvName + "-CPU";
+        items = items + "\t" + srvName + "-Idle";
+        items = items + "\t" + srvName + "-CASes";
+        items = items + "\t" + srvName + "-InQ";
+        if (!serviceMetrics.isTopLevelService()) {
+          items = items + "\t" + srvName + "-RepQ";
+        }
+        if (serviceMetrics.isTopLevelService()
+                || (serviceMetrics.isCasMultiplier() && serviceMetrics.isServiceRemote())) {
+          items = items + "\t" + srvName + "-CPW";
+        }
+        if (serviceMetrics.isCasMultiplier() && !serviceMetrics.isServiceRemote()) {
+          items = items + "\t" + srvName + "-CmFreeCP";
+        }
+        if (serviceMetrics.isTopLevelService()) {
           items = items + "\t" + srvName + "-SvcFreeCP";
-				}
-			}
-			UIMAFramework.getLogger(CLASS_NAME).log(Level.INFO, items);
-		}
-
-		items = "\t";
-		items = items + format(sampleTime/1000000000.0);
-		period = (sampleTime - lastSampleTime)/1000000.0;
-		lastSampleTime = sampleTime;
-		for( ServiceMetrics serviceMetrics: metrics )
-		{
-			items = items + "\t" + format(serviceMetrics.getAnalysisTime()/period);
-			items = items + "\t" + format(serviceMetrics.getIdleTime()/period);
-			items = items + "\t" + serviceMetrics.getProcessCount();
-			items = items + "\t" + serviceMetrics.getInputQueueDepth();
-			if (!serviceMetrics.isTopLevelService()) {
-				items = items + "\t" + serviceMetrics.getReplyQueueDepth();
-			}
-			if ( serviceMetrics.isTopLevelService() ) {
-				items = items + "\t" + format(serviceMetrics.getCasPoolWaitTime()/period);
-			}
-			else if ( serviceMetrics.isCasMultiplier() ) {
-				if ( serviceMetrics.isServiceRemote() ) {
-					items = items + "\t" + format(serviceMetrics.getShadowCasPoolWaitTime()/period);
-				}
-				else {
-					items = items + "\t" + serviceMetrics.getCmFreeCasInstanceCount();
-				}
-			}
-      if ( serviceMetrics.isTopLevelService() ) {
+        }
+      }
+      UIMAFramework.getLogger(CLASS_NAME).log(Level.INFO, items);
+    }
+
+    items = "\t";
+    items = items + format(sampleTime / 1000000000.0);
+    period = (sampleTime - lastSampleTime) / 1000000.0;
+    lastSampleTime = sampleTime;
+    for (ServiceMetrics serviceMetrics : metrics) {
+      items = items + "\t" + format(serviceMetrics.getAnalysisTime() / period);
+      items = items + "\t" + format(serviceMetrics.getIdleTime() / period);
+      items = items + "\t" + serviceMetrics.getProcessCount();
+      items = items + "\t" + serviceMetrics.getInputQueueDepth();
+      if (!serviceMetrics.isTopLevelService()) {
+        items = items + "\t" + serviceMetrics.getReplyQueueDepth();
+      }
+      if (serviceMetrics.isTopLevelService()) {
+        items = items + "\t" + format(serviceMetrics.getCasPoolWaitTime() / period);
+      } else if (serviceMetrics.isCasMultiplier()) {
+        if (serviceMetrics.isServiceRemote()) {
+          items = items + "\t" + format(serviceMetrics.getShadowCasPoolWaitTime() / period);
+        } else {
+          items = items + "\t" + serviceMetrics.getCmFreeCasInstanceCount();
+        }
+      }
+      if (serviceMetrics.isTopLevelService()) {
         items = items + "\t" + serviceMetrics.getSvcFreeCasInstanceCount();
       }
 
-		}
+    }
     if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
       UIMAFramework.getLogger(CLASS_NAME).log(Level.INFO, items);
     }
-	}
+  }
 
-	private String format( double value)
-	{
-		NumberFormat formatter = new DecimalFormat();
-//		formatter.setRoundingMode(java.math.RoundingMode.UP);
-//		formatter.setMinimumFractionDigits(0);
-//		formatter.setMaximumFractionDigits(0);
+  private String format(double value) {
+    NumberFormat formatter = new DecimalFormat();
+    // formatter.setRoundingMode(java.math.RoundingMode.UP);
+    // formatter.setMinimumFractionDigits(0);
+    // formatter.setMaximumFractionDigits(0);
 
-		return formatter.format(value);
-	}
+    return formatter.format(value);
+  }
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/AsynchAEMessage.java Wed Sep  2 15:25:17 2009
@@ -19,71 +19,112 @@
 
 package org.apache.uima.aae.message;
 
+public interface AsynchAEMessage {
+  public static final String TotalTimeSpentInAnalytic = "TimeInAnalytic";
+
+  public static final String TimeInService = "TimeInService";
+
+  public static final String Endpoint = "Endpoint";
+
+  public static final String DelegateStats = "DelegateStats";
+
+  public static final String RequestFailed = "RequestFailed";
+
+  public static final String CasReference = "CasReference";
+
+  public static final String InputCasReference = "InputCasReference";
+
+  public static final String MessageFrom = "MessageFrom";
+
+  public static final String XCASREFId = "XCASRefId";
+
+  public static final String XCas = "XCas";
+
+  public static final String AEMetadata = "Metadata";
+
+  public static final String CasSequence = "CasSequence";
+
+  public static final String ReplyToEndpoint = "ReplyToEndpoint";
+
+  public static final String EndpointServer = "EndpointServer";
+
+  public static final String ServerIP = "ServerIP";
+
+  public static final String RemoveEndpoint = "RemoveEndpoint";
+
+  public static final String Aborted = "Aborted";
+
+  public static final String TimeToSerializeCAS = "TimeToSerializeCAS";
+
+  public static final String TimeToDeserializeCAS = "TimeToDeserializeCAS";
+
+  public static final String TimeWaitingForCAS = "TimeWaitingForCAS";
+
+  public static final String TimeInProcessCAS = "TimeInProcessCAS";
+
+  public static final String IdleTime = "IdleTime";
+
+  public static final String CAS = "CAS";
+
+  public static final String Cargo = "Cargo";
+
+  public static final String SkipSubordinateCountUpdate = "SkipSubordinateCountUpdate";
+
+  public static final String SkipPendingLists = "SkipPendingLists";
+
+  public static final String Payload = "Payload";
+
+  public static final int XMIPayload = 1000;
+
+  public static final int CASRefID = 1001;
+
+  public static final int Metadata = 1002;
+
+  public static final int Exception = 1003;
+
+  public static final int XCASPayload = 1004;
+
+  public static final int None = 1005;
+
+  public static final int BinaryPayload = 1006;
+
+  public static final String Command = "Command";
+
+  public static final int Process = 2000;
+
+  public static final int GetMeta = 2001;
+
+  public static final int CollectionProcessComplete = 2002;
+
+  public static final int Terminate = 2003;
+
+  public static final int ACK = 2004;
+
+  public static final int ReleaseCAS = 2005;
 
-public interface AsynchAEMessage
-{
-	public static final String TotalTimeSpentInAnalytic = "TimeInAnalytic";
-	public static final String TimeInService = "TimeInService";
-	public static final String Endpoint = "Endpoint";
-	public static final String DelegateStats = "DelegateStats";
-	public static final String RequestFailed = "RequestFailed";
-	
-	public static final String CasReference = "CasReference";
-	public static final String InputCasReference = "InputCasReference";
-	public static final String MessageFrom = "MessageFrom";
-	public static final String XCASREFId = "XCASRefId";
-	public static final String XCas = "XCas";
-	public static final String AEMetadata = "Metadata";
-	public static final String CasSequence = "CasSequence";
-	public static final String ReplyToEndpoint = "ReplyToEndpoint";
-	public static final String EndpointServer = "EndpointServer";
-	public static final String ServerIP = "ServerIP";
-	public static final String RemoveEndpoint = "RemoveEndpoint";
-	public static final String Aborted = "Aborted";
-
-	public static final String TimeToSerializeCAS = "TimeToSerializeCAS";
-	public static final String TimeToDeserializeCAS = "TimeToDeserializeCAS";
-	public static final String TimeWaitingForCAS  = "TimeWaitingForCAS";
-	public static final String TimeInProcessCAS  = "TimeInProcessCAS";
-	public static final String IdleTime  = "IdleTime";
-	public static final String CAS  = "CAS";
-	public static final String Cargo = "Cargo";
-	public static final String SkipSubordinateCountUpdate = "SkipSubordinateCountUpdate";
-	public static final String SkipPendingLists = "SkipPendingLists";
-	
-	public static final String Payload = "Payload";
-	public static final int XMIPayload = 1000;
-	public static final int CASRefID = 1001;
-	public static final int Metadata = 1002;
-	public static final int Exception= 1003;
-	public static final int XCASPayload = 1004;
-	public static final int None = 1005;
-	public static final int BinaryPayload = 1006;
-	
-
-	
-	public static final String Command = "Command";
-	public static final int Process = 2000;
-	public static final int GetMeta = 2001;
-	public static final int CollectionProcessComplete = 2002;
-	public static final int Terminate = 2003;
-	public static final int ACK = 2004;
-	public static final int ReleaseCAS = 2005;
   public static final int Stop = 2006;
+
   public static final int Ping = 2007;
+
   public static final int ServiceInfo = 2008;
-	
-	public static final String MessageType = "MessageType";
-	public static final int Request = 3000;
-	public static final int Response = 3001;
-	
-	public static final String AcceptsDeltaCas = "AcceptsDeltaCas";
+
+  public static final String MessageType = "MessageType";
+
+  public static final int Request = 3000;
+
+  public static final int Response = 3001;
+
+  public static final String AcceptsDeltaCas = "AcceptsDeltaCas";
+
   public static final String SentDeltaCas = "SentDeltaCas";
-  
+
   public static final String Serialization = "Serialization";
+
   public static final int XmiSerialization = 4000;
+
   public static final int BinarySerialization = 4001;
-  
+
   public static final String ErrorCause = "Cause";
+
   public static final int PingTimeout = 5001;
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/MessageContext.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/MessageContext.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/MessageContext.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/MessageContext.java Wed Sep  2 15:25:17 2009
@@ -19,27 +19,37 @@
 
 package org.apache.uima.aae.message;
 
-
 import org.apache.uima.aae.controller.Endpoint;
 import org.apache.uima.aae.error.AsynchAEException;
 import org.apache.uima.aae.error.ErrorContext;
 
-public interface MessageContext
-{
-	public String getMessageStringProperty( String aMessagePropertyName ) throws AsynchAEException;
-	public int getMessageIntProperty( String aMessagePropertyName ) throws AsynchAEException;
-	public long getMessageLongProperty( String aMessagePropertyName ) throws AsynchAEException;
-	public Object getMessageObjectProperty( String aMessagePropertyName ) throws AsynchAEException;
-	public boolean getMessageBooleanProperty( String aMessagePropertyName ) throws AsynchAEException;
-	public Endpoint getEndpoint();
-
-	public String getStringMessage() throws AsynchAEException;
-	public Object getObjectMessage() throws AsynchAEException;
-	public byte[] getByteMessage() throws AsynchAEException;
-	public Object getRawMessage();
-	public boolean propertyExists(String aKey) throws AsynchAEException;
-	public void setMessageArrivalTime( long anArrivalTime );
-	public long getMessageArrivalTime();
-	public String getEndpointName();
+public interface MessageContext {
+  public String getMessageStringProperty(String aMessagePropertyName) throws AsynchAEException;
+
+  public int getMessageIntProperty(String aMessagePropertyName) throws AsynchAEException;
+
+  public long getMessageLongProperty(String aMessagePropertyName) throws AsynchAEException;
+
+  public Object getMessageObjectProperty(String aMessagePropertyName) throws AsynchAEException;
+
+  public boolean getMessageBooleanProperty(String aMessagePropertyName) throws AsynchAEException;
+
+  public Endpoint getEndpoint();
+
+  public String getStringMessage() throws AsynchAEException;
+
+  public Object getObjectMessage() throws AsynchAEException;
+
+  public byte[] getByteMessage() throws AsynchAEException;
+
+  public Object getRawMessage();
+
+  public boolean propertyExists(String aKey) throws AsynchAEException;
+
+  public void setMessageArrivalTime(long anArrivalTime);
+
+  public long getMessageArrivalTime();
+
+  public String getEndpointName();
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UIMAMessage.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UIMAMessage.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UIMAMessage.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UIMAMessage.java Wed Sep  2 15:25:17 2009
@@ -19,11 +19,11 @@
 
 package org.apache.uima.aae.message;
 
-public class UIMAMessage
-{
-	public static final String ServerURI = "ServerURI";
-	public static final String EndpointName ="EndpointName";
-	public static final String RawMsg ="RawMsg";
-	
+public class UIMAMessage {
+  public static final String ServerURI = "ServerURI";
+
+  public static final String EndpointName = "EndpointName";
+
+  public static final String RawMsg = "RawMsg";
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaEEShutdownTriggerEvent.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaEEShutdownTriggerEvent.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaEEShutdownTriggerEvent.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaEEShutdownTriggerEvent.java Wed Sep  2 15:25:17 2009
@@ -28,24 +28,22 @@
 /**
  *
  */
-public class UimaEEShutdownTriggerEvent extends ApplicationEvent
-{
-    private AnalysisEngineController targetController = null;
-	/**
-	 * @param source
-	 */
-	public UimaEEShutdownTriggerEvent(Object source)
-	{
-		super(source);
-	}
-	public AnalysisEngineController getTargetController()
-	{
-		return targetController;
-	}
-	public void setTargetController(AnalysisEngineController targetController)
-	{
-		this.targetController = targetController;
-	}
+public class UimaEEShutdownTriggerEvent extends ApplicationEvent {
+  private AnalysisEngineController targetController = null;
+
+  /**
+   * @param source
+   */
+  public UimaEEShutdownTriggerEvent(Object source) {
+    super(source);
+  }
+
+  public AnalysisEngineController getTargetController() {
+    return targetController;
+  }
+
+  public void setTargetController(AnalysisEngineController targetController) {
+    this.targetController = targetController;
+  }
 
-	
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/message/UimaMessageValidator.java Wed Sep  2 15:25:17 2009
@@ -10,42 +10,44 @@
 public class UimaMessageValidator {
   private static final Class CLASS_NAME = UimaMessageValidator.class;
 
-  private static String getEndpointName( UimaMessage aMessage) throws IllegalArgumentException {
+  private static String getEndpointName(UimaMessage aMessage) throws IllegalArgumentException {
     String endpointName = aMessage.getStringProperty(AsynchAEMessage.MessageFrom);
-    if ( endpointName == null )
-    {
+    if (endpointName == null) {
       throw new IllegalArgumentException("Invalid Message. Missing 'MessageFrom' Property.");
     }
     return endpointName;
   }
+
   /**
    * Validate message type contained in the JMS header.
    * 
-   * @param aMessage - jms message retrieved from queue
-   * @param properties - map containing message properties
+   * @param aMessage
+   *          - jms message retrieved from queue
+   * @param properties
+   *          - map containing message properties
    * @return
    * @throws Exception
    */
 
   public static boolean validMessageType(UimaMessage aMessage, String endpointName)
           throws Exception {
-    
-    
+
     if (aMessage.containsProperty(AsynchAEMessage.MessageType)) {
       int msgType = aMessage.getIntProperty(AsynchAEMessage.MessageType);
       if (msgType != AsynchAEMessage.Response && msgType != AsynchAEMessage.Request) {
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
           UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
-                "validMessageType", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
-                "UIMAJMS_invalid_msgtype_in_message__INFO", new Object[] { msgType, endpointName });
+                  "validMessageType", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAJMS_invalid_msgtype_in_message__INFO",
+                  new Object[] { msgType, endpointName });
         }
         return false;
       }
     } else {
       if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
         UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
-              "validMessageType", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
-              "UIMAJMS_msgtype_notin_message__INFO", new Object[] { endpointName });
+                "validMessageType", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAJMS_msgtype_notin_message__INFO", new Object[] { endpointName });
       }
       return false;
     }
@@ -81,30 +83,33 @@
   /**
    * Validate command contained in the header of the JMS Message
    * 
-   * @param aMessage - JMS Message received
-   * @param properties - Map containing header properties
+   * @param aMessage
+   *          - JMS Message received
+   * @param properties
+   *          - Map containing header properties
    * @return - true if the command received is a valid one, false otherwise
    * @throws Exception
    */
-  public static boolean validCommand(UimaMessage aMessage, String endpointName)
-          throws Exception {
+  public static boolean validCommand(UimaMessage aMessage, String endpointName) throws Exception {
     if (aMessage.containsProperty(AsynchAEMessage.Command)) {
       int command = aMessage.getIntProperty(AsynchAEMessage.Command);
       if (command != AsynchAEMessage.Process && command != AsynchAEMessage.GetMeta
               && command != AsynchAEMessage.ReleaseCAS && command != AsynchAEMessage.Stop
-              && command != AsynchAEMessage.Ping && command != AsynchAEMessage.CollectionProcessComplete) {
+              && command != AsynchAEMessage.Ping
+              && command != AsynchAEMessage.CollectionProcessComplete) {
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
-          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "validCommand",
-                UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_invalid_command_in_message__INFO",
-                new Object[] { command, endpointName });
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+                  "validCommand", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAJMS_invalid_command_in_message__INFO",
+                  new Object[] { command, endpointName });
         }
         return false;
       }
     } else {
       if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
         UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "validCommand",
-              UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_command_notin_message__INFO",
-              new Object[] { endpointName });
+                UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_command_notin_message__INFO",
+                new Object[] { endpointName });
       }
       return false;
     }
@@ -115,20 +120,21 @@
   /**
    * Validates payload in the JMS Message.
    * 
-   * @param aMessage - JMS Message received
-   * @param properties - Map containing header properties
+   * @param aMessage
+   *          - JMS Message received
+   * @param properties
+   *          - Map containing header properties
    * @return - true if the payload is valid, false otherwise
    * @throws Exception
    */
-  public static boolean validPayload(UimaMessage aMessage, String endpointName)
-          throws Exception {
+  public static boolean validPayload(UimaMessage aMessage, String endpointName) throws Exception {
     if (aMessage.containsProperty(AsynchAEMessage.Command)) {
       int command = aMessage.getIntProperty(AsynchAEMessage.Command);
       if (command == AsynchAEMessage.GetMeta
               || command == AsynchAEMessage.CollectionProcessComplete
-              || command == AsynchAEMessage.Ping
-              || command == AsynchAEMessage.Stop || command == AsynchAEMessage.ReleaseCAS) {
-        //  Payload not included in GetMeta Request
+              || command == AsynchAEMessage.Ping || command == AsynchAEMessage.Stop
+              || command == AsynchAEMessage.ReleaseCAS) {
+        // Payload not included in GetMeta Request
         return true;
       }
     }
@@ -136,19 +142,21 @@
     if (aMessage.containsProperty(AsynchAEMessage.Payload)) {
       int payload = aMessage.getIntProperty(AsynchAEMessage.Payload);
       if (payload != AsynchAEMessage.XMIPayload && payload != AsynchAEMessage.CASRefID
-          && payload != AsynchAEMessage.BinaryPayload  && payload != AsynchAEMessage.Exception && payload != AsynchAEMessage.Metadata) {
+              && payload != AsynchAEMessage.BinaryPayload && payload != AsynchAEMessage.Exception
+              && payload != AsynchAEMessage.Metadata) {
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
-          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "validPayload",
-                UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_invalid_payload_in_message__INFO",
-                new Object[] { payload, endpointName });
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+                  "validPayload", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAJMS_invalid_payload_in_message__INFO",
+                  new Object[] { payload, endpointName });
         }
         return false;
       }
     } else {
       if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
         UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "validPayload",
-              UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_payload_notin_message__INFO",
-              new Object[] { endpointName });
+                UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_payload_notin_message__INFO",
+                new Object[] { endpointName });
       }
       return false;
     }
@@ -159,7 +167,7 @@
   public static boolean isStaleMessage(UimaMessage aMessage, boolean isStopped,
           String endpointName, boolean entryExists) {
     if (isStopped) {
-      //  Shutting down 
+      // Shutting down
       return true;
     }
     int command = aMessage.getIntProperty(AsynchAEMessage.Command);
@@ -169,13 +177,13 @@
       if (!entryExists) {
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
           UIMAFramework.getLogger(CLASS_NAME).logrb(
-                Level.FINE,
-                CLASS_NAME.getName(),
-                "isStaleMessage",
-                UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
-                "UIMAJMS_stale_message__FINE",
-                new Object[] { endpointName, casReferenceId,
-                    aMessage.getStringProperty(AsynchAEMessage.MessageFrom) });
+                  Level.FINE,
+                  CLASS_NAME.getName(),
+                  "isStaleMessage",
+                  UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAJMS_stale_message__FINE",
+                  new Object[] { endpointName, casReferenceId,
+                      aMessage.getStringProperty(AsynchAEMessage.MessageFrom) });
         }
         return true;
       }
@@ -187,28 +195,29 @@
    * Validates contents of the message. It checks if command, payload and message types contain
    * valid data.
    * 
-   * @param aMessage - JMS Message to validate
+   * @param aMessage
+   *          - JMS Message to validate
    * @return - true if message is valid, false otherwise
    * @throws Exception
    */
-  public static boolean isValidMessage(UimaMessage aMessage, 
-          AnalysisEngineController controller) throws Exception {
-    String endpointName = getEndpointName( aMessage);
+  public static boolean isValidMessage(UimaMessage aMessage, AnalysisEngineController controller)
+          throws Exception {
+    String endpointName = getEndpointName(aMessage);
     if (!validMessageType(aMessage, endpointName)) {
-        return false;
-      }
-      if (!validCommand(aMessage, endpointName)) {
-        return false;
-      }
-      if (!validPayload(aMessage, endpointName)) {
-        return false;
-      }
-      String casReferenceId = aMessage.getStringProperty(AsynchAEMessage.CasReference);
+      return false;
+    }
+    if (!validCommand(aMessage, endpointName)) {
+      return false;
+    }
+    if (!validPayload(aMessage, endpointName)) {
+      return false;
+    }
+    String casReferenceId = aMessage.getStringProperty(AsynchAEMessage.CasReference);
 
-      if (isStaleMessage(aMessage, controller.isStopped(), endpointName, controller
-              .getInProcessCache().entryExists(casReferenceId))) {
-        return false;
-      }
+    if (isStaleMessage(aMessage, controller.isStopped(), endpointName, controller
+            .getInProcessCache().entryExists(casReferenceId))) {
+      return false;
+    }
     return true;
   }
 

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/BaseMonitor.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/BaseMonitor.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/BaseMonitor.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/BaseMonitor.java Wed Sep  2 15:25:17 2009
@@ -32,72 +32,64 @@
 import org.apache.uima.aae.monitor.statistics.Statistic;
 import org.apache.uima.aae.monitor.statistics.Statistics;
 
-public class BaseMonitor implements Monitor
-{
-	private Map thresholds = null;
-	
-
-	public BaseMonitor( String jmxServerURI ) throws Exception
-	{
-	}
-
-	public void setThresholds( Map aThresholdMap)
-	{
-		thresholds = aThresholdMap;
-	}
-	public Map getThresholds()
-	{
-		return thresholds;
-	}
-	
-	public void addStatistic(String aName, Statistic aStatistic, Endpoint anEndpoint)
-	{
-	}
-
-	public Statistic getStatistic(String key)
-	{
-		// TODO Auto-generated method stub
-		return null;
-	}
-	public void addStatistic(String key, Statistic aStatistic)
-	{
-		// TODO Auto-generated method stub
-		
-	}
-	public LongNumericStatistic getLongNumericStatistic(String aComponent, String aStatisticName)
-	{
-		// TODO Auto-generated method stub
-		return null;
-	}
-	public Statistic getStatistic(String aComponentName, String aStatisticName)
-	{
-		// TODO Auto-generated method stub
-		return null;
-	}
-	public Statistics getStatistics(String aComponentName)
-	{
-		// TODO Auto-generated method stub
-		return null;
-	}
-	public void incrementCount(String aComponent, String aStatisticName)
-	{
-		// TODO Auto-generated method stub
-		
-	}
-	public void resetCountingStatistic(String aComponent, String aStatisticName)
-	{
-		// TODO Auto-generated method stub
-		
-	}
-	public long componentMapSize()
-	{
-		return 0;
-	}
-	
-	public long thresholdMapSize()
-	{
-		return 0;
-	}
+public class BaseMonitor implements Monitor {
+  private Map thresholds = null;
 
+  public BaseMonitor(String jmxServerURI) throws Exception {
+  }
+
+  public void setThresholds(Map aThresholdMap) {
+    thresholds = aThresholdMap;
+  }
+
+  public Map getThresholds() {
+    return thresholds;
+  }
+
+  public void addStatistic(String aName, Statistic aStatistic, Endpoint anEndpoint) {
+  }
+
+  public Statistic getStatistic(String key) {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public void addStatistic(String key, Statistic aStatistic) {
+    // TODO Auto-generated method stub
+
+  }
+
+  public LongNumericStatistic getLongNumericStatistic(String aComponent, String aStatisticName) {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Statistic getStatistic(String aComponentName, String aStatisticName) {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public Statistics getStatistics(String aComponentName) {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  public void incrementCount(String aComponent, String aStatisticName) {
+    // TODO Auto-generated method stub
+
+  }
+
+  public void resetCountingStatistic(String aComponent, String aStatisticName) {
+    // TODO Auto-generated method stub
+
+  }
+
+  public long componentMapSize() {
+    return 0;
+  }
+
+  public long thresholdMapSize() {
+    return 0;
+  }
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/Monitor.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/Monitor.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/Monitor.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/Monitor.java Wed Sep  2 15:25:17 2009
@@ -25,37 +25,55 @@
 import org.apache.uima.aae.monitor.statistics.Statistic;
 import org.apache.uima.aae.monitor.statistics.Statistics;
 
-public interface Monitor
-{
-	public static final String MetadataRequestTimeoutCount = "MetadataRequestTimeoutCount";
-	public static final String ProcessRequestTimeoutCount = "ProcessRequestTimeoutCount";
-	public static final String ErrorCount = "ErrorCount";
-	public static final String ProcessErrorCount = "ProcessErrorCount";
-	public static final String TotalProcessErrorCount = "TotalProcessErrorCount";
-	public static final String ProcessErrorRetryCount = "ProcessErrorRetryCount";
-	public static final String GetMetaErrorCount = "GetMetaErrorCount";
-	public static final String GetMetaErrorRetryCount = "GetMetaErrorRetryCount";
-	public static final String CpCErrorCount = "CpcErrorCount";
-	public static final String ProcessCount = "ProcessCount";
-	public static final String IdleTime = "IdleTime";
-	public static final String TotalDeserializeTime = "TotalDeserializeTime";
-	public static final String TotalSerializeTime = "TotalSerializeTime";
-	public static final String TotalAEProcessTime = "TotalAEProcessTime";
-	
-	public void addStatistic( String key, Statistic aStatistic);
-//	public Statistic getStatistic( String key );
-
-	public Statistic getStatistic( String aComponentName, String aStatisticName );
-	public Statistics getStatistics( String aComponentName );
-
-	public LongNumericStatistic getLongNumericStatistic( String aComponent, String aStatisticName );
-	public void resetCountingStatistic( String aComponent, String aStatisticName );
-	public void incrementCount(String aComponent, String aStatisticName );
-
-	public void setThresholds( Map aThresholdMap);
-	public Map getThresholds();
-	public long componentMapSize();
-	public long thresholdMapSize();
-	
-	
+public interface Monitor {
+  public static final String MetadataRequestTimeoutCount = "MetadataRequestTimeoutCount";
+
+  public static final String ProcessRequestTimeoutCount = "ProcessRequestTimeoutCount";
+
+  public static final String ErrorCount = "ErrorCount";
+
+  public static final String ProcessErrorCount = "ProcessErrorCount";
+
+  public static final String TotalProcessErrorCount = "TotalProcessErrorCount";
+
+  public static final String ProcessErrorRetryCount = "ProcessErrorRetryCount";
+
+  public static final String GetMetaErrorCount = "GetMetaErrorCount";
+
+  public static final String GetMetaErrorRetryCount = "GetMetaErrorRetryCount";
+
+  public static final String CpCErrorCount = "CpcErrorCount";
+
+  public static final String ProcessCount = "ProcessCount";
+
+  public static final String IdleTime = "IdleTime";
+
+  public static final String TotalDeserializeTime = "TotalDeserializeTime";
+
+  public static final String TotalSerializeTime = "TotalSerializeTime";
+
+  public static final String TotalAEProcessTime = "TotalAEProcessTime";
+
+  public void addStatistic(String key, Statistic aStatistic);
+
+  // public Statistic getStatistic( String key );
+
+  public Statistic getStatistic(String aComponentName, String aStatisticName);
+
+  public Statistics getStatistics(String aComponentName);
+
+  public LongNumericStatistic getLongNumericStatistic(String aComponent, String aStatisticName);
+
+  public void resetCountingStatistic(String aComponent, String aStatisticName);
+
+  public void incrementCount(String aComponent, String aStatisticName);
+
+  public void setThresholds(Map aThresholdMap);
+
+  public Map getThresholds();
+
+  public long componentMapSize();
+
+  public long thresholdMapSize();
+
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/MonitorBaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/MonitorBaseImpl.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/MonitorBaseImpl.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/MonitorBaseImpl.java Wed Sep  2 15:25:17 2009
@@ -26,137 +26,103 @@
 import org.apache.uima.aae.monitor.statistics.Statistic;
 import org.apache.uima.aae.monitor.statistics.Statistics;
 
-public class MonitorBaseImpl implements Monitor
-{
-	private Map componentStatistics = new HashMap();
-	private Map thresholds = null;
-	
-	public void setThresholds( Map aThresholdMap)
-	{
-		thresholds = aThresholdMap;
-	}
-	public Map getThresholds()
-	{
-		return thresholds;
-	}
-	
-	public void addStatistic(String aComponentName, Statistic aStatistic)
-	{
-		if ( componentStatistics.containsKey(aComponentName))
-		{
-			Statistics stats = getStatistics(aComponentName);
-			if ( !stats.containsKey(aStatistic.getName()) )
-			{
-				stats.put(aStatistic.getName(), aStatistic);
-			}
-		}
-		else
-		{
-			Statistics stats = new Statistics();
-			stats.put( aStatistic.getName(), aStatistic);
-			componentStatistics.put( aComponentName, stats );
-		}
-	}
-	public LongNumericStatistic getLongNumericStatistic(String aComponent, String aStatisticName)
-	{
-		LongNumericStatistic countStat = 
-			(LongNumericStatistic) this.getStatistic(aComponent, aStatisticName);
-		if ( countStat == null )
-		{
-			countStat = new LongNumericStatistic(aStatisticName);
-			addStatistic(aComponent, countStat);
-			
-		}
-//		return (LongNumericStatistic) this.getStatistic(aComponent, aStatisticName);
-		return countStat;
-	}
-
-	public synchronized void incrementCount(String aComponent, String aStatisticName)
-	{
-		LongNumericStatistic countStat = getLongNumericStatistic(aComponent, aStatisticName);
-		if ( countStat == null )
-		{
-			countStat = new LongNumericStatistic(aStatisticName);
-			addStatistic(aComponent, countStat);
-		}
-		countStat.increment();
-			
-	}
-
-	public Statistics getStatistics( String aComponentName )
-	{
-		return (Statistics)componentStatistics.get( aComponentName );
-	}
-
-	public synchronized void resetCountingStatistic(String aComponent,String aStatisticName)
-	{
-		LongNumericStatistic countStat = getLongNumericStatistic(aComponent, aStatisticName);
-		if ( countStat != null )
-		{
-			synchronized( countStat)
-			{
-//				System.out.println("Resetting Statistic:"+aStatisticName+" For Component:"+aComponent);
-				countStat.reset();
-			}
-		}
-	}
-
-	public Statistic getStatistic(String aComponentName, String aStatisticName)
-	{
-		
-		if ( componentStatistics.containsKey(aComponentName))
-		{
-			Statistics stats = getStatistics(aComponentName);
-			if ( stats.containsKey(aStatisticName ))
-			{
-				return (Statistic)stats.get(aStatisticName );
-			}
-		}
-		else
-		{
-			LongNumericStatistic countStat = new LongNumericStatistic(aStatisticName);
-			addStatistic(aComponentName, countStat);
-			return (Statistic)countStat;
-		}
-
-		return null;
-	}
-	
-	
-	
-/*	
-	public void addStatistic(String key, Statistic aStatistic)
-	{
-		if ( !monitorMap.containsKey(key))
-		{
-			monitorMap.put(key, aStatistic);
-		}
-	}
-
-	public Statistic getStatistic(String key)
-	{
-		if ( monitorMap.containsKey(key))
-		{
-			return (Statistic)monitorMap.get(key);
-		}
-		return null;
-	}
-*/
-	public long componentMapSize()
-	{
-		if ( componentStatistics != null )
-		{
-			return (long)componentStatistics.size();
-		}
-		return 0;
-	}
-	public long thresholdMapSize()
-	{
-		if ( thresholds != null )
-		{
-			return thresholds.size();
-		}
-		return 0;
-		
-	}
+public class MonitorBaseImpl implements Monitor {
+  private Map componentStatistics = new HashMap();
+
+  private Map thresholds = null;
+
+  public void setThresholds(Map aThresholdMap) {
+    thresholds = aThresholdMap;
+  }
+
+  public Map getThresholds() {
+    return thresholds;
+  }
+
+  public void addStatistic(String aComponentName, Statistic aStatistic) {
+    if (componentStatistics.containsKey(aComponentName)) {
+      Statistics stats = getStatistics(aComponentName);
+      if (!stats.containsKey(aStatistic.getName())) {
+        stats.put(aStatistic.getName(), aStatistic);
+      }
+    } else {
+      Statistics stats = new Statistics();
+      stats.put(aStatistic.getName(), aStatistic);
+      componentStatistics.put(aComponentName, stats);
+    }
+  }
+
+  public LongNumericStatistic getLongNumericStatistic(String aComponent, String aStatisticName) {
+    LongNumericStatistic countStat = (LongNumericStatistic) this.getStatistic(aComponent,
+            aStatisticName);
+    if (countStat == null) {
+      countStat = new LongNumericStatistic(aStatisticName);
+      addStatistic(aComponent, countStat);
+
+    }
+    // return (LongNumericStatistic) this.getStatistic(aComponent, aStatisticName);
+    return countStat;
+  }
+
+  public synchronized void incrementCount(String aComponent, String aStatisticName) {
+    LongNumericStatistic countStat = getLongNumericStatistic(aComponent, aStatisticName);
+    if (countStat == null) {
+      countStat = new LongNumericStatistic(aStatisticName);
+      addStatistic(aComponent, countStat);
+    }
+    countStat.increment();
+
+  }
+
+  public Statistics getStatistics(String aComponentName) {
+    return (Statistics) componentStatistics.get(aComponentName);
+  }
+
+  public synchronized void resetCountingStatistic(String aComponent, String aStatisticName) {
+    LongNumericStatistic countStat = getLongNumericStatistic(aComponent, aStatisticName);
+    if (countStat != null) {
+      synchronized (countStat) {
+        // System.out.println("Resetting Statistic:"+aStatisticName+" For Component:"+aComponent);
+        countStat.reset();
+      }
+    }
+  }
+
+  public Statistic getStatistic(String aComponentName, String aStatisticName) {
+
+    if (componentStatistics.containsKey(aComponentName)) {
+      Statistics stats = getStatistics(aComponentName);
+      if (stats.containsKey(aStatisticName)) {
+        return (Statistic) stats.get(aStatisticName);
+      }
+    } else {
+      LongNumericStatistic countStat = new LongNumericStatistic(aStatisticName);
+      addStatistic(aComponentName, countStat);
+      return (Statistic) countStat;
+    }
+
+    return null;
+  }
+
+  /*
+   * public void addStatistic(String key, Statistic aStatistic) { if ( !monitorMap.containsKey(key))
+   * { monitorMap.put(key, aStatistic); } }
+   * 
+   * public Statistic getStatistic(String key) { if ( monitorMap.containsKey(key)) { return
+   * (Statistic)monitorMap.get(key); } return null; }
+   */
+  public long componentMapSize() {
+    if (componentStatistics != null) {
+      return (long) componentStatistics.size();
+    }
+    return 0;
+  }
+
+  public long thresholdMapSize() {
+    if (thresholds != null) {
+      return thresholds.size();
+    }
+    return 0;
+
+  }
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/BaseStatistic.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/BaseStatistic.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/BaseStatistic.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/BaseStatistic.java Wed Sep  2 15:25:17 2009
@@ -19,17 +19,16 @@
 
 package org.apache.uima.aae.monitor.statistics;
 
-public abstract class BaseStatistic //implements Statistic
+public abstract class BaseStatistic // implements Statistic
 {
-	private String name;
+  private String name;
 
-	public BaseStatistic( String aName )
-	{
-		name = aName;
-	}
-	public String getName()
-	{
-		return name;
-	}
+  public BaseStatistic(String aName) {
+    name = aName;
+  }
+
+  public String getName() {
+    return name;
+  }
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/DelegateStats.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/DelegateStats.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/DelegateStats.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/DelegateStats.java Wed Sep  2 15:25:17 2009
@@ -22,9 +22,7 @@
 import java.io.Serializable;
 import java.util.HashMap;
 
-public class DelegateStats extends HashMap implements Serializable
-{
-	static final long serialVersionUID = -1L;
-
+public class DelegateStats extends HashMap implements Serializable {
+  static final long serialVersionUID = -1L;
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatistic.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatistic.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatistic.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatistic.java Wed Sep  2 15:25:17 2009
@@ -19,43 +19,36 @@
 
 package org.apache.uima.aae.monitor.statistics;
 
-public class LongNumericStatistic extends NumericStatisticBaseImpl
-implements LongNumericStatisticMBean
-//implements NumericStatisticBean
+public class LongNumericStatistic extends NumericStatisticBaseImpl implements
+        LongNumericStatisticMBean
+// implements NumericStatisticBean
 {
-	private long value=0;
-	
-	public LongNumericStatistic( String aName)
-	{
-		super( aName);
-	}
-
-	public void decrement()
-	{
-		if ( value > 0 )
-		{
-			value--;
-		}
-	}
-
-	public void increment()
-	{
-		value++;
-	}
-
-	public void increment(long anIncrementBy)
-	{
-		value += anIncrementBy;
-	}
-
-	public void reset()
-	{
-		value = 0;
-	}
-
-	public long getValue()
-	{
-		return value;
-	}
+  private long value = 0;
+
+  public LongNumericStatistic(String aName) {
+    super(aName);
+  }
+
+  public void decrement() {
+    if (value > 0) {
+      value--;
+    }
+  }
+
+  public void increment() {
+    value++;
+  }
+
+  public void increment(long anIncrementBy) {
+    value += anIncrementBy;
+  }
+
+  public void reset() {
+    value = 0;
+  }
+
+  public long getValue() {
+    return value;
+  }
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatisticMBean.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatisticMBean.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatisticMBean.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/LongNumericStatisticMBean.java Wed Sep  2 15:25:17 2009
@@ -21,12 +21,11 @@
 
 import java.io.Serializable;
 
-public interface LongNumericStatisticMBean extends Serializable
-{
-	public long getValue();
-	
-	public String getName();
-	
-	public void reset();
+public interface LongNumericStatisticMBean extends Serializable {
+  public long getValue();
+
+  public String getName();
+
+  public void reset();
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatistic.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatistic.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatistic.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatistic.java Wed Sep  2 15:25:17 2009
@@ -19,9 +19,9 @@
 
 package org.apache.uima.aae.monitor.statistics;
 
-public interface NumericStatistic extends Statistic
-{
-	public void increment();
-	public void decrement();
+public interface NumericStatistic extends Statistic {
+  public void increment();
+
+  public void decrement();
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBaseImpl.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBaseImpl.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBaseImpl.java Wed Sep  2 15:25:17 2009
@@ -19,18 +19,15 @@
 
 package org.apache.uima.aae.monitor.statistics;
 
-public abstract class NumericStatisticBaseImpl 
-extends BaseStatistic implements NumericStatistic
-{
-	public NumericStatisticBaseImpl(String aName )
-	{
-		super(aName);
-	}
-	
-	public abstract void increment();
-	
-	public abstract void reset();
-	
-	public abstract void decrement();
+public abstract class NumericStatisticBaseImpl extends BaseStatistic implements NumericStatistic {
+  public NumericStatisticBaseImpl(String aName) {
+    super(aName);
+  }
+
+  public abstract void increment();
+
+  public abstract void reset();
+
+  public abstract void decrement();
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBean.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBean.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBean.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/NumericStatisticBean.java Wed Sep  2 15:25:17 2009
@@ -19,10 +19,10 @@
 
 package org.apache.uima.aae.monitor.statistics;
 
-
 public interface NumericStatisticBean// extends UIMAStatistic
 {
-	public void increment();
-	public void decrement();
+  public void increment();
+
+  public void decrement();
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistic.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistic.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistic.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistic.java Wed Sep  2 15:25:17 2009
@@ -19,9 +19,9 @@
 
 package org.apache.uima.aae.monitor.statistics;
 
-public interface Statistic
-{
-	public void reset();
-	public String getName();
+public interface Statistic {
+  public void reset();
+
+  public String getName();
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistics.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistics.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistics.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/Statistics.java Wed Sep  2 15:25:17 2009
@@ -21,8 +21,6 @@
 
 import java.util.HashMap;
 
-public class Statistics extends HashMap
-{
-
+public class Statistics extends HashMap {
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/TimerStats.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/TimerStats.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/TimerStats.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/TimerStats.java Wed Sep  2 15:25:17 2009
@@ -21,9 +21,7 @@
 
 import java.util.HashMap;
 
-public class TimerStats extends HashMap<String,Long>
-{
-	static final long serialVersionUID = -1L;
-
+public class TimerStats extends HashMap<String, Long> {
+  static final long serialVersionUID = -1L;
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/UIMAStatistic.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/UIMAStatistic.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/UIMAStatistic.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/monitor/statistics/UIMAStatistic.java Wed Sep  2 15:25:17 2009
@@ -19,9 +19,9 @@
 
 package org.apache.uima.aae.monitor.statistics;
 
-public interface UIMAStatistic
-{
-	public void reset();
-	public String getName();
+public interface UIMAStatistic {
+  public void reset();
+
+  public String getName();
 
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/SpiListener.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/SpiListener.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/SpiListener.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/SpiListener.java Wed Sep  2 15:25:17 2009
@@ -27,8 +27,8 @@
   /**
    * This method is called by the SPI implementation.
    * 
-   * @param event -
-   *          SPI event
+   * @param event
+   *          - SPI event
    */
   public void onSpiEvent(SpiEvent event);
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaMessageDispatcher.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaMessageDispatcher.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaMessageDispatcher.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaMessageDispatcher.java Wed Sep  2 15:25:17 2009
@@ -21,6 +21,6 @@
 public interface UimaMessageDispatcher {
 
   public void dispatch(UimaMessage aMessage);
-  
+
   public void stop();
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaTransport.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaTransport.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaTransport.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/UimaTransport.java Wed Sep  2 15:25:17 2009
@@ -30,24 +30,24 @@
    * registered listeners when the initialization is completed, when the start is completed, and
    * when the stop is completed.
    * 
-   * @param aListener -
-   *          SPI listener to receive events
+   * @param aListener
+   *          - SPI listener to receive events
    */
   public void addSpiListener(SpiListener aListener);
 
   /**
    * This method is called to start SPI.
    * 
-   * @throws UimaSpiException -
-   *           any problems while starting the SPI
+   * @throws UimaSpiException
+   *           - any problems while starting the SPI
    */
   public void startIt() throws UimaSpiException;
 
   /**
    * This method is called to stop SPI.
    * 
-   * @throws UimaSpiException -
-   *           any problems while stopping the SPI
+   * @throws UimaSpiException
+   *           - any problems while stopping the SPI
    */
   public void stopIt() throws UimaSpiException;
 
@@ -56,8 +56,8 @@
    * 
    * @return - instance of SPI Dispatcher
    * 
-   * @throws UimaSpiException -
-   *           any problems while fetching Dispatcher
+   * @throws UimaSpiException
+   *           - any problems while fetching Dispatcher
    */
   public UimaMessageDispatcher getUimaMessageDispatcher() throws UimaSpiException;
 
@@ -66,13 +66,14 @@
   public UimaMessageDispatcher getUimaMessageDispatcher(String aDelegateKey)
           throws UimaSpiException;
 
-  public UimaMessageListener produceUimaMessageListener()
-          throws UimaSpiException;
+  public UimaMessageListener produceUimaMessageListener() throws UimaSpiException;
 
-  public UimaMessageDispatcher produceUimaMessageDispatcher(UimaTransport aTransport) throws UimaSpiException;
+  public UimaMessageDispatcher produceUimaMessageDispatcher(UimaTransport aTransport)
+          throws UimaSpiException;
 
   public UimaVmMessage produceMessage();
 
   public UimaVmMessage produceMessage(int aCommand, int aMessageType, String aMessageFrom);
+
   public void registerWithJMX(AnalysisEngineController aController, String queueKind);
 }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmMessage.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmMessage.java?rev=810562&r1=810561&r2=810562&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmMessage.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/spi/transport/vm/UimaVmMessage.java Wed Sep  2 15:25:17 2009
@@ -29,10 +29,10 @@
 import org.apache.uima.aae.spi.transport.UimaMessage;
 
 /**
- * Wrapper for the Uima message. This wrapper is used for internal messaging between collocated
- * Uima AS service. 
+ * Wrapper for the Uima message. This wrapper is used for internal messaging between collocated Uima
+ * AS service.
+ * 
  * 
- *
  */
 public class UimaVmMessage extends ConcurrentHashMap<String, Object> implements UimaMessage {
 
@@ -58,16 +58,16 @@
 
   public int getIntProperty(String propertyKey) {
     Object value = super.get(propertyKey);
-    if ( value != null ) {
-      return Integer.valueOf((Integer)value );
+    if (value != null) {
+      return Integer.valueOf((Integer) value);
     }
     return 0;
   }
 
   public String getStringProperty(String propertyKey) {
     Object value = super.get(propertyKey);
-    if (value != null ) {
-      return (String)value;
+    if (value != null) {
+      return (String) value;
     }
     return "";
   }
@@ -86,7 +86,7 @@
 
   public long getLongProperty(String propertyKey) {
     Object value = super.get(propertyKey);
-    if ( value != null ) {
+    if (value != null) {
       return Long.valueOf((Long) value);
     }
     return 0;
@@ -98,8 +98,8 @@
 
   public boolean getBooleanProperty(String aPropertyKey) {
     Object value = super.get(aPropertyKey);
-    if ( value != null ) {
-      return ((Boolean)value ).booleanValue();
+    if (value != null) {
+      return ((Boolean) value).booleanValue();
     }
     return false;
   }