perfsonar-dev - r1587 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch
Subject: perfsonar development work
List archive
r1587 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch
Chronological Thread
- From:
- To:
- Subject: r1587 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch
- Date: Thu, 31 Aug 2006 10:08:44 -0400
Author: roman
Date: 2006-08-31 10:08:42 -0400 (Thu, 31 Aug 2006)
New Revision: 1587
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
Log:
Response Generator interface has changed into abstract class. Creating the
logger object moved to it.
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
2006-08-31 11:55:42 UTC (rev 1586)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
2006-08-31 14:08:42 UTC (rev 1587)
@@ -17,10 +17,6 @@
import org.ggf.ns.nmwg.event.status.base.v2_0.StateOper;
import org.ggf.ns.nmwg.event.status.base.v2_0.StateAdmin;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
-import org.perfsonar.commons.auxiliary.ComponentNames;
-import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
import org.perfsonar.service.commons.exceptions.SystemException;
/**
@@ -28,40 +24,18 @@
*
* @author romradz
*/
-public class L2PathStatusResponseGenerator implements ResponseGenerator {
+public class L2PathStatusResponseGenerator extends ResponseGenerator {
- // -------------------------------------- class fields
-
-
-
- protected LoggerComponent logger = null;
-
-
-
// -------------------------------------- constructors
public L2PathStatusResponseGenerator() throws SystemException {
- try {
+ super();
- this.logger = (LoggerComponent)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(ComponentNames.LOGGER);
-
- } catch (SystemException e) {
-
- throw new SystemException(
- "error.common.no_logger",
- "L2PathStatusResponseGenerator.constructor: "
- + "Cannot get logger component");
-
- }
-
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
2006-08-31 11:55:42 UTC (rev 1586)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
2006-08-31 14:08:42 UTC (rev 1587)
@@ -9,18 +9,61 @@
import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
+import org.perfsonar.commons.auxiliary.ComponentNames;
+import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.SystemException;
+
/**
* Creates the response of service.
*
* @author romradz
*/
-public interface ResponseGenerator {
+public abstract class ResponseGenerator {
- public Data getResponse(List resultList) throws Exception;
+ // -------------------------------------- class fields
+ protected LoggerComponent logger = null;
+
+
+
+ // -------------------------------------- constructors
+
+
+
+ public ResponseGenerator() throws SystemException {
+
+ try {
+
+ logger = (LoggerComponent)
+ AuxiliaryComponentManager.
+ getInstance().
+ getComponent(ComponentNames.LOGGER);
+
+ } catch (SystemException e) {
+
+ throw new SystemException(
+ "error.common.no_logger",
+ "ResponseGenerator.constructor: "
+ + "Cannot get logger component");
+
+ }
+
+ }
+
+
+
+ // -------------------------------------- public abstract methods
+
+
+
+ public abstract Data getResponse(List resultList) throws Exception;
+
+
+
} //ResponseGenerator
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
2006-08-31 11:55:42 UTC (rev 1586)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
2006-08-31 14:08:42 UTC (rev 1587)
@@ -13,10 +13,6 @@
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Datum;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
-import org.perfsonar.commons.auxiliary.ComponentNames;
-import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
import org.perfsonar.service.commons.exceptions.SystemException;
/**
@@ -24,40 +20,18 @@
*
* @author romradz
*/
-public class UtilizationResponseGenerator implements ResponseGenerator {
+public class UtilizationResponseGenerator extends ResponseGenerator {
- // -------------------------------------- class fields
-
-
-
- protected LoggerComponent logger = null;
-
-
-
// -------------------------------------- constructors
public UtilizationResponseGenerator() throws SystemException {
- try {
+ super();
- this.logger = (LoggerComponent)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(ComponentNames.LOGGER);
-
- } catch (SystemException e) {
-
- throw new SystemException(
- "error.common.no_logger",
- "UtilizationResponseGenerator.constructor: "
- + "Cannot get logger component");
-
- }
-
}
- r1587 - trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch, svnlog, 08/31/2006
Archive powered by MHonArc 2.6.16.