perfsonar-dev - perfsonar: r2378 - in trunk/perfsonar/src/org/perfsonar: client/commons/requests client/commons/requests/lookupService commons/auxiliary commons/auxiliary/components/configuration commons/auxiliary/components/configuration/properties commons/auxiliary/components/mapping commons/auxiliary/components/scheduler commons/auxiliary/components/scheduler/actions commons/auxiliary/components/simplescheduler commons/container/listeners commons/messages commons/util service/commons/authn service/commons/authn/tokens service/commons/engine service/commons/exceptions service/commons/measurementExecutor service/commons/registration service/commons/storage service/commons/storage/xmldb service/commons/storage/xmldb/exist service/commons/storage/xmldb/exist/rest service/commons/storage/xmldb/exist/xmlrpc service/commons/storage/xmlfile service/lookupService/xmlType service/measurementArchive/eventTypeConfig service/measurementArchive/metadataConfig service/measurementArchive/metadat aConfig/queryGenerator service/measurementArchive/register service/measurementArchive/rrdType service/measurementArchive/sqlType service/measurementArchive/sqlType/fetch service/measurementArchive/sqlType/store service/measurementPoint/commandLine service/measurementPoint/commandLine/tools service/measurementPoint/flowType service/measurementPoint/nmsType service/measurementPoint/register service/measurementPoint/snmpType service/measurementPoint/tracefileCaptureType service/measurementPoint/tracefileCaptureType/servlets service/testHarness/nmsType service/testHarness/snmpType service/topologyService service/web
Subject: perfsonar development work
List archive
perfsonar: r2378 - in trunk/perfsonar/src/org/perfsonar: client/commons/requests client/commons/requests/lookupService commons/auxiliary commons/auxiliary/components/configuration commons/auxiliary/components/configuration/properties commons/auxiliary/components/mapping commons/auxiliary/components/scheduler commons/auxiliary/components/scheduler/actions commons/auxiliary/components/simplescheduler commons/container/listeners commons/messages commons/util service/commons/authn service/commons/authn/tokens service/commons/engine service/commons/exceptions service/commons/measurementExecutor service/commons/registration service/commons/storage service/commons/storage/xmldb service/commons/storage/xmldb/exist service/commons/storage/xmldb/exist/rest service/commons/storage/xmldb/exist/xmlrpc service/commons/storage/xmlfile service/lookupService/xmlType service/measurementArchive/eventTypeConfig service/measurementArchive/metadataConfig service/measurementArchive/metadat aConfig/queryGenerator service/measurementArchive/register service/measurementArchive/rrdType service/measurementArchive/sqlType service/measurementArchive/sqlType/fetch service/measurementArchive/sqlType/store service/measurementPoint/commandLine service/measurementPoint/commandLine/tools service/measurementPoint/flowType service/measurementPoint/nmsType service/measurementPoint/register service/measurementPoint/snmpType service/measurementPoint/tracefileCaptureType service/measurementPoint/tracefileCaptureType/servlets service/testHarness/nmsType service/testHarness/snmpType service/topologyService service/web
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2378 - in trunk/perfsonar/src/org/perfsonar: client/commons/requests client/commons/requests/lookupService commons/auxiliary commons/auxiliary/components/configuration commons/auxiliary/components/configuration/properties commons/auxiliary/components/mapping commons/auxiliary/components/scheduler commons/auxiliary/components/scheduler/actions commons/auxiliary/components/simplescheduler commons/container/listeners commons/messages commons/util service/commons/authn service/commons/authn/tokens service/commons/engine service/commons/exceptions service/commons/measurementExecutor service/commons/registration service/commons/storage service/commons/storage/xmldb service/commons/storage/xmldb/exist service/commons/storage/xmldb/exist/rest service/commons/storage/xmldb/exist/xmlrpc service/commons/storage/xmlfile service/lookupService/xmlType service/measurementArchive/eventTypeConfig service/measurementArchive/metadataConfig service/measurementArchive/metadat aConfig/queryGenerator service/measurementArchive/register service/measurementArchive/rrdType service/measurementArchive/sqlType service/measurementArchive/sqlType/fetch service/measurementArchive/sqlType/store service/measurementPoint/commandLine service/measurementPoint/commandLine/tools service/measurementPoint/flowType service/measurementPoint/nmsType service/measurementPoint/register service/measurementPoint/snmpType service/measurementPoint/tracefileCaptureType service/measurementPoint/tracefileCaptureType/servlets service/testHarness/nmsType service/testHarness/snmpType service/topologyService service/web
- Date: Mon, 14 May 2007 10:05:49 -0400
Author: mac
Date: 2007-05-14 10:05:48 -0400 (Mon, 14 May 2007)
New Revision: 2378
Modified:
trunk/perfsonar/src/org/perfsonar/client/commons/requests/RequestGenerator.java
trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryComponent.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryComponentManager.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryThreadedComponent.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/ComponentsConfigurationReader.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/configuration/ConfigurationComponent.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/configuration/properties/PropertiesConfigurationComponent.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/mapping/ExpressionMapping.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageHandler.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageParser.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/Scheduler.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/actions/SchedulerAction.java
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/simplescheduler/Scheduler.java
trunk/perfsonar/src/org/perfsonar/commons/container/listeners/StartupInitializer.java
trunk/perfsonar/src/org/perfsonar/commons/messages/BaseChaining.java
trunk/perfsonar/src/org/perfsonar/commons/messages/DataRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/LSCleanupRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/LSDeregisterRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/LSKeepaliveRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/LSQueryRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/LSRegisterRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/LSRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/LookupInfoRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/MeasurementArchiveStoreRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/MeasurementRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/MessageHandler.java
trunk/perfsonar/src/org/perfsonar/commons/messages/MessageHandlerFactory.java
trunk/perfsonar/src/org/perfsonar/commons/messages/MetadataKeyRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/Request.java
trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataDBRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/SubscriptionKeepaliveRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/SubscriptionRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/TOPSRequest.java
trunk/perfsonar/src/org/perfsonar/commons/messages/UnSubscriptionRequest.java
trunk/perfsonar/src/org/perfsonar/commons/util/MathUtil.java
trunk/perfsonar/src/org/perfsonar/commons/util/TimeDateUtil.java
trunk/perfsonar/src/org/perfsonar/commons/util/XMLUtils.java
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenManager.java
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenManagerFactory.java
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenSOAPManager.java
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecurityToken.java
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ServiceEngineFactory.java
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/AuthenticationException.java
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/DataFormatException.java
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/RequestException.java
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/ResourceException.java
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/SystemException.java
trunk/perfsonar/src/org/perfsonar/service/commons/measurementExecutor/MeasurementExecutor.java
trunk/perfsonar/src/org/perfsonar/service/commons/registration/GenericServiceLSRegistrator.java
trunk/perfsonar/src/org/perfsonar/service/commons/registration/LSRegistrationComponent.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/DataRepository.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/GenericXmlStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/NMWGStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/StorageManager.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/XmlDbDataRepository.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbFactory.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbGenericStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlDataRepository.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileDataRepository.java
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSAction.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSCleanup.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSCleanupLoader.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSDeregisterAction.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSKeepaliveAction.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSLookupAction.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSRegisterAction.java
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/BaseChainingMergerFactory.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/NMWGInterfaceBaseChaining.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/OwampResponseGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGeneratorFactory.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/OwampStoreRequestProcess.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcess.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcessFactory.java
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/UtilizationStoreRequestProcess.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineAction.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineExec.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineMPServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineResourceProtector.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundle.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Bwctl.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Owamp.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Ping.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Traceroute.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/ConfigFileWriter.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/FlowTypeMPServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/ZebedeeControl.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSTypeMPServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSTypeMeasurementExecutor.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSXPathExpressionGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/TCPConnector.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/register/LSRegistrationComponent.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPTypeMPServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPTypeMeasurementExecutor.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPXPathExpressionGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPXQueryExpressionGenerator.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeMeasurementExecutor.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/servlets/FileServerServlet.java
trunk/perfsonar/src/org/perfsonar/service/testHarness/nmsType/NMSTypeMPServiceEngineTester.java
trunk/perfsonar/src/org/perfsonar/service/testHarness/snmpType/SNMPTypeMPServiceEngineTester.java
trunk/perfsonar/src/org/perfsonar/service/testHarness/snmpType/SNMPXQueryGenTester.java
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopServiceEngine.java
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsAction.java
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsDownloadAction.java
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsJDBCComponent.java
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsLSRegistrationComponent.java
trunk/perfsonar/src/org/perfsonar/service/web/RequestHandler.java
Log:
Deprecating old exceptions hierarchy. Now only PerfSONARException will be
used.
I deprecated old classes and tried to replace all old exceptions with the
hierarchy-top-exception PerfSONARException, but of course I might miss some.
I didn't have possiblility to test all services and classes, I've just check
them in Eclipse. Anyway, all developers should test their services.
In some classes I removed unused imports (Ctrl-Shift-O in Eclipse), but not
in all of them.
Loukik, in NMT and SMTP measurements points you're using
ExistDbXmlStorageManager which hasn't been existing for about one year, so
both of services won't compile, but it's not my fault :)
Modified:
trunk/perfsonar/src/org/perfsonar/client/commons/requests/RequestGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/client/commons/requests/RequestGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/client/commons/requests/RequestGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,7 +5,7 @@
package org.perfsonar.client.commons.requests;
import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* @author Maciej Glowiak
@@ -25,7 +25,7 @@
*
* @throws SystemException
*/
- public Message generateRequestMessage() throws SystemException;
+ public Message generateRequestMessage() throws PerfSONARException;
} //RequestGenerator
\ No newline at end of file
Modified:
trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/client/commons/requests/lookupService/LSRegisterRequestGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -24,7 +24,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.util.XMLUtils;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* This class is responsible for creating LSRegisterRequest
@@ -49,7 +49,7 @@
// --------------------------------------------------------- Public
Methods
- public Message generateRequestMessage() throws SystemException {
+ public Message generateRequestMessage() throws PerfSONARException {
System.out.println("LSRegisterRequestGenerator: generateRequest");
@@ -79,10 +79,10 @@
//access point -- mandatory
String
accessPointString=(String)commonParameters.get("access_point");
- if (accessPointString==null) throw new SystemException(
+ if (accessPointString==null) throw new PerfSONARException(
"error.lsregistrator.no_accesspoint",
"AccessPoint parameter was not found. Registration failed");
- if ("".equals(accessPointString)) throw new SystemException(
+ if ("".equals(accessPointString)) throw new PerfSONARException(
"error.lsregistrator.no_accesspoint",
"AccessPoint parameter was empty. Registration failed");
AccessPoint ap = new AccessPoint();
@@ -91,10 +91,10 @@
//service name -- mandatory
String
serviceNameString=(String)commonParameters.get("service_name");
- if (serviceNameString==null) throw new SystemException(
+ if (serviceNameString==null) throw new PerfSONARException(
"error.lsregistrator.no_servicename",
"ServiceName parameter was not found. Registration failed");
- if ("".equals(serviceNameString)) throw new SystemException(
+ if ("".equals(serviceNameString)) throw new PerfSONARException(
"error.lsregistrator.no_servicename",
"ServiceName parameter was empty. Registration failed");
ServiceName sn = new ServiceName();
@@ -103,10 +103,10 @@
//service type -- mandatory
String
serviceTypeString=(String)commonParameters.get("service_type");
- if (serviceTypeString==null) throw new SystemException(
+ if (serviceTypeString==null) throw new PerfSONARException(
"error.lsregistrator.no_servicetype",
"ServiceType parameter was not found. Registration failed");
- if ("".equals(serviceTypeString)) throw new SystemException(
+ if ("".equals(serviceTypeString)) throw new PerfSONARException(
"error.lsregistrator.no_servicename",
"ServiceType parameter was empty. Registration failed");
ServiceType st = new ServiceType();
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,6 +1,6 @@
package org.perfsonar.commons.auxiliary;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* AuxiliaryComponent is an interface for all components loaded and
@@ -16,7 +16,7 @@
* Method used for initialize AuxiliaryComponent
* @throws SystemException
*/
- public void initComponent() throws SystemException;
+ public void initComponent() throws PerfSONARException;
/**
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryComponentManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryComponentManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryComponentManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,7 +8,7 @@
import java.net.URL;
import java.util.Iterator;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* AuxiliaryComponentManager is a container for components - modules of
@@ -63,7 +63,7 @@
* Set up the manager. Load mappings from components.properties file
* and creates all component objects
*/
- public void initManager() throws SystemException {
+ public void initManager() throws PerfSONARException {
//read components from Configuration file and init them
@@ -72,7 +72,7 @@
if(urlString==null || urlString.toString()==null) {
- throw new
SystemException("AuxiliaryComponentManager.initManager: " +
+ throw new
PerfSONARException("AuxiliaryComponentManager.initManager: " +
"Missing or unable to locate components.properties file.
Cannot continue");
}
String configFileName = urlString.getFile();
@@ -109,7 +109,7 @@
component.initComponent();
- } catch (SystemException ex) {
+ } catch (PerfSONARException ex) {
System.err.println(ex.getMessage());
//do nothing - not critical exception, just load other
//modules
@@ -119,13 +119,13 @@
}
} catch (FileNotFoundException e) {
- throw new
SystemException("error.common.manager.no_configuration",
+ throw new
PerfSONARException("error.common.manager.no_configuration",
"AuxiliaryComponentManager: Cannot load " +
"component.properties file. " +
"Encountered FileNotFound Exception. Message: "
+e.getMessage());
} catch (IOException e) {
- throw new
SystemException("error.common.manager.no_configuration",
+ throw new
PerfSONARException("error.common.manager.no_configuration",
"AuxiliaryComponentManager: Cannot load " +
"component.properties file. " +
"Encountered IO Exception. Message: "
@@ -141,10 +141,10 @@
*
* @param componentName
* @param componentClassName
- * @throws SystemException
+ * @throws PerfSONARException
*/
public AuxiliaryComponent loadComponent(String componentName, String
componentClassName)
- throws SystemException {
+ throws PerfSONARException {
AuxiliaryComponent component = null;
@@ -164,17 +164,17 @@
String m = "AUXComponentManager: " +
"can't create component ["+componentName+"]. " +
"Encountered ClassNotFound Exception. Message: "+ex.getMessage();
- throw new
SystemException("error.common.manager.cant_create_component", m);
+ throw new
PerfSONARException("error.common.manager.cant_create_component", m);
} catch (InstantiationException ex) {
String m = "AUXComponentManager: " +
"can't create component ["+componentName+"]. " +
"Encountered Instantiation Exception. Message: "+ex.getMessage();
- throw new
SystemException("error.common.manager.cant_create_component", m);
+ throw new
PerfSONARException("error.common.manager.cant_create_component", m);
} catch (IllegalAccessException ex) {
String m = "AUXComponentManager: " +
"can't create component ["+componentName+"]. " +
"Encountered IllegalAccess Exception. Message: "+ex.getMessage();
- throw new
SystemException("error.common.manager.cant_create_component", m);
+ throw new
PerfSONARException("error.common.manager.cant_create_component", m);
}
return component;
@@ -225,7 +225,7 @@
* It's singleton pattern
*/
public static AuxiliaryComponentManager getInstance()
- throws SystemException {
+ throws PerfSONARException {
if (componentManager == null) {
componentManager= new AuxiliaryComponentManager();
@@ -239,7 +239,7 @@
/**
* For standalone applications
*/
- public static void main(String[] args) throws SystemException {
+ public static void main(String[] args) throws PerfSONARException {
//components.properties =
projects/sonar/perfsonar/conf/components.properties
AuxiliaryComponentManager.getInstance();
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryThreadedComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryThreadedComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/AuxiliaryThreadedComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,6 +1,5 @@
package org.perfsonar.commons.auxiliary;
-import org.perfsonar.service.commons.exceptions.SystemException;
/**
* AuxiliaryThreadedComponent is extension of AuxiliaryComponent supporting
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/ComponentsConfigurationReader.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/ComponentsConfigurationReader.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/ComponentsConfigurationReader.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -69,11 +69,5 @@
}
} //Entry
-
-// for (Entry e : new
ComponentsConfigurationReader().readFile("/projects/sonar/perfsonar/conf/components.properties.ma"))
{
-// System.out.println(e.getName()+" : "+e.getValue());
-// }
-
-
} //ComponentsConfig
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/configuration/ConfigurationComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/configuration/ConfigurationComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/configuration/ConfigurationComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -2,7 +2,7 @@
import java.util.Properties;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -20,11 +20,11 @@
*
* @param name of the parameter
* @return String containing value/s for the parameter
- * @throws SystemException when property couldn't be read
+ * @throws PerfSONARException when property couldn't be read
*/
- public String getProperty(String name) throws SystemException;
+ public String getProperty(String name) throws PerfSONARException;
- public Properties getProperties() throws SystemException;
+ public Properties getProperties() throws PerfSONARException;
} //ConfigurationComponent
\ No newline at end of file
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/configuration/properties/PropertiesConfigurationComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/configuration/properties/PropertiesConfigurationComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/configuration/properties/PropertiesConfigurationComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -7,7 +7,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Class which reads configurations from a properties file
@@ -43,7 +43,7 @@
// ---------------------------------- constructor
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
// bootstrapped absolute file location in catalina.properties file
URL fileNameURL =
this.getClass().getClassLoader().getResource("perfsonar/conf/service.properties");
@@ -53,7 +53,7 @@
System.out.println("PropertiesConfigurationComponent.initComponent:" +
" Missing or unable to locate service.properties file. Cannot
complete request.");
- throw new
SystemException("PropertiesConfigurationComponent.initComponent:" +
+ throw new
PerfSONARException("PropertiesConfigurationComponent.initComponent:" +
" Missing or unable to locate service.properties file. Cannot
complete request.");
}
@@ -68,7 +68,7 @@
file = new File(fileName);
} catch(NullPointerException npe) {
- throw new SystemException("PropertiesConfigurationComponent: "
+ throw new PerfSONARException("PropertiesConfigurationComponent: "
+ "Unable to create a file object"
+ "referring to service.properties" ,
npe);
@@ -90,9 +90,9 @@
* @return Properties - static object containing all the properties
* in the property file
*
- * @throws SystemException when properties couldn't be read
+ * @throws PerfSONARException when properties couldn't be read
*/
- public Properties getProperties() throws SystemException {
+ public Properties getProperties() throws PerfSONARException {
return properties;
@@ -105,14 +105,14 @@
*
* @param name of the parameter
* @return String containing value/s for the parameter
- * @throws SystemException when property couldn't be read
+ * @throws PerfSONARException when property couldn't be read
*/
- public String getProperty(String name) throws SystemException {
+ public String getProperty(String name) throws PerfSONARException {
String property = properties.getProperty(name);
if (property == null) {
- throw new SystemException(
+ throw new PerfSONARException(
"PropertiesConfigurationComponent.getProperty: "
+ "Requested Param: "+ name + "not found");
}
@@ -145,7 +145,7 @@
* from a property file
*
*/
- void loadConfiguration() throws SystemException {
+ void loadConfiguration() throws PerfSONARException {
try {
@@ -161,7 +161,7 @@
in.close();
} catch (Exception e) {
- throw new SystemException(e.getMessage());
+ throw new PerfSONARException(e.getMessage());
}
}
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/mapping/ExpressionMapping.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/mapping/ExpressionMapping.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/mapping/ExpressionMapping.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -11,7 +11,7 @@
import org.perfsonar.commons.auxiliary.ComponentsConfigurationReader;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* @author Maciej Glowiak
@@ -44,7 +44,7 @@
* Reads configuration mapping from file given as
* component.ComponentName.mapping_file property
*/
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
LoggerComponent logger = ((LoggerComponent)
AuxiliaryComponentManager.getInstance().
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageHandler.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageHandler.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageHandler.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
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;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Handler;
@@ -33,7 +33,7 @@
// ------------------------------------ constructor
- public ScheduleMessageHandler() throws SystemException {
+ public ScheduleMessageHandler() throws PerfSONARException {
super();
this.logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageParser.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageParser.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/ScheduleMessageParser.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -19,8 +19,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -54,9 +53,9 @@
/**
* Constructor which initializes loggers, configuration components and
handlers
*
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public ScheduleMessageParser() throws SystemException {
+ public ScheduleMessageParser() throws PerfSONARException {
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
@@ -73,15 +72,15 @@
* Parses xml in a document in order to convert it into a message object
*
* @param object of type org.w3c.dom.Document containing the given xml
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
*
*/
- public void parse(Document document) throws SystemException,
RequestException {
+ public void parse(Document document) throws PerfSONARException {
if(document==null) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.parse_error",
"ScheduleMessageHandler.parse: Document object in request
is null. Nothing to parse");
@@ -98,7 +97,7 @@
logger.fatal("ScheduleMessageHandler - IO exception encountered
while "
+ "serializing request document");
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"ScheduleMessageHandler- IO exception encountered while "
+ "serializing request document@: "+ e.getMessage());
}
@@ -114,14 +113,14 @@
* Parses xml present in a string object in order to convert it into a
message object
*
* @param requestString object of type string containing given xml
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
*/
- public void parse(String requestString) throws SystemException,
RequestException {
+ public void parse(String requestString) throws PerfSONARException {
if(requestString==null) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.parse_error",
"ScheduleMessageHandler.parse: String object in request
is null. Nothing to parse");
@@ -139,10 +138,10 @@
* Parses xml presented as an input source
*
* @param inputSource object of type InputSource containing xml
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
*/
- public void parse(InputSource inputSource) throws SystemException,
RequestException {
+ public void parse(InputSource inputSource) throws PerfSONARException {
@@ -182,7 +181,7 @@
logger.fatal("ScheduleMessageHandler.parse: SAX Exception
occurred while "
+ "satisfying request. Error Message: "
+ e.getMessage());
- throw new RequestException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"Request could not be parsed because "
+ "of SAX exception. Error message: "
+ e.getMessage());
@@ -192,21 +191,21 @@
logger.fatal("ScheduleMessageHandler.parse: - IO exception
encountered while "
+ "reading schema file");
- throw new SystemException("error.common.parse_error",
"MonitoringService - IO exception "
+ throw new PerfSONARException("error.common.parse_error",
"MonitoringService - IO exception "
+ "encountered while reading schema file "
+ e.getMessage());
} catch (SAXException e) {
logger.fatal("ScheduleMessageHandler.parse -SAX Exception");
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"MonitoringService - SAX Exception "
+ e.getMessage());
} catch (ParserConfigurationException e) {
logger.fatal("ScheduleMessageHandler.parse -Parser Configuration
Exception");
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"MonitoringService - Parser Configuration "
+ "Exception " + e.getMessage());
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/Scheduler.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/Scheduler.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/Scheduler.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -19,10 +19,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import
org.perfsonar.commons.auxiliary.components.scheduler.actions.GenericSchedulerAction;
import
org.perfsonar.commons.auxiliary.components.scheduler.actions.SchedulerAction;
-
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import
org.perfsonar.service.commons.storage.xmldb.exist.xmlrpc.ExistDbXmlrpcXmlDataRepository;
import
org.perfsonar.service.commons.storage.xmldb.exist.xmlrpc.ExistDbXmlrpcXmlStorageManager;
@@ -48,7 +45,7 @@
// ----------------------------Constructor
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
try {
@@ -57,13 +54,13 @@
configurationComponent =
(ConfigurationComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
System.out.println("Scheduler: ERROR! Scheduler could not be
initialized because " +
"either ServiceConfigurationManager or Log could not be
initialized. " +
"Scheduler cannot continue without these components");
- throw new SystemException("error.common.scheduler.init",
+ throw new PerfSONARException("error.common.scheduler.init",
"Scheduler: ERROR! Scheduler could not be initialized
because " +
"either ServiceConfigurationManager or Log could not be
initialized. " +
"Scheduler cannot continue without these components.
Error message: "+e.getMessage());
@@ -122,7 +119,7 @@
// ---------------------------- Public Methods
- public void readSchedules(String scheduleSeconds) throws
RequestException, DataFormatException, SystemException {
+ public void readSchedules(String scheduleSeconds) throws
PerfSONARException {
logger.debug("Scheduler.readSchedules: Scheduler has been woken up
to read schedules");
@@ -137,7 +134,7 @@
password =
this.configurationComponent.getProperty("Scheduler.Database.XML.login.password");
community =
this.configurationComponent.getProperty("Scheduler.Database.XML.community");
- }catch(SystemException e) {
+ }catch(PerfSONARException e) {
logger.fatal("Scheduler.readSchedules: Scheduler is unable to
" +
"read configuration information required to
connect to " +
@@ -254,7 +251,7 @@
"list of schedules to be executed.
This entry, " +
"with metadata
id="+metadataElement.getId()+" does not" +
"refer to any metadata chain that
should be executed");
- throw new
SystemException("error.common.scheduler.init",
+ throw new
PerfSONARException("error.common.scheduler.init",
"Scheduler: Corrupt entry found in the " +
"list of schedules to be executed.
Metadata reference missing " +
"in metadata element"
+metadataElement.getId());
@@ -551,9 +548,9 @@
* @param args
* @throws RequestException
* @throws DataFormatException
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public static void main(String args[]) throws RequestException,
DataFormatException, SystemException {
+ public static void main(String args[]) throws PerfSONARException {
Scheduler tester = new Scheduler();
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/actions/SchedulerAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/actions/SchedulerAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/scheduler/actions/SchedulerAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -9,25 +9,21 @@
import java.util.Iterator;
import java.util.Map;
-import org.perfsonar.service.commons.engine.ServiceEngine;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.measurementExecutor.MeasurementExecutor;
-import org.perfsonar.service.commons.storage.StorageManager;
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.EventType;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.engine.ServiceEngine;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+import org.perfsonar.service.commons.measurementExecutor.MeasurementExecutor;
+import org.perfsonar.service.commons.storage.StorageManager;
-import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.EventType;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-
/**
* Abstract SchedulerAction class
*
@@ -59,7 +55,7 @@
* @param me
* @throws SystemException
*/
- public void init(Metadata[] metadataList, int me) throws SystemException
{
+ public void init(Metadata[] metadataList, int me) throws
PerfSONARException {
this.me = me;
@@ -99,7 +95,7 @@
*
* @param messageList An array of Message objects
* containing well defined actions
- * @throws SystemException
+ * @throws PerfSONARException
*/
public void performAction() {
@@ -281,7 +277,7 @@
try {
interfaceNameFromProperties =
this.configurationComponent.getProperty(eventTypeInterfaceName);
- } catch (SystemException e2) {
+ } catch (PerfSONARException e2) {
matchedInterfaceClassName = null;
@@ -455,35 +451,36 @@
"was encoutered :"+e2.getMessage());
return;
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
logger.error("SchedulerAction: The eventType in the
schedule: "+eventTypeString+" "+
"has been configured to be handled by the " +
"class: " +handlerClassName+". But
SchedulerAction " +
"(generic) encountered a System
Exception:"+e.getMessage());
return;
- } catch (RequestException e) {
- logger.error("SchedulerAction: The eventType in the
schedule: "+eventTypeString+" "+
- "has been configured to be handled by the " +
- "class: " +handlerClassName+". But
SchedulerAction " +
- "(generic) encountered a Request
Exception:"+e.getMessage());
- return;
-
- } catch (DataFormatException e) {
- logger.error("SchedulerAction: The eventType in the
schedule: "+eventTypeString+" "+
- "has been configured to be handled by the " +
- "class: " +handlerClassName+". But
SchedulerAction " +
- "(generic) encountered a DataFormat
Exception:"+e.getMessage());
- return;
-
- } catch (ResourceException e) {
- logger.error("SchedulerAction: The eventType in the
schedule: "+eventTypeString+" "+
- "has been configured to be handled by the " +
- "class: " +handlerClassName+". But
SchedulerAction " +
- "(generic) encountered a Resource
Exception:"+e.getMessage());
- return;
}
-
+//catch (RequestException e) {
+// logger.error("SchedulerAction: The eventType in
the schedule: "+eventTypeString+" "+
+// "has been configured to be handled by the
" +
+// "class: " +handlerClassName+". But
SchedulerAction " +
+// "(generic) encountered a Request
Exception:"+e.getMessage());
+// return;
+//
+// } catch (DataFormatException e) {
+// logger.error("SchedulerAction: The eventType in
the schedule: "+eventTypeString+" "+
+// "has been configured to be handled by the
" +
+// "class: " +handlerClassName+". But
SchedulerAction " +
+// "(generic) encountered a DataFormat
Exception:"+e.getMessage());
+// return;
+//
+// } catch (ResourceException e) {
+// logger.error("SchedulerAction: The eventType in
the schedule: "+eventTypeString+" "+
+// "has been configured to be handled by the
" +
+// "class: " +handlerClassName+". But
SchedulerAction " +
+// "(generic) encountered a Resource
Exception:"+e.getMessage());
+// return;
+// }
+//
}
Modified:
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/simplescheduler/Scheduler.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/simplescheduler/Scheduler.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/auxiliary/components/simplescheduler/Scheduler.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,17 +5,17 @@
*/
package org.perfsonar.commons.auxiliary.components.simplescheduler;
+import java.util.Collections;
+import java.util.ConcurrentModificationException;
import java.util.HashSet;
import java.util.Set;
-import java.util.Collections;
-import java.util.ConcurrentModificationException;
+import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.AuxiliaryThreadedComponent;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -59,7 +59,7 @@
// ------------------------------------------------- Public methods
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
try {
@@ -70,12 +70,12 @@
AuxiliaryComponentManager.getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "Cannot initialize components: " +
"logger and configuration "+e.getMessage();
- throw new SystemException("error.common.no_configuration",m);
+ throw new PerfSONARException("error.common.no_configuration",m);
}
@@ -202,7 +202,7 @@
// ---------------------------- Private Methods
- public static void main(String[] a) throws SystemException {
+ public static void main(String[] a) throws PerfSONARException {
new Scheduler().initComponent();
Modified:
trunk/perfsonar/src/org/perfsonar/commons/container/listeners/StartupInitializer.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/container/listeners/StartupInitializer.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/container/listeners/StartupInitializer.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -3,15 +3,15 @@
package org.perfsonar.commons.container.listeners;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContextEvent;
+import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryThreadedComponent;
-import org.perfsonar.commons.auxiliary.ComponentNames;
-import java.util.Map;
-import java.util.Iterator;
/**
* StartupInitializer is a servlet context listener, handling perfSONAR
Modified: trunk/perfsonar/src/org/perfsonar/commons/messages/BaseChaining.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/BaseChaining.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/BaseChaining.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,20 +5,17 @@
package org.perfsonar.commons.messages;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Data;
-
-import java.util.Map;
-import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
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.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
/**
* This class handles base chaining of metadata blocks
*
@@ -41,7 +38,7 @@
- public BaseChaining() throws SystemException {
+ public BaseChaining() throws PerfSONARException {
this.logger = (LoggerComponent)
AuxiliaryComponentManager.
Modified: trunk/perfsonar/src/org/perfsonar/commons/messages/DataRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/DataRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/DataRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,15 +5,17 @@
package org.perfsonar.commons.messages;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
-import java.util.ArrayList;
-import org.perfsonar.service.commons.exceptions.*;
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Key;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.ggf.ns.nmwg.base.v2_0.*;
-
/**
* Implements common methods needed by Data centric messages.
*
@@ -30,7 +32,7 @@
// ---------------------------------- constructors
public DataRequest()
- throws SystemException{
+ throws PerfSONARException{
type = new String("DataRequest");
}
@@ -46,7 +48,7 @@
Map mdMap,
ArrayList mdChain,
boolean mustKey)
- throws RequestException
+ throws PerfSONARException
{
if(head == null){
return;
@@ -62,7 +64,7 @@
logger.fatal(
"SetupDataRequest: Metadata MUST hold a key " +
"for GET_DATA");
- throw new RequestException(
+ throw new PerfSONARException(
"SetupDataRequest: Metadata MUST hold a key " +
"for GET_DATA");
}
@@ -80,7 +82,7 @@
else if(key == null){
logger.fatal(
"SetupDataRequest: Metadata MUST have subject or key");
- throw new RequestException(
+ throw new PerfSONARException(
"SetupDataRequest: Metadata MUST have subject or key");
}
@@ -100,8 +102,7 @@
protected Message metaToKey(
Message reqMessage,
Message respMessage)
- throws SystemException,ResourceException,
- DataFormatException,RequestException {
+ throws PerfSONARException {
/*
* Get Map for MetaData and Data children from reqMessage
@@ -136,7 +137,7 @@
logger.fatal(
"DataRequest.metaToKey: Data element must refer to "
+
"a metadata element.");
- throw new RequestException(
+ throw new PerfSONARException(
"DataRequest.metaToKey: Data element must refer to "
+
"a metadata element.");
}
@@ -189,7 +190,7 @@
if (hasData < 1){
logger.fatal(
"DataRequest.metaToKey: returned no data");
- throw new RequestException(
+ throw new PerfSONARException(
"DataRequest.metaToKey: returned no data");
}
@@ -203,14 +204,14 @@
if (hasMd < 1){
logger.fatal(
"DataRequest.metaToKey: returned no Metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"DataRequest.metaToKey: returned no Metadata");
}
if(hasData > hasMd){
logger.fatal("MetadataKeyRequest: Invalid data/metadata " +
"mapping returned from service");
- throw new RequestException(
+ throw new PerfSONARException (
"MetadataKeyRequest: Invalid data/metadata " +
"mapping returned from service");
}
@@ -225,7 +226,7 @@
// the other signature is used to add to an existing message.
protected Message metaToKey(
Message reqMessage
- ) throws
SystemException,ResourceException,DataFormatException,RequestException
+ ) throws PerfSONARException
{
Message respMessage = new Message();
Modified: trunk/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/EchoRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,23 +6,18 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.util.ResultCodesUtil;
+import java.util.ArrayList;
+import java.util.Map;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.EventType;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.perfsonar.service.commons.engine.ActionType;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+import org.perfsonar.service.commons.util.ResultCodesUtil;
-import java.util.ArrayList;
-import java.util.Map;
-
/**
* MessageHandler for EchoRequest messages.
*
@@ -44,7 +39,7 @@
- public EchoRequest() throws SystemException {
+ public EchoRequest() throws PerfSONARException {
super();
logger.debug("EchoRequest: MessageHandler created");
@@ -112,7 +107,7 @@
protected Message executeEcho(Message request)
- throws SystemException, RequestException, DataFormatException,
ResourceException {
+ throws PerfSONARException {
Data data = request.getDataArray()[0];
Metadata metadata = request.getMetadata(data.getMetadataIdRef());
@@ -121,7 +116,7 @@
if (eventType == null) {
logger.debug("EchoRequest.executeEcho: The request does not
contain "
+ "eventType element");
- throw new SystemException(
+ throw new PerfSONARException(
"error.request",
"EchoRequest.executeEcho: The request does
not contain "
+ "eventType element");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/LSCleanupRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/LSCleanupRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/LSCleanupRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,7 +5,7 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -19,7 +19,7 @@
/**
* @throws SystemException
*/
- public LSCleanupRequest() throws SystemException {
+ public LSCleanupRequest() throws PerfSONARException {
super();
logger.debug("LSCleanupRequest: MessageHandler created");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/LSDeregisterRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/LSDeregisterRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/LSDeregisterRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,13 +5,10 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import java.util.Map;
-
/**
* @author Maciej Glowiak
* MessageHandler for LS DeRegiser Request
@@ -23,7 +20,7 @@
/**
* @throws SystemException
*/
- public LSDeregisterRequest() throws SystemException {
+ public LSDeregisterRequest() throws PerfSONARException {
super();
logger.debug("LSDeRegisterRequest: MessageHandler created");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/LSKeepaliveRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/LSKeepaliveRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/LSKeepaliveRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,7 +5,7 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -19,7 +19,7 @@
/**
* @throws SystemException
*/
- public LSKeepaliveRequest() throws SystemException {
+ public LSKeepaliveRequest() throws PerfSONARException {
super();
logger.debug("LSKeepaliveRequest: MessageHandler created");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/LSQueryRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/LSQueryRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/LSQueryRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,7 +5,7 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import java.util.Map;
@@ -23,7 +23,7 @@
/**
* @throws SystemException
*/
- public LSQueryRequest() throws SystemException {
+ public LSQueryRequest() throws PerfSONARException {
super();
logger.debug("LSQueryRequest: MessageHandler created");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/LSRegisterRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/LSRegisterRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/LSRegisterRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -11,19 +11,11 @@
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
import org.perfsonar.service.commons.engine.ServiceEngineFactory;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.util.ResultCodesUtil;
-
import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import java.util.Map;
-
/**
* @author Maciej Glowiak
* MessageHandler for LS Regiser Request
@@ -50,7 +42,7 @@
/**
* @throws SystemException
*/
- public LSRegisterRequest() throws SystemException {
+ public LSRegisterRequest() throws PerfSONARException {
// get a logger
logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -88,7 +80,7 @@
}
- public Message execute(Message reqMessage) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public Message execute(Message reqMessage) throws PerfSONARException {
Message respMessage = null;
Modified: trunk/perfsonar/src/org/perfsonar/commons/messages/LSRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/LSRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/LSRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,15 +5,10 @@
package org.perfsonar.commons.messages;
-import java.util.Collection;
import java.util.Map;
-
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
-
/**
* General MessageHangler for LS
*
@@ -27,7 +22,7 @@
/**
* @throws SystemException
*/
- public LSRequest() throws SystemException {
+ public LSRequest() throws PerfSONARException {
super();
setType("LSRequest");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/LookupInfoRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/LookupInfoRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/LookupInfoRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,33 +5,28 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.engine.ActionType;
-import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
-import org.perfsonar.service.commons.util.ResultCodesUtil;
+import java.util.ArrayList;
+import java.util.Map;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.EventType;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.AccessPoint;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ContactEmail;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Datum;
+import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Organization;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Service;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceDescription;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceName;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceType;
-import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Datum;
-import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.Organization;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceVersion;
-import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ContactEmail;
+import org.perfsonar.service.commons.engine.ActionType;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
+import org.perfsonar.service.commons.util.ResultCodesUtil;
-import java.util.ArrayList;
-import java.util.Map;
-
/**
* MessageHandler for LookupInfoRequest messages.
*
@@ -54,7 +49,7 @@
- public LookupInfoRequest() throws SystemException {
+ public LookupInfoRequest() throws PerfSONARException {
super();
logger.debug("LookupInfoRequest: MessageHandler created");
@@ -127,7 +122,7 @@
protected Message getLookupInfo(Message request)
- throws RequestException, PerfSONARException {
+ throws PerfSONARException {
Data data = request.getDataArray()[0];
Metadata metadata = request.getMetadata(data.getMetadataIdRef());
@@ -136,7 +131,7 @@
if (eventType == null) {
logger.warn("LookupInfoRequest.executeEcho: The request does
not contain "
+ "eventType element");
- throw new RequestException(
+ throw new PerfSONARException(
"error.request",
"LookupInfoRequest.executeEcho: The request
does not contain "
+ "eventType element");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/MeasurementArchiveStoreRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/MeasurementArchiveStoreRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/MeasurementArchiveStoreRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,8 +6,8 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.engine.ActionType;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -27,7 +27,7 @@
- public MeasurementArchiveStoreRequest() throws SystemException {
+ public MeasurementArchiveStoreRequest() throws PerfSONARException {
super();
logger.debug("MeasurementArchiveStoreRequest: MessageHandler
created");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/MeasurementRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/MeasurementRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/MeasurementRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,7 +6,7 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.engine.ActionType;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -26,7 +26,7 @@
public MeasurementRequest()
- throws SystemException{
+ throws PerfSONARException{
super();
logger.debug("MeasurementRequest: MessageHandler created");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/MessageHandler.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/MessageHandler.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/MessageHandler.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -32,7 +32,7 @@
* and returns the result.
*/
public Message execute(Message reqMessage)
- throws
SystemException,ResourceException,DataFormatException,RequestException;
+ throws PerfSONARException;
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/MessageHandlerFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/MessageHandlerFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/MessageHandlerFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -9,7 +9,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import java.util.Hashtable;
@@ -26,7 +26,7 @@
static private Hashtable m2c = null;
public static MessageHandler getMessageHandler(String messageType)
- throws SystemException{
+ throws PerfSONARException{
// get a logger
LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -69,7 +69,7 @@
+ className);
if (className == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.action_not_supported",
"Action ["+messageType+"] is not supported by " +
"the service or cannot be served - " +
@@ -89,7 +89,7 @@
+ "messageHandler for: " + messageType);
logger.fatal("MessageHandlerFactory: because of Instatiation "
+ "Problems " + e.getMessage());
- throw new SystemException("error.common.action_not_supported",
+ throw new
PerfSONARException("error.common.action_not_supported",
"MessageHandlerFactory: Unable to "
+ "create messageHandler for: " + messageType
+ " because: " + e.getMessage());
@@ -100,7 +100,7 @@
+ "messageHandler for: " + messageType);
logger.fatal("MessageHandlerFactory: because of illegalAccess"
+ e.getMessage());
- throw new SystemException("error.common.action_not_supported",
+ throw new PerfSONARException("error.common.action_not_supported",
"MessageHandlerFactory: Unable to "
+ "create messageHandler for: " + messageType
+ " because: " + e.getMessage());
@@ -111,7 +111,7 @@
+ "messageHandler for: " + messageType);
logger.fatal("MessageHandlerFactory: because classNotFound :"
+ e.getMessage());
- throw new SystemException("error.common.action_not_supported",
+ throw new PerfSONARException("error.common.action_not_supported",
"MessageHandlerFactory: Unable to "
+ "create messageHandler for: " + messageType
+" because: " + e.getMessage());
@@ -123,7 +123,7 @@
logger.fatal(
"MessageHandlerFactory: Unable to create "
+ "messageHandler for: " + messageType);
- throw new SystemException("error.common.action_not_supported",
+ throw new
PerfSONARException("error.common.action_not_supported",
"MessageHandlerFactory: Unable to "
+ "create messageHandler for: " + messageType);
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/MetadataKeyRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/MetadataKeyRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/MetadataKeyRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,7 +5,7 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.engine.ActionType;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -27,7 +27,7 @@
- public MetadataKeyRequest() throws SystemException {
+ public MetadataKeyRequest() throws PerfSONARException {
super();
logger.debug("MetadataKeyRequest: MessageHandler created");
Modified: trunk/perfsonar/src/org/perfsonar/commons/messages/Request.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/Request.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/Request.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -20,7 +20,6 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.engine.ServiceEngineFactory;
import org.perfsonar.service.commons.engine.ServiceEngine;
@@ -57,7 +56,7 @@
- public Request() throws SystemException {
+ public Request() throws PerfSONARException {
type = new String("Request");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataDBRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataDBRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataDBRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,13 +1,13 @@
package org.perfsonar.commons.messages;
import org.perfsonar.service.commons.engine.ActionType;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SetupDataDBRequest extends TOPSRequest {
/**
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public SetupDataDBRequest() throws SystemException {
+ public SetupDataDBRequest() throws PerfSONARException {
super();
logger.debug("SetupDataDBRequest: MessageHandler created");
setType(ActionType.SETUP_DATA_DB);
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/SetupDataRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,7 +6,7 @@
package org.perfsonar.commons.messages;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.engine.ActionType;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
@@ -28,7 +28,7 @@
- public SetupDataRequest() throws SystemException {
+ public SetupDataRequest() throws PerfSONARException {
super();
logger.debug("SetupDataRequest: MessageHandler created");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/SubscriptionKeepaliveRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/SubscriptionKeepaliveRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/SubscriptionKeepaliveRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -3,11 +3,11 @@
import java.util.Map;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SubscriptionKeepaliveRequest extends Request {
- public SubscriptionKeepaliveRequest() throws SystemException {
+ public SubscriptionKeepaliveRequest() throws PerfSONARException {
super();
// TODO Auto-generated constructor stub
}
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/SubscriptionRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/SubscriptionRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/SubscriptionRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -3,11 +3,11 @@
import java.util.Map;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SubscriptionRequest extends Request {
- public SubscriptionRequest() throws SystemException {
+ public SubscriptionRequest() throws PerfSONARException {
super();
// TODO Auto-generated constructor stub
}
Modified: trunk/perfsonar/src/org/perfsonar/commons/messages/TOPSRequest.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/messages/TOPSRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/messages/TOPSRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -4,16 +4,9 @@
*/
package org.perfsonar.commons.messages;
-import java.util.Collection;
import java.util.Map;
-
-import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -25,9 +18,9 @@
/**
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public TOPSRequest() throws SystemException {
+ public TOPSRequest() throws PerfSONARException {
super();
setType("TOPSRequest");
Modified:
trunk/perfsonar/src/org/perfsonar/commons/messages/UnSubscriptionRequest.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/commons/messages/UnSubscriptionRequest.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/commons/messages/UnSubscriptionRequest.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -3,11 +3,11 @@
import java.util.Map;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class UnSubscriptionRequest extends Request {
- public UnSubscriptionRequest() throws SystemException {
+ public UnSubscriptionRequest() throws PerfSONARException {
super();
// TODO Auto-generated constructor stub
}
Modified: trunk/perfsonar/src/org/perfsonar/commons/util/MathUtil.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/util/MathUtil.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/util/MathUtil.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,8 +5,7 @@
*/
package org.perfsonar.commons.util;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Class providing Mathematical functions
@@ -30,7 +29,7 @@
* @throws SystemException
* @throws DataFormatException
*/
- public double[] convertOctetsToBits (double[] octetValues) throws
SystemException, DataFormatException {
+ public double[] convertOctetsToBits (double[] octetValues) throws
PerfSONARException {
if(octetValues==null)
return null;
@@ -47,7 +46,7 @@
}catch(Exception e) {
- throw new SystemException("MathUtil: Error converting
response octet values " +
+ throw new PerfSONARException("MathUtil: Error converting
response octet values " +
"to bit values: "+e.getMessage(), e);
}
@@ -56,13 +55,13 @@
}
if (bitValues==null) {
- throw new SystemException("MathUtil: Error converting octet
values to bit values. Result was null");
+ throw new PerfSONARException("MathUtil: Error converting octet
values to bit values. Result was null");
}
if (bitValues.length==0) {
- throw new DataFormatException("Mathutil: Conversion of values in
" +
+ throw new PerfSONARException("Mathutil: Conversion of values in
" +
"octets to values in bits could not be completed.
Zero values " +
"were converted");
@@ -79,10 +78,10 @@
* @param octetValues array of long values which represent octet values
* @return array of long values which represent bit values converted
from octet values <br>
* returns null only if input is null
- * @throws SystemException
+ * @throws PerfSONARException
* @throws DataFormatException
*/
- public long[] convertOctetsToBits (long[] octetValues) throws
SystemException, DataFormatException {
+ public long[] convertOctetsToBits (long[] octetValues) throws
PerfSONARException {
if(octetValues==null)
return null;
@@ -99,7 +98,7 @@
}catch(Exception e) {
- throw new SystemException("MathUtil: Error converting
response octet values " +
+ throw new PerfSONARException("MathUtil: Error converting
response octet values " +
"to bit values: "+e.getMessage(), e);
}
@@ -108,13 +107,13 @@
}
if (bitValues==null) {
- throw new SystemException("MathUtil: Error converting octet
values to bit values. Result was null");
+ throw new PerfSONARException("MathUtil: Error converting octet
values to bit values. Result was null");
}
if (bitValues.length==0) {
- throw new DataFormatException("Mathutil: Conversion of values in
" +
+ throw new PerfSONARException("Mathutil: Conversion of values in
" +
"octets to values in bits could not be completed.
Zero values " +
"were converted");
Modified: trunk/perfsonar/src/org/perfsonar/commons/util/TimeDateUtil.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/util/TimeDateUtil.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/util/TimeDateUtil.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -12,14 +12,12 @@
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.time.v2_0.Time;
-
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-
/**
* This class contains methods that deal with time and date operations.
*
@@ -52,10 +50,10 @@
* @author romradz
*/
public static String getUnixTime(Parameter timeParemeter)
- throws DataFormatException {
+ throws PerfSONARException {
if (timeParemeter == null)
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.parameter",
"TimeDateUtil.getUnixTime: parameter is null");
@@ -69,7 +67,7 @@
protected static String _getUnixTime(Parameter timeParemeter)
- throws DataFormatException {
+ throws PerfSONARException {
Vector pchildren = timeParemeter.getChildrenByType("time");
Element subelement = null;
@@ -83,7 +81,7 @@
return null;
if (!subelement.getLocalName().equals("time"))
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.parameter",
"TimeDateUtil._getUnixTime: wrong type of parameter; "
+ "it should be time type");
@@ -105,7 +103,7 @@
unixTimeString = Long.toString(dt.getMillis()/1000);
} catch (Exception ex) {
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.parameter",
"TimeDateUtil._getUnixTime: ISO time coversion is
wrong; "
+ ex.toString());
@@ -113,7 +111,7 @@
} else {
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.parameter",
"TimeDateUtil._getUnixTime: "
+ "Time type " + time.getType() + "is not supported");
Modified: trunk/perfsonar/src/org/perfsonar/commons/util/XMLUtils.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/commons/util/XMLUtils.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/commons/util/XMLUtils.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -9,10 +9,9 @@
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
-
+import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.HashMap;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -20,15 +19,10 @@
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
-
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Handler;
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
import org.w3c.dom.Document;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -117,7 +111,7 @@
* @return XML document as String
*/
public static String serializeXML(Element element)
- throws SystemException {
+ throws PerfSONARException {
OutputFormat outputFormat = new OutputFormat("XML", "UTF-8", true);
outputFormat.setIndent(1);
@@ -141,7 +135,7 @@
} catch (Exception e) {
String m = "XMLUtils.serializeXML: error while serializing XML:
"+
e.getMessage();
- throw new SystemException(m);
+ throw new PerfSONARException(m);
}
}
@@ -166,7 +160,7 @@
else return builtDoc;
} catch (Exception e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.parse_error",
"Cannot convert Message to DOM");
}
@@ -223,25 +217,25 @@
} catch(SAXException e) {
- throw new RequestException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"Request couldnot be parsed because "
+ "of SAX exception. Error message: "
+ e.getMessage());
}
} catch (IOException e) {
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"IO exception: "
+ "encountered while reading schema file "
+ e.getMessage());
} catch (SAXException e) {
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"SAX Exception: "
+ e.getMessage());
} catch (ParserConfigurationException e) {
- throw new SystemException("error.common.parse_error", "Parser
Configuration "
+ throw new PerfSONARException("error.common.parse_error", "Parser
Configuration "
+ "Exception " + e.getMessage());
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchProtocolFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,9 +1,9 @@
package org.perfsonar.service.commons.authn;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class AADispatchProtocolFactory {
- public static AADispatchProtocol getDefaultAADispatchProtocol()
throws SystemException {
+ public static AADispatchProtocol getDefaultAADispatchProtocol()
throws PerfSONARException {
return new AADispatchSOAPProtocol();
}
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/authn/AADispatchSOAPProtocol.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -4,7 +4,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class AADispatchSOAPProtocol implements AADispatchProtocol {
private final String AUTHN_DECISION = "service.authn.response";
@@ -12,22 +12,22 @@
private ConfigurationComponent config;
private boolean isAuthorized=false;
- public AADispatchSOAPProtocol() throws SystemException {
+ public AADispatchSOAPProtocol() throws PerfSONARException {
try {
logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance()
.getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "AADispatchSOAPProtocol: Can't obtain
Logger component ";
- throw new SystemException(m);
+ throw new PerfSONARException(m);
}
try {
config = (ConfigurationComponent)
AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "AADispatchSOAPProtocol: Can't obtain
Config component ";
logger.error(m);
- throw new SystemException(m);
+ throw new PerfSONARException(m);
}
try {
Boolean
b=Boolean.valueOf(config.getProperty(AUTHN_DECISION));
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,8 +1,8 @@
package org.perfsonar.service.commons.authn.tokens;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public interface SecTokenManager {
- public boolean hasSTInRequest() throws SystemException;
- public Object getSTFromRequest() throws SystemException;
+ public boolean hasSTInRequest() throws PerfSONARException;
+ public Object getSTFromRequest() throws PerfSONARException;
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenManagerFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenManagerFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenManagerFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,9 +1,9 @@
package org.perfsonar.service.commons.authn.tokens;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SecTokenManagerFactory {
- public static SecTokenManager getDefaultSecTokenManager() throws
SystemException {
+ public static SecTokenManager getDefaultSecTokenManager() throws
PerfSONARException {
return new SecTokenSOAPManager();
}
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenSOAPManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenSOAPManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecTokenSOAPManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -7,7 +7,7 @@
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;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.w3c.dom.NodeList;
public class SecTokenSOAPManager implements SecTokenManager {
@@ -15,16 +15,16 @@
private final String WSSECHEADER="Security";
private LoggerComponent logger = null;
- public SecTokenSOAPManager() throws SystemException {
+ public SecTokenSOAPManager() throws PerfSONARException {
logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
if (logger == null) {
String m = "SecTokenSOAPManager: can't obtain Logger
object";
- throw new SystemException("error.authn.dependency",
m);
+ throw new
PerfSONARException("error.authn.dependency", m);
}
}
- public Object getSTFromRequest() throws SystemException {
+ public Object getSTFromRequest() throws PerfSONARException {
if (!hasSTInRequest())
return null;
MessageContext mc=MessageContext.getCurrentContext();
@@ -35,11 +35,11 @@
} catch (SOAPException e) {
String m = "Error checking the WS-SEC header";
logger.error(m);
- throw new SystemException("error.authn.checking", m);
+ throw new PerfSONARException("error.authn.checking", m);
}
}
- public boolean hasSTInRequest() throws SystemException {
+ public boolean hasSTInRequest() throws PerfSONARException {
MessageContext mc=MessageContext.getCurrentContext();
try {
SOAPHeader
sh=(SOAPHeader)mc.getCurrentMessage().getSOAPHeader();
@@ -48,7 +48,7 @@
} catch (SOAPException e) {
String m = "Error checking the WS-SEC header";
logger.error(m);
- throw new SystemException("error.authn.checking", m);
+ throw new PerfSONARException("error.authn.checking", m);
}
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecurityToken.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecurityToken.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/authn/tokens/SecurityToken.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,6 +1,6 @@
package org.perfsonar.service.commons.authn.tokens;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class SecurityToken {
private SecTokenManager tm;
@@ -19,11 +19,11 @@
this.secToken = secToken;
}
- public void setSecTokenFromRequest() throws SystemException {
+ public void setSecTokenFromRequest() throws PerfSONARException {
setSecToken(tm.getSTFromRequest());
}
- public boolean hasSecTokenInRequest() throws SystemException {
+ public boolean hasSecTokenInRequest() throws PerfSONARException {
return tm.hasSTInRequest();
}
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,12 +8,8 @@
package org.perfsonar.service.commons.engine;
import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-
/**
* Interface specification for all types of Service Engines
*
@@ -48,5 +44,5 @@
*
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, ResourceException, DataFormatException,
RequestException;
+ throws PerfSONARException;
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ServiceEngineFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ServiceEngineFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/engine/ServiceEngineFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,7 +8,7 @@
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;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Factory class which can be used to get ServiceEngine instances
@@ -29,11 +29,11 @@
*
* @return String type of Service Engine
*
- * @throws SystemException if an error was encountered while
+ * @throws PerfSONARException if an error was encountered while
* getting the instance
*/
public static ServiceEngine getServiceEngine(String engineClassName)
- throws SystemException {
+ throws PerfSONARException {
// get a logger
LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -51,7 +51,7 @@
// class not found
logger.fatal("ServiceEngineFactory: class not found for name: "
+ engineClassName);
- throw new SystemException("ServiceEngineFactory: ClassNotFound: "
+ throw new PerfSONARException("ServiceEngineFactory:
ClassNotFound: "
+ engineClassName);
}
@@ -69,7 +69,7 @@
"ServiceEngineFactory: class cast exception while "
+ "trying to instantiate: " + engineClassName);
- throw new SystemException("ServiceEngineFactory: class cast
exception while "
+ throw new PerfSONARException("ServiceEngineFactory: class cast
exception while "
+ "trying to instantiate: " + engineClassName);
@@ -79,14 +79,14 @@
"ServiceEngineFactory: class instantiaiton exception while "
+ "trying to instantiate: " + engineClassName);
- throw new SystemException("ServiceEngineFactory: class
instantiation "
+ throw new PerfSONARException("ServiceEngineFactory: class
instantiation "
+ "exception for " + engineClassName);
} catch (IllegalAccessException e1) {
logger.fatal("ServiceEngineFactory: class instantiation is
illegal "
+ "for: " + engineClassName);
- throw new SystemException("ServiceEngineFactory:
IllegalAccessException "
+ throw new PerfSONARException("ServiceEngineFactory:
IllegalAccessException "
+ "while instantiating "+engineClassName);
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/AuthenticationException.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/AuthenticationException.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/AuthenticationException.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,7 +8,7 @@
/**
* @author loukik
- *
+ * @deprecated
* Class used for raising exceptions related to the client's request
*/
public class AuthenticationException extends PerfSONARException {
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/DataFormatException.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/DataFormatException.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/DataFormatException.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -9,7 +9,7 @@
/**
* @author loukik
* @author Maciej Glowiak
- *
+ * @deprecated
* Class used for raising exceptions related to the format of data being
provided to the client
*/
public class DataFormatException extends PerfSONARException {
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/RequestException.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/RequestException.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/RequestException.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,7 +8,7 @@
/**
* @author loukik
- *
+ * @deprecated
* Class used for raising exceptions related to the client's request
*/
public class RequestException extends PerfSONARException{
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/ResourceException.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/ResourceException.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/ResourceException.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,7 +8,7 @@
/**
* @author loukik
- *
+ * @deprecated
* Class used for raising exceptions related to provisioning of resources
*/
public class ResourceException extends PerfSONARException {
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/SystemException.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/SystemException.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/exceptions/SystemException.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -9,7 +9,7 @@
/**
* @author loukik
* @author Maciej Glowiak
- *
+ * @deprecated
* Class used for raising exceptions when the cause of errors is the system
*/
public class SystemException extends PerfSONARException {
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/measurementExecutor/MeasurementExecutor.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/measurementExecutor/MeasurementExecutor.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/measurementExecutor/MeasurementExecutor.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,11 +6,8 @@
package org.perfsonar.service.commons.measurementExecutor;
import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
/**
@@ -39,6 +36,6 @@
* @throws SystemException
* @throws RequestException
*/
- public Message makeMeasurement(Message request) throws
SystemException, RequestException, ResourceException, DataFormatException;
+ public Message makeMeasurement(Message request) throws
PerfSONARException;
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/registration/GenericServiceLSRegistrator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/registration/GenericServiceLSRegistrator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/registration/GenericServiceLSRegistrator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -2,8 +2,6 @@
import java.util.Map;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
@@ -14,10 +12,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.commons.util.XMLUtils;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.w3c.dom.Document;
/**
* Generic Service LS Registrator.
@@ -66,7 +61,7 @@
/**
* Initializes Registrator
*/
- public void initRegistrator() throws SystemException {
+ public void initRegistrator() throws PerfSONARException {
logger = (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
@@ -79,10 +74,10 @@
public Message register(String lsUrl) throws PerfSONARException {
- if (lsUrl==null) throw new SystemException(
+ if (lsUrl==null) throw new PerfSONARException(
"error.lsregistrator.no_ls_url",
"GenericServiceLSRegistrator: Lookup Service URL is null");
- if ("".equals(lsUrl)) throw new SystemException(
+ if ("".equals(lsUrl)) throw new PerfSONARException(
"error.lsregistrator.no_ls_url",
"GenericServiceLSRegistrator: Lookup Service URL is empty");
@@ -110,13 +105,13 @@
} catch (ParserConfigurationException e) {
logger.error("GenericServiceLSRegistrator: "+e.getMessage());
- throw new
SystemException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
+ throw new
PerfSONARException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
} catch (FactoryConfigurationError e) {
logger.error("GenericServiceLSRegistrator: "+e.getMessage());
- throw new
SystemException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
+ throw new
PerfSONARException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
} catch (Exception e) {
logger.error("GenericServiceLSRegistrator: "+e.getMessage());
- throw new
SystemException("error.lsregistrator.other","GenericServiceLSRegistrator:
Error while sending request to LS: "+e.getMessage());
+ throw new
PerfSONARException("error.lsregistrator.other","GenericServiceLSRegistrator:
Error while sending request to LS: "+e.getMessage());
}
}
@@ -151,7 +146,7 @@
throws PerfSONARException {
if (serviceDescription==null) throw new
-
SystemException("error.common.lsregistrator.no_service_description",
+
PerfSONARException("error.common.lsregistrator.no_service_description",
"No service description");
Map commonParameters = serviceDescription.getServiceDescription();
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/registration/LSRegistrationComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/registration/LSRegistrationComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/registration/LSRegistrationComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,7 +6,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
@@ -14,16 +13,9 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.auxiliary.components.simplescheduler.Scheduler;
import
org.perfsonar.commons.auxiliary.components.simplescheduler.SchedulerAction;
-
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import
org.perfsonar.service.commons.registration.GenericServiceLSRegistrator;
-import
org.perfsonar.service.commons.registration.InformationXMLFileServiceContent;
-import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
-import org.perfsonar.service.commons.registration.ServiceLSRegistrator;
-
/**
* Action for simple Scheduler that registers with the LS
*
@@ -68,7 +60,7 @@
- public LSRegistrationComponent() throws SystemException {
+ public LSRegistrationComponent() throws PerfSONARException {
try {
@@ -77,9 +69,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"LSRegistrationComponent.initComponent: "
+ "Cannot get logger component");
@@ -94,9 +86,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"LSRegistrationComponent.initComponent: "
+ "Cannot get config component");
@@ -168,7 +160,7 @@
// ---------------------- component that loads action to scheduler
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
//Get configuration
@@ -183,7 +175,7 @@
} catch (RuntimeException e) {
//possibly not an integer - keep default interval
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
//no property - keep default interval
}
@@ -210,13 +202,13 @@
getComponent(schedulerVal);
if (scheduler == null)
- throw new SystemException("error.common.no_scheduler",
+ throw new PerfSONARException("error.common.no_scheduler",
"LSRegistrationComponent.initComponent: "
+ "No scheduler component in
AuxiliaryComponentManager");
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException("error.common.no_scheduler",
+ throw new PerfSONARException("error.common.no_scheduler",
"LSRegistrationComponent.initComponent:"
+ "LSCleanupLoader: no [component."
+ componentName + ".scheduler_component] parameter. "
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/DataRepository.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/DataRepository.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/DataRepository.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -4,7 +4,7 @@
*/
package org.perfsonar.service.commons.storage;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* This interface defines the data repository.
@@ -31,13 +31,13 @@
/**
* Opens the acces to a data repository.
*/
- public void open() throws SystemException;
+ public void open() throws PerfSONARException;
/**
* Closes the acces to a data repository.
*/
- public void close() throws SystemException;
+ public void close() throws PerfSONARException;
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/GenericXmlStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/GenericXmlStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/GenericXmlStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,10 +5,9 @@
package org.perfsonar.service.commons.storage;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
/**
* This interface declares methods to have
* an access to a data storage.
@@ -25,14 +24,14 @@
* Fetches data from a data repository.
*/
public Object fetch(Object dataQuery)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
/**
* Stores data in a data repository.
*/
public Object store(Object dataSet)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/NMWGStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/NMWGStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/NMWGStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,10 +5,9 @@
package org.perfsonar.service.commons.storage;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Key;
@@ -27,21 +26,21 @@
* Inits an object of this class with data repository object.
*/
public void initStorage(Key dataRepository)
- throws SystemException;
+ throws PerfSONARException;
/**
* Fetches data from a data repository.
*/
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
/**
* Stores data in a data repository.
*/
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/StorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/StorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/StorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,10 +5,9 @@
package org.perfsonar.service.commons.storage;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
/**
* This interface declares methods to have
* an access to a data storage.
@@ -23,21 +22,21 @@
* Inits an object of this class with data repository object.
*/
public void initStorage(DataRepository dataRepository)
- throws SystemException;
+ throws PerfSONARException;
/**
* Fetches data from a data repository.
*/
public Object fetch(Object dataQuery)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
/**
* Stores data in a data repository.
*/
public Object store(Object dataSet)
- throws SystemException, RequestException, DataFormatException;
+ throws PerfSONARException;
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/XmlDbDataRepository.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/XmlDbDataRepository.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/XmlDbDataRepository.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -3,7 +3,7 @@
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;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
/**
@@ -50,7 +50,7 @@
try {
logger = (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
}
logger.debug("XmlDbDataRepository: created");
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -4,7 +4,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
import org.perfsonar.service.commons.storage.xmldb.XmlDbStorageManager;
import
org.perfsonar.service.commons.storage.xmldb.exist.rest.ExistDbHttpXmlDataRepository;
@@ -25,7 +25,7 @@
String type,
String uriPropName,
String usernamePropName,
- String passwordPropName) throws SystemException {
+ String passwordPropName) throws PerfSONARException {
LoggerComponent logger = getLogger();
ConfigurationComponent configuration = getConfig();
@@ -70,7 +70,7 @@
public static XmlDbStorageManager getXMLStorageManager(
String type,
XmlDbDataRepository dataRepository )
- throws SystemException {
+ throws PerfSONARException {
XmlDbStorageManager sm = null;
LoggerComponent logger = getLogger();
@@ -105,7 +105,7 @@
// ---------------------------------------- private static methods
private static LoggerComponent getLogger()
- throws SystemException {
+ throws PerfSONARException {
return (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
@@ -114,7 +114,7 @@
private static ConfigurationComponent getConfig()
- throws SystemException {
+ throws PerfSONARException {
return (ConfigurationComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.CONFIG);
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbGenericStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbGenericStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/ExistDbGenericStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -7,7 +7,7 @@
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;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbConstants;
import org.perfsonar.service.commons.storage.xmldb.XmlDbStorageManager;
@@ -82,7 +82,7 @@
}
- protected LoggerComponent getLogger() throws SystemException {
+ protected LoggerComponent getLogger() throws PerfSONARException {
if (logger==null) {
//get logger
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlDataRepository.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlDataRepository.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlDataRepository.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,6 +1,6 @@
package org.perfsonar.service.commons.storage.xmldb.exist.rest;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
public class ExistDbHttpXmlDataRepository extends XmlDbDataRepository {
@@ -24,8 +24,8 @@
}
- public void open() throws SystemException {};
+ public void open() throws PerfSONARException {};
- public void close() throws SystemException {};
+ public void close() throws PerfSONARException {};
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/rest/ExistDbHttpXmlStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -2,9 +2,7 @@
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
import org.perfsonar.service.commons.storage.xmldb.XmlDbConstants;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
@@ -64,10 +62,10 @@
/**
* Set data repository for this Storage Manager.
* Important note: DataRepository MUST be XmlDbDataRepository. Otherwise,
- * a SystemException will be thrown!
+ * a PerfSONARException will be thrown!
*/
public void initStorage(DataRepository dataRepository)
- throws SystemException {
+ throws PerfSONARException {
try {
@@ -86,7 +84,7 @@
}
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
dataRepository = ExistDbFactory.getDataRepositoryByProperties(
ExistDbFactory.EXIST_HTTP,
@@ -108,7 +106,7 @@
* @return depends on getResultType()
*/
public Object fetch(Object dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
return xqueryHttp(dataQuery);
@@ -122,7 +120,7 @@
* @return depends on getResultType()
*/
public Object store(Object dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
return xupdateHttp(dataSet);
@@ -133,7 +131,7 @@
protected Object xqueryHttp(Object query)
- throws SystemException {
+ throws PerfSONARException {
getLogger().debug("ExistDbHttpXmlStorageManager: XQuery");
XmlDbResult results = null;
@@ -148,7 +146,7 @@
ExistDbHTTPAccess.ALL_RESULTS);
} catch (Exception ex) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.storage.xmldb.open",
"XQuery by HTTP failed. "
+ "Could not connect to eXist via pure http, "
@@ -166,7 +164,7 @@
protected Object xupdateHttp(Object xml)
- throws SystemException {
+ throws PerfSONARException {
getLogger().debug("ExistDbHttpXmlStorageManager: XUpdate");
int results;
@@ -179,7 +177,7 @@
((XmlDbDataRepository)dataRepository).getDbPassword());
} catch (Exception ex) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.storage.xmldb.open",
"XUpdate by HTTP failed. "
+ "Could not connect to eXist via pure http, "
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,6 +1,6 @@
package org.perfsonar.service.commons.storage.xmldb.exist.xmlrpc;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
import org.xmldb.api.DatabaseManager;
import org.xmldb.api.base.Collection;
@@ -135,7 +135,7 @@
}
- public void open() throws SystemException {
+ public void open() throws PerfSONARException {
logger.debug("ExistDbXmlrpcXmlDataRepository: connect");
@@ -151,20 +151,20 @@
dbUri, dbUsername, dbPassword);
} catch (ClassNotFoundException e) {
- throw new SystemException("error.common.storage.xmldb.open",
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: Can't find eXist DB
XML driver "
+dbDriverClassname+", "+e.getMessage());
} catch (InstantiationException e) {
- throw new SystemException("error.common.storage.xmldb.open",
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: " +
"Can't create eXist DB XML driver instance "
+dbDriverClassname+", "+e.getMessage());
} catch (IllegalAccessException e) {
- throw new SystemException("error.common.storage.xmldb.open",
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: " +
"IllegalAccessException, "+e.getMessage());
} catch (XMLDBException e) {
- throw new SystemException("error.common.storage.xmldb.open",
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: XML DB Exception
"+e.getMessage());
}
@@ -179,7 +179,7 @@
}
- public void close() throws SystemException {
+ public void close() throws PerfSONARException {
if (existDatabase!=null) {
@@ -191,7 +191,7 @@
existCollection=null;
} catch (XMLDBException e) {
- throw new SystemException("error.common.storage.xmldb.close",
+ throw new
PerfSONARException("error.common.storage.xmldb.close",
"ExistDbXmlrpcXmlDataRepository: Can't deregister
database, "
+e.getMessage());
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -3,9 +3,7 @@
import java.util.Vector;
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
import org.perfsonar.service.commons.storage.StorageManager;
import org.perfsonar.service.commons.storage.xmldb.XmlDbConstants;
@@ -70,9 +68,9 @@
/**
* Set data repository for this Storage Manager.
* Important note: DataRepository MUST be
ExistDbXmlrpcXmlDataRepository. Otherwise,
- * a SystemException will be thrown!
+ * a PerfSONARException will be thrown!
*/
- public void initStorage(DataRepository dataRepository) throws
SystemException {
+ public void initStorage(DataRepository dataRepository) throws
PerfSONARException {
getLogger().debug("ExistDbXmlrpcXmlStorageManager: initStorage with
data repository");
@@ -91,7 +89,7 @@
}
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
getLogger().debug("ExistDbXmlrpcXmlStorageManager: initComponent");
@@ -118,8 +116,7 @@
* @param dataQuery Must be String that contain XPath/XQuery expression
* @return always StringArrayDataSet object
*/
- public Object fetch(Object dataQuery) throws SystemException,
- RequestException, DataFormatException {
+ public Object fetch(Object dataQuery) throws PerfSONARException {
getLogger().debug("ExistXMLDatabaseAccess: perform XQuery");
@@ -127,13 +124,13 @@
try {
xqueryExpression = (String)dataQuery;
} catch (ClassCastException ex) {
- throw new
DataFormatException("error.common.storage.xmldb.wrong_query",
+ throw new
PerfSONARException("error.common.storage.xmldb.wrong_query",
"ExistDbXmlrpcXmlStorageManager: This method accepts " +
"StringData data format only");
}
if (xqueryExpression==null) {
- throw new
DataFormatException("error.common.storage.xmldb.empty_query",
+ throw new
PerfSONARException("error.common.storage.xmldb.empty_query",
"ExistDbXmlrpcXmlStorageManager: Input DataQuery " +
"contains no data");
}
@@ -177,7 +174,7 @@
}
} catch (XMLDBException e) {
- throw new SystemException("error.common.storage.xmldb.query",
+ throw new PerfSONARException("error.common.storage.xmldb.query",
"Can't perform XQuery: "+e.getMessage());
}
@@ -190,8 +187,7 @@
* @param dataSet Must be String, contains XUpdate string
* @return null
*/
- public Object store(Object dataSet) throws SystemException,
- RequestException, DataFormatException {
+ public Object store(Object dataSet) throws PerfSONARException {
getLogger().debug("ExistDbXmlrpcXmlStorageManager: perform
XUpdate");
@@ -202,13 +198,13 @@
xupdateExpression = (String)dataSet;
} catch (ClassCastException ex) {
- throw new
DataFormatException("error.common.storage.xmldb.wrong_query",
+ throw new
PerfSONARException("error.common.storage.xmldb.wrong_query",
"ExistDbXmlrpcXmlStorageManager: This method accepts " +
"StringData data format only");
}
if (xupdateExpression==null) {
- throw new
DataFormatException("error.common.storage.xmldb.empty_query",
+ throw new
PerfSONARException("error.common.storage.xmldb.empty_query",
"ExistDbXmlrpcXmlStorageManager: Input DataQuery " +
"contains no data");
}
@@ -226,7 +222,7 @@
disconnect();
} catch (XMLDBException e) {
- throw new SystemException("error.common.storage.xmldb.query",
+ throw new PerfSONARException("error.common.storage.xmldb.query",
"ExistDbXmlrpcXmlStorageManager: Can't perform XUpdate:
"+e.getMessage());
}
@@ -265,7 +261,7 @@
/**
* Connect if required
*/
- private void connect() throws SystemException {
+ private void connect() throws PerfSONARException {
if (!isConnected) {
@@ -278,9 +274,9 @@
/**
* Disconnect if required
- * @throws SystemException
+ * @throws PerfSONARException
*/
- private void disconnect() throws SystemException {
+ private void disconnect() throws PerfSONARException {
if ((isConnected) && (!keepConnection)) {
@@ -297,7 +293,7 @@
/*
* Run query test (XPath/XQuery)
*/
- private static void testQuery(StorageManager storageManager, String
xquery) throws SystemException, RequestException, DataFormatException {
+ private static void testQuery(StorageManager storageManager, String
xquery) throws PerfSONARException {
String[] result = (String[])storageManager.fetch(
xquery);
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileDataRepository.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileDataRepository.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileDataRepository.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,6 +1,6 @@
package org.perfsonar.service.commons.storage.xmlfile;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
public class XmlFileDataRepository implements DataRepository {
@@ -22,10 +22,10 @@
return XML_FILE_TYPE;
}
- public void open() throws SystemException {
+ public void open() throws PerfSONARException {
}
- public void close() throws SystemException {
+ public void close() throws PerfSONARException {
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/commons/storage/xmlfile/XmlFileStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -12,11 +12,10 @@
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+
import org.apache.xpath.domapi.XPathEvaluatorImpl;
import org.perfsonar.commons.util.StringBufferOutputStream;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.DataRepository;
import org.perfsonar.service.commons.storage.StorageManager;
import org.w3c.dom.Document;
@@ -43,12 +42,12 @@
* Accepts XmlFileDataRepository
*/
public void initStorage(DataRepository dataRepository)
- throws SystemException {
+ throws PerfSONARException {
try {
this.dataRepository = (XmlFileDataRepository)dataRepository;
} catch (RuntimeException ex) {
- throw new SystemException("error.common.storage.xml_file.init",
+ throw new
PerfSONARException("error.common.storage.xml_file.init",
"XmlFileStorageManager: not XmlFileDataRepository!");
}
@@ -61,7 +60,7 @@
* @return String[] XML results
*/
public Object fetch(Object dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
//check if string
String xpathQuery = null;
@@ -69,7 +68,7 @@
xpathQuery = (String)dataQuery;
} catch (RuntimeException ex) {
//not a string
- throw new DataFormatException(
+ throw new PerfSONARException(
"XmlFileStorageManager: not a String parameter!");
}
@@ -141,7 +140,7 @@
//XX }
} catch (Exception ex) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.storage.xml_file.fetch",
ex.getMessage());
}
@@ -159,10 +158,9 @@
/**
* UNIMPLEMENTED
*/
- public Object store(Object dataSet) throws SystemException,
- RequestException, DataFormatException {
+ public Object store(Object dataSet) throws PerfSONARException {
- throw new SystemException("not implemented");
+ throw new PerfSONARException("not implemented");
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -3,10 +3,7 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.util.ResultCodesUtil;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
@@ -20,13 +17,13 @@
public final static String
SUPPORTED_EVENT_TYPE="http://schemas.perfsonar.net/tools/admin/echo/ls/2.0";
- public EchoRequestAction(LookupServiceDAO dao) throws SystemException {
+ public EchoRequestAction(LookupServiceDAO dao) throws PerfSONARException
{
super(dao);
}
@Override
public Message performAction(Message request)
- throws SystemException, RequestException, DataFormatException{
+ throws PerfSONARException{
//get metadata to exctract parameters
Metadata metadata = getMetadataFromRequest(request);
@@ -35,13 +32,13 @@
//check eventtype
String eventType = metadata.getEventType().getEventType();
if (!(eventType.equals(SUPPORTED_EVENT_TYPE)))
- throw new SystemException("error.ls.eventtype_not_supported",
+ throw new
PerfSONARException("error.ls.eventtype_not_supported",
"LS EchoRequest error: " +
"Not supported event type ["+eventType+"]. " +
"Must be: ["+SUPPORTED_EVENT_TYPE+"]");
} catch (RuntimeException ex) {
- throw new SystemException("error.ls.no_eventtype",
+ throw new PerfSONARException("error.ls.no_eventtype",
"LS EchoRequest error: " +
"Error while determining eventType (possibly no
eventType at all). " +
"EventType must be ["+SUPPORTED_EVENT_TYPE+"]. " +
@@ -60,7 +57,7 @@
dao.isDBConnectivity(); //returns true if so, or exception
message = message+"Test DB Connection - OK\n";
} catch (PerfSONARException ex) {
- throw new SystemException(
+ throw new PerfSONARException(
ex.getResultCode(),
"LS EchoRequest (Test DB Connection) error: " +
"Database connection to the LookupService is not
established. " +
@@ -84,7 +81,7 @@
dao.isDBCollection(LookupServiceDAO.LS_STORE_CONTROL_COLLECTION_TYPE);
} catch (PerfSONARException ex) {
- throw new SystemException(
+ throw new PerfSONARException(
ex.getResultCode(),
"LS EchoRequest (Test DB Schema) error: " +
"Database connection to the LookupService is not
established or" +
@@ -94,13 +91,13 @@
if (isSchemaStore)
message = message+"Test DB Schema: [LSStore] - OK\n";
- else throw new SystemException(
+ else throw new PerfSONARException(
"error.echo.no_storage_content",
"EchoRequest error: No [LSStore] schema");
if (isSchemaControl)
message = message+"Test DB Schema: [LSStore-control] - OK\n";
- else throw new SystemException(
+ else throw new PerfSONARException(
"error.echo.no_storage_content",
"EchoRequest error: No [LSStore-control] schema");
}
@@ -113,7 +110,7 @@
* Creates success.echo with additional message
*/
protected Message getEcho(Message request, String message)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = new Message();
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -17,7 +17,6 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
/**
@@ -59,7 +58,7 @@
// ------------------------------------------------------------
Constructor
- public LSAction(LookupServiceDAO dao) throws SystemException {
+ public LSAction(LookupServiceDAO dao) throws PerfSONARException {
this.dao = dao;
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSCleanup.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSCleanup.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSCleanup.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,7 +5,6 @@
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import
org.perfsonar.commons.auxiliary.components.simplescheduler.SchedulerAction;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
@@ -49,7 +48,7 @@
* LSCleanup constructor
*/
public LSCleanup(LookupServiceDAO dao)
- throws SystemException {
+ throws PerfSONARException {
super(dao);
@@ -57,7 +56,7 @@
String prop = null;
try {
prop = configuration.getProperty(LS_TTL_PROPERTY);
- } catch (SystemException sex) {
+ } catch (PerfSONARException sex) {
prop=null;
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSCleanupLoader.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSCleanupLoader.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSCleanupLoader.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -7,7 +7,6 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.auxiliary.components.simplescheduler.Scheduler;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
import
org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAOFactory;
@@ -44,25 +43,25 @@
// ------------------------------------------------ public methods
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
try {
logger = (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "Cannot get logger component ";
- throw new SystemException("error.common.no_logger",m);
+ throw new PerfSONARException("error.common.no_logger",m);
}
try {
config = (ConfigurationComponent)
AuxiliaryComponentManager.getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "Cannot get config component ";
- throw new SystemException("error.common.no_configuration", m);
+ throw new PerfSONARException("error.common.no_configuration",
m);
}
//Get configuration
@@ -75,7 +74,7 @@
interval = Integer.parseInt(intervalVal);
} catch (RuntimeException e) {
//possibly not an integer - keep default interval
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
//no property - keep default interval
}
@@ -98,12 +97,12 @@
getComponent(schedulerVal);
if (scheduler==null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ls.no_scheduler",
"No such component in AuxiliaryComponentManager:
"+schedulerVal);
- } catch (SystemException e) {
- throw new SystemException(
+ } catch (PerfSONARException e) {
+ throw new PerfSONARException(
"error.ls.no_scheduler",
"LSCleanupLoader: no [component."+
componentName+".scheduler_component] parameter. "
@@ -124,11 +123,11 @@
// getComponent(daoVal);
if (dao==null)
- throw new SystemException("error.ls.no_dao",
+ throw new PerfSONARException("error.ls.no_dao",
"No such component in AuxiliaryComponentManager");
} catch (PerfSONARException e) {
- throw new SystemException("error.ls.no_dao",
+ throw new PerfSONARException("error.ls.no_dao",
"LSCleanupLoader: no [component."+
componentName+".dao_component] parameter. "
+e.getMessage());
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSDeregisterAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSDeregisterAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSDeregisterAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -3,7 +3,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
@@ -46,7 +45,7 @@
if (requestMetadata==null) {
String m="XmlTypeLSServiceEngine: No metadata in request";
logger.error(m);
- throw new SystemException("error.ls.no_metadata",m);
+ throw new PerfSONARException("error.ls.no_metadata",m);
}
//Get Key from Metadata
@@ -57,7 +56,7 @@
if (keyValue==null) {
String m="XmlTypeLSServiceEngine: No key";
logger.error(m);
- throw new SystemException("error.ls.no_key", m);
+ throw new PerfSONARException("error.ls.no_key", m);
}
int elementsRemoved = dao.removeLookupInfo(keyValue);
@@ -67,7 +66,7 @@
if (elementsRemoved==0)
throw new PerfSONARException("error.ls.key_not_found",
"There were no metadata and data for key
["+keyValue+"]");
- throw new SystemException("success.ls.deregister", "Removed total ["+
+ throw new PerfSONARException("success.ls.deregister", "Removed total
["+
elementsRemoved+"] metadata and data elements for key ["+
keyValue+"]");
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSKeepaliveAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSKeepaliveAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSKeepaliveAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -4,7 +4,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
/**
@@ -48,7 +47,7 @@
if (requestMetadata==null) {
String m="LSKeepaliveAction: No metadata in request";
logger.error(m);
- throw new SystemException("error.ls.no_metadata", m);
+ throw new PerfSONARException("error.ls.no_metadata", m);
}
//Get Key from Metadata
@@ -59,7 +58,7 @@
if (keyValue==null) {
String m="LSKeepaliveAction: No key in metadata";
logger.error(m);
- throw new SystemException("error.ls.no_key", m);
+ throw new PerfSONARException("error.ls.no_key", m);
}
if (dao.isLookupInfo(keyValue)) {
@@ -73,7 +72,7 @@
String m="LSKeepaliveAction: Key ["+keyValue+
"] not found, can't be updated";
logger.error(m);
- throw new SystemException("error.ls.key_not_found", m);
+ throw new PerfSONARException("error.ls.key_not_found", m);
}
//Prepare result code (put it into the response)
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSLookupAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSLookupAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSLookupAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,7 +6,6 @@
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.commons.util.XMLUtils;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
/**
@@ -64,7 +63,7 @@
String m = "XmlTypeLSServiceEngine: LSLookup currently only" +
" supports single Metadata in requst message";
logger.fatal(m);
- throw new SystemException("error.ls.not_supported", m);
+ throw new PerfSONARException("error.ls.not_supported", m);
}
Metadata requestMetadata = mdArray[0];
@@ -81,7 +80,7 @@
String m =
"XmlTypeLSServiceEngine: no eventType in metadata (type of
query)";
logger.fatal(m);
- throw new SystemException("error.ls.no_querytype", m);
+ throw new PerfSONARException("error.ls.no_querytype", m);
}
logger.debug("XmlTypeLSServiceEngine: Query type (EventType) is ["+
@@ -100,7 +99,7 @@
String m = "XmlTypeLSServiceEngine: Query Type specified: ["
+ queryType + "] is not supported";
logger.fatal(m);
- throw new SystemException("error.ls.querytype_not_suported", m);
+ throw new PerfSONARException("error.ls.querytype_not_suported",
m);
}
logger.debug("XmlTypeLSServiceEngine: Query type [" + queryType
+ "] is supported");
@@ -125,7 +124,7 @@
String m =
"XmlTypeLSServiceEngine: no subject (query content) in
metadata";
logger.fatal(m);
- throw new SystemException("error.ls.no_query", m);
+ throw new PerfSONARException("error.ls.no_query", m);
}
//convert query, change > = ">", < = "<".
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSRegisterAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSRegisterAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSRegisterAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -7,7 +7,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
@@ -41,7 +40,7 @@
String prop = null;
try {
prop = configuration.getProperty("service.ls.allow_replace");
- } catch (SystemException ex) { prop=null; }
+ } catch (PerfSONARException ex) { prop=null; }
if (testIfTrue(prop))
allowReplaceIfAlreadyRegistered = true;
else
@@ -65,15 +64,15 @@
if (requestMetadata==null) {
String m="[LS Registration] No metadata in incoming request";
logger.error(m);
- throw new SystemException("error.ls.no_metadata", m);
+ throw new PerfSONARException("error.ls.no_metadata", m);
}
//get accessPoint from Metadata - obligatory element
- //if it's empty or null SystemException will be thrown
+ //if it's empty or null PerfSONARException will be thrown
String accessPoint = getAccessPoint(requestMetadata);
//check other mandatory elements, dont care about results
- //if they're empty or null SystemException will be thrown
+ //if they're empty or null PerfSONARException will be thrown
getServiceName(requestMetadata);
getServiceType(requestMetadata);
@@ -111,7 +110,7 @@
"] not found in the storage. " +
"Can't UPDATE such data, because can't determine what
data should be updated";
logger.debug(m);
- throw new SystemException ("error.ls.update.key_not_found",
m);
+ throw new PerfSONARException
("error.ls.update.key_not_found", m);
}
doRemoveOldKey = true; //remove also old key
@@ -131,7 +130,7 @@
"without or with empty metadata Id (check Key or " +
"accessPoint values)";
logger.error(m);
- throw new SystemException("error.ls.no_key", m);
+ throw new PerfSONARException("error.ls.no_key", m);
}
@@ -158,7 +157,7 @@
String m = "[LS Registration] Can't replace data";
logger.error(m);
- throw new SystemException("error.ls.cant_replace_data", m);
+ throw new PerfSONARException("error.ls.cant_replace_data",
m);
}
@@ -205,10 +204,10 @@
/**
- * Returns serviceType from metadata or throws SystemException if null
or empty
+ * Returns serviceType from metadata or throws PerfSONARException if
null or empty
* @param requestMetadata
* @return service type
- * @throws SystemException if null or empty
+ * @throws PerfSONARException if null or empty
*/
protected String getServiceType(Metadata requestMetadata) throws
PerfSONARException {
@@ -221,17 +220,17 @@
} catch (RuntimeException e) {
String m="[LS Registration] No serviceType in request -
"+e.getMessage();
logger.error(m);
- throw new SystemException("error.ls.no_service_type", m);
+ throw new PerfSONARException("error.ls.no_service_type", m);
}
return serviceType;
}
/**
- * Returns serviceName from metadata or throws SystemException if null
or empty
+ * Returns serviceName from metadata or throws PerfSONARException if
null or empty
* @param requestMetadata
* @return service Name
- * @throws SystemException if null or empty
+ * @throws PerfSONARException if null or empty
*/
protected String getServiceName(Metadata requestMetadata) throws
PerfSONARException {
@@ -244,17 +243,17 @@
} catch (RuntimeException e) {
String m="[LS Registration] No serviceName in request -
"+e.getMessage();
logger.error(m);
- throw new SystemException("error.ls.no_service_name", m);
+ throw new PerfSONARException("error.ls.no_service_name", m);
}
return serviceName;
}
/**
- * Returns accessPoint from metadata or throws SystemException if null
or empty
+ * Returns accessPoint from metadata or throws PerfSONARException if
null or empty
* @param requestMetadata
* @return access point
- * @throws SystemException if null or empty
+ * @throws PerfSONARException if null or empty
*/
protected String getAccessPoint(Metadata requestMetadata)
throws PerfSONARException {
@@ -270,7 +269,7 @@
} catch (RuntimeException e) {
String m="[LS Registration] No access_point in request -
"+e.getMessage();
logger.error(m);
- throw new SystemException("error.ls.no_access_point", m);
+ throw new PerfSONARException("error.ls.no_access_point", m);
}
return accessPoint;
@@ -296,7 +295,7 @@
String m = "[LS Registration] " +
"Request must have at least one data element -
trigger) ";
logger.error(m);
- throw new SystemException("error.ls.no_data_trigger", m);
+ throw new PerfSONARException("error.ls.no_data_trigger", m);
}
//convert dataArr to Data[]
@@ -306,7 +305,7 @@
return dataElements;
} catch (RuntimeException ex) {
- throw new SystemException("error.ls.no_data_trigger",
+ throw new PerfSONARException("error.ls.no_data_trigger",
"error during converting data elements:
"+ex.getMessage());
}
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -11,10 +11,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAO;
import
org.perfsonar.service.lookupService.xmlType.storage.LookupServiceDAOFactory;
@@ -75,7 +72,7 @@
/**
* Construction for the service engine
*/
- public XmlTypeLSServiceEngine() throws SystemException {
+ public XmlTypeLSServiceEngine() throws PerfSONARException {
//get logger
logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -90,7 +87,7 @@
try {
dao = LookupServiceDAOFactory.getDAO();
} catch (PerfSONARException e) {
- throw new SystemException(e.getResultCode(),
e.getResultDescription());
+ throw new PerfSONARException(e.getResultCode(),
e.getResultDescription());
}
this.serviceEngineType = SERVICE_ENGINE_TYPE;
@@ -133,15 +130,14 @@
*
* @return Message object containing the response
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @see org.perfsonar.service.commons.engine.ServiceEngine
*/
- public Message takeAction(String actionType,
- Message request)
- throws SystemException, RequestException, DataFormatException{
+ public Message takeAction(String actionType, Message request)
+ throws PerfSONARException {
//measure time
long t1 = System.currentTimeMillis();
@@ -163,7 +159,7 @@
logger.fatal("XmlTypeLSServiceEngine: ActionType specified: "
+ actionType + " is not supported");
- throw new SystemException("error.ls.action_not_suported",
+ throw new PerfSONARException("error.ls.action_not_suported",
"XmlTypeLSServiceEngine: "
+ "ActionType specified: "+ actionType
+ " is not supported");
@@ -179,7 +175,6 @@
// ------------ serving actions
---------------------------------------
- try { //TODO: temporary try - perfsonar exception
//Take an action
if (actionType.equals(ActionType.LS_REGISTER)) {
@@ -214,7 +209,7 @@
} else {
- throw new SystemException("error.ls.action_not_suported",
+ throw new PerfSONARException("error.ls.action_not_suported",
"XmlTypeLSServiceEngine: Action ["
+actionType+"] not supported");
@@ -230,9 +225,7 @@
//Return Response Message
return response;
-
- } catch (PerfSONARException p) { throw new
SystemException(p.getResultCode(), p.getResultDescription()); } //temporary
-
+
} //takeAction
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.apache.commons.digester.Digester;
import org.apache.commons.digester.xmlrules.DigesterLoader;
@@ -55,7 +55,7 @@
- public EventTypeConfigurationComponent() throws SystemException {
+ public EventTypeConfigurationComponent() throws PerfSONARException {
try {
@@ -64,9 +64,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"EventTypeConfigurationComponent.initComponent: "
+ "Cannot get logger component");
@@ -81,7 +81,7 @@
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
// getting configuration data using commons digester
@@ -96,7 +96,7 @@
if (digesterRulesURL == null) {
logger.debug("EventTypeConfigurationComponent.initComponent: "
+ "Could not find xml config file " + digesterRules);
- throw new SystemException(
+ throw new PerfSONARException(
"error.common",
"EventTypeConfigurationComponent.initComponent: "
+ "Could not find xml config file " + digesterRules);
@@ -113,7 +113,7 @@
if (digesterInputStream == null) {
logger.debug("EventTypeConfigurationComponent.initComponent: "
+ "Could not find xml file " + digesterInput);
- throw new SystemException(
+ throw new PerfSONARException(
"error.common",
"EventTypeConfigurationComponent.initComponent: "
+ "Could not create an input stream of xml config file "
@@ -137,7 +137,7 @@
logger.debug("EventTypeConfigurationComponent.initComponent: "
+ "Could not parse " + digesterInput
+ ": " + ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.common",
"EventTypeConfigurationComponent.initComponent: "
+ "Could not parse " + digesterInput);
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,33 +5,26 @@
package org.perfsonar.service.measurementArchive.metadataConfig;
-import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
+import java.util.Collection;
+import java.util.Map;
+
+import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Element;
+import org.ggf.ns.nmwg.base.v2_0.Key;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-
-import org.perfsonar.service.commons.storage.StorageManager;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.NMWGStorageManager;
-
+import org.perfsonar.service.commons.storage.StorageManager;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
import org.perfsonar.service.commons.storage.xmldb.XmlDbStorageManager;
import org.perfsonar.service.commons.storage.xmldb.exist.ExistDbFactory;
-import org.ggf.ns.nmwg.base.v2_0.Element;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.Key;
-import java.util.Map;
-import java.util.Collection;
-
-
/**
* This class contains methods to manage metadata configuration data.
*
@@ -59,7 +52,7 @@
- public MetadataConfigurationStorageManager() throws SystemException {
+ public MetadataConfigurationStorageManager() throws PerfSONARException {
try {
@@ -68,9 +61,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"MetadataConfigurationStorageManager.constructor: "
+ "Cannot get logger component");
@@ -84,9 +77,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"MetadataConfigurationStorageManager.constructor: "
+ "Cannot get config component");
@@ -107,7 +100,7 @@
// --- methods from NMWGStorageManager interface
- public void initStorage(Key dataRepository) throws SystemException {
+ public void initStorage(Key dataRepository) throws PerfSONARException {
this.existDbXmlStorageManager = getStorageManager();
@@ -115,7 +108,7 @@
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message message = new Message();
@@ -130,7 +123,7 @@
// if query is an empty string then the method returns empty message
if (query.trim() == "")
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"MetadataConfigurationStorageManager.fetch: "
+ "Empty query to get data from the metadata
configuration");
@@ -143,14 +136,14 @@
logger.error("MetadataConfigurationStorageManager.fetch: "
+ "Connection to xml database failed: "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.storage.xmldb",
"MetadataConfigurationStorageManager.fetch: "
+ "Connection to xml database failed");
}
String[] xmlResults = (String[]) object;
if (xmlResults == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma",
"MetadataConfigurationStorageManager.fetch: "
+ "Result array of metadata search in null");
@@ -162,14 +155,14 @@
if (xmlResults.length == 0)
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.metadata_configuration",
"MetadataConfigurationStorageManager.fetch: "
+ "No metadata in the metadata configuration");
if (xmlResults.length == 1)
if (xmlResults[0].trim().equals(""))
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.metadata_configuration",
"MetadataConfigurationStorageManager.fetch: "
+ "No metadata in the metadata configuration");
@@ -192,7 +185,7 @@
transformations.transformResults(xmlResult, tagNames);
if (elements == null)
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.metadata_configuration",
"MetadataConfigurationStorageManager.fetch: "
+ "No metadata or data elements in the fetch result "
@@ -212,7 +205,7 @@
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Data data = (Data) dataSet.getDataArray()[0];
@@ -220,7 +213,7 @@
if (data == null) {
logger.error("MetadataConfigurationStorageManager.store: "
+ "No data element to store");
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"MetadataConfigurationStorageManager.store: "
+ "No data block in the message to store data");
@@ -246,7 +239,7 @@
logger.error("MetadataConfigurationStorageManager.store: "
+ " No metadata block to store refering to "
+ data.getMetadataIdRef());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"MetadataConfigurationStorageManager.store: "
+ "No metadata block in the message to store refering to
"
@@ -280,7 +273,7 @@
protected XmlDbStorageManager getStorageManager()
- throws SystemException {
+ throws PerfSONARException {
String xmldbAccess = "http";
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,9 +10,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.storage.NMWGStorageManager;
@@ -84,7 +82,7 @@
- public SimpleMetadataConfigurationStorageManager() throws
SystemException {
+ public SimpleMetadataConfigurationStorageManager() throws
PerfSONARException {
try {
@@ -94,9 +92,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"SimpleMetadataConfigurationStorageManager.constructor: "
+ "Cannot get logger component");
@@ -110,9 +108,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"SimpleMetadataConfigurationStorageManager.constructor: "
+ "Cannot get config component");
@@ -133,7 +131,7 @@
// --- methods from NMWGStorageManager interface
- public void initStorage(Key dataRepository) throws SystemException {
+ public void initStorage(Key dataRepository) throws PerfSONARException {
if (dataRepository == null)
this.xmlFile = configuration.getProperty("service.ma.conf_file");
@@ -148,7 +146,7 @@
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message message = new Message();
@@ -194,7 +192,7 @@
transformations.transformResults(output, tagNames);
if (elements == null)
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.metadata_configuration",
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "No metadata in metadata configuration file");
@@ -220,7 +218,7 @@
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "Unable to complete xquery/xpath query; "
+ xpex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.fetching",
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "Unable to complete xquery/xpath query; "
@@ -232,7 +230,7 @@
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "Unable to complete fetch operation; "
+ ioex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.fetching",
"SimpleMetadataConfigurationStorageManager.fetch: "
+ "Unable to complete fetch operation; "
@@ -246,13 +244,13 @@
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
// This method is not implemented in
SimpleMetadataConfigurationStorageManager
// class. If you want this functionality you must take
RRDConfigurationStorageManager
// and configure xml db (eXist).
- throw new SystemException(
+ throw new PerfSONARException(
"warning.ma.writing",
"SimpleMetadataConfigurationStorageManager.store: "
+ "Writing is not supported");
@@ -284,7 +282,7 @@
public SequenceIterator getQueryResult(
- String query, Configuration saxonConfig) throws SystemException {
+ String query, Configuration saxonConfig) throws PerfSONARException {
StaticQueryContext staticContext = new
StaticQueryContext(saxonConfig);
SequenceIterator elements = null;
@@ -303,7 +301,7 @@
"SimpleMetadataConfigurationStorageManager.getQueryResult: "
+ "Unable to complete xquery/xpath query; "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.fetching",
"SimpleMetadataConfigurationStorageManager.getQueryResult: "
+ "Unable to complete xquery/xpath query; "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,23 +5,17 @@
package org.perfsonar.service.measurementArchive.metadataConfig;
-import org.perfsonar.commons.util.XMLUtils;
-
import java.util.Map;
+import org.ggf.ns.nmwg.base.v2_0.Element;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
-import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
-
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.commons.util.XMLUtils;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-
-import org.ggf.ns.nmwg.base.v2_0.Element;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-
import
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.MetadataQueryGenerator;
import
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.MetadataQueryGeneratorFactory;
@@ -51,7 +45,7 @@
- public Transformations() throws SystemException {
+ public Transformations() throws PerfSONARException {
try {
@@ -60,9 +54,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"Transformations.constructor: "
+ "Cannot get logger component");
@@ -76,9 +70,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"Transformations.constructor: "
+ "Cannot get config component");
@@ -98,7 +92,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException {
//logger.debug("Transformations.getMetadataQuery: "
@@ -106,7 +100,7 @@
if (query == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"Transformations.getMetadataQuery: "
+ "Input message is null");
@@ -120,7 +114,7 @@
logger.error("Transformations.getMetadataQuery: "
+ "Unable to get metadata from message; "
+ ex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"Transformations.getMetadataQuery: "
+ "Unable to get metadata from message; "
@@ -135,7 +129,7 @@
eventType =
(metadata.getEventType() != null ?
metadata.getEventType().getEventType().trim() : "");
} catch (NullPointerException npex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"Transformations.getMetadataQuery: "
+ "eventType in the request is null");
@@ -143,7 +137,7 @@
} else {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"Transformations.getMetadataQuery: "
+ "metadata is missing in the request");
@@ -163,7 +157,7 @@
} catch (PerfSONARException pex) {
- throw new SystemException(pex.getResultCode(), pex.getMessage());
+ throw new PerfSONARException(pex.getResultCode(),
pex.getMessage());
} catch (Exception ex) {
@@ -172,7 +166,7 @@
+ "for the metadata configuration "
+ "from the request metadata. "
+ ex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"Unable to generate xquery statement "
+ "for the metadata configuration "
@@ -190,13 +184,13 @@
* Returns nmwg objects with specific tag names parsed from xml string
*/
public Map<String, Element> transformResults(String xmlPart, String[]
tagNames)
- throws SystemException {
+ throws PerfSONARException {
String f = "";
try {
f = configuration.getProperty("service.sax_parser.config");
- } catch (SystemException sex) {
- throw new SystemException(
+ } catch (PerfSONARException sex) {
+ throw new PerfSONARException(
"error.common.configuration",
"Transformations.transformResults: "
+ "Unable to read service.sax_parser.config property
properly");
@@ -208,7 +202,7 @@
public String serializeXML(Element element)
- throws SystemException {
+ throws PerfSONARException {
return XMLUtils.serializeXML(element);
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,24 +5,17 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
-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;
-import org.perfsonar.service.commons.exceptions.RequestException;
-
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Subject;
-
+import org.ggf.ns.nmwg.topology.base.v3_0.Node;
import org.ggf.ns.nmwg.topology.l2.v3_0.Link;
-import org.ggf.ns.nmwg.topology.l2.v3_0.GlobalName;
+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.PerfSONARException;
-import org.ggf.ns.nmwg.topology.base.v3_0.Node;
-
/**
* Transforms nmwg message into xquery/xpath
* (query to fetch metadata with L2 path status metric)
@@ -45,7 +38,7 @@
- public L2PathStatusQueryGenerator() throws SystemException {
+ public L2PathStatusQueryGenerator() throws PerfSONARException {
try {
@@ -54,9 +47,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"L2PathStatusQueryGenerator.constructor: "
+ "Cannot get logger component");
@@ -76,7 +69,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException {
Metadata metadata = null;
@@ -88,7 +81,7 @@
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from message; "
+ ex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from message; "
@@ -209,7 +202,7 @@
logger.error(
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "No node element(s) in the request metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "No node element(s) in the request metadata");
@@ -218,7 +211,7 @@
logger.error(
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "0 or more than 2 node element(s) in the request
metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGenerator.getMetadataQuery: "
+ "0 or more than 2 node element(s) in the request
metadata");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,24 +5,17 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
-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;
-import org.perfsonar.service.commons.exceptions.RequestException;
-
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Subject;
-
+import org.ggf.ns.nmwg.topology.base.v3_0.Node;
import org.ggf.ns.nmwg.topology.l2.v3_0.Link;
-import org.ggf.ns.nmwg.topology.l2.v3_0.GlobalName;
+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.PerfSONARException;
-import org.ggf.ns.nmwg.topology.base.v3_0.Node;
-
/**
* Transforms nmwg message into xquery/xpath
* (query to fetch metadata with L2 path status metric).
@@ -48,7 +41,7 @@
- public L2PathStatusQueryGeneratorTMP() throws SystemException {
+ public L2PathStatusQueryGeneratorTMP() throws PerfSONARException {
try {
@@ -57,9 +50,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"L2PathStatusQueryGeneratorTMP.constructor: "
+ "Cannot get logger component");
@@ -79,7 +72,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException{
Metadata metadata = null;
@@ -91,7 +84,7 @@
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "Unable to get metadata from message; "
+ ex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "Unable to get metadata from message; "
@@ -212,7 +205,7 @@
logger.error(
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "No node element(s) in the request metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "No node element(s) in the request metadata");
@@ -221,7 +214,7 @@
logger.error(
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "0 or more than 2 node element(s) in the request
metadata");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"L2PathStatusQueryGeneratorTMP.getMetadataQuery: "
+ "0 or more than 2 node element(s) in the request
metadata");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,9 +5,9 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
import org.ggf.ns.nmwg.base.v2_0.Message;
@@ -25,7 +25,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException;
+ throws PerfSONARException;
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementArchive.eventTypeConfig.EventType;
import
org.perfsonar.service.measurementArchive.eventTypeConfig.EventTypeConfigurationComponent;
@@ -31,7 +31,7 @@
* in order to fetch relevant metadata configuration.
*/
public static MetadataQueryGenerator getMetadataQueryGenerator(String
eventTypeName)
- throws SystemException {
+ throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
@@ -50,7 +50,7 @@
eventTypeConfigurationComponent.getEventType(eventTypeName);
if (eventType == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "eventType " + eventTypeName + " is not supported");
@@ -64,7 +64,7 @@
// + className);
if (className == null || className.trim().equals(""))
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "Could not find class name for eventType "
@@ -86,7 +86,7 @@
+ "Unable to create an object of : "
+ className + ": "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "Unable to create an object of "
@@ -101,7 +101,7 @@
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "Could not create a metadataQueryGenerator object for "
+ "eventType: " + eventTypeName);
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"MetadataQueryGeneratorFactory.getMetadataQueryGenerator: "
+ "Could not create a metadataQueryGenerator for "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/OwampQueryGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,26 +1,19 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.ggf.ns.nmwg.base.v2_0.Parameter;
+import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.ggf.ns.nmwg.tools.owamp.v2_0.Subject;
+import org.ggf.ns.nmwg.topology.v2_0.EndPointPair;
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.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Parameters;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;
-import org.ggf.ns.nmwg.topology.v2_0.EndPointPair;
-import org.ggf.ns.nmwg.topology.v2_0.Dst;
-import org.ggf.ns.nmwg.topology.v2_0.Src;
-
-import org.ggf.ns.nmwg.tools.owamp.v2_0.Subject;
-
-
-
/**
* Transforms nmwg message into xquery/xpath
* (query to fetch metadata with owamp data)
@@ -45,7 +38,7 @@
- public OwampQueryGenerator() throws SystemException {
+ public OwampQueryGenerator() throws PerfSONARException {
try {
@@ -53,9 +46,9 @@
AuxiliaryComponentManager.
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"OwampQueryGenerator.constructor: "
+ "Cannot get logger component");
@@ -75,11 +68,11 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException, PerfSONARException {
if (query == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"OwampQueryGenerator.getMetadataQuery: "
+ "Input message is null");
@@ -98,7 +91,7 @@
logger.error(
"OwampQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from the message");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"OwampQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from the message; "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -5,20 +5,17 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.ggf.ns.nmwg.characteristic.utilization.v2_0.Subject;
+import org.ggf.ns.nmwg.topology.v2_0.Interface;
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.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.topology.v2_0.Interface;
-import org.ggf.ns.nmwg.characteristic.utilization.v2_0.Subject;
-
-
/**
* Transforms nmwg message into xquery/xpath
* (query to fetch metadata with utilization metric)
@@ -41,7 +38,7 @@
- public UtilizationQueryGenerator() throws SystemException {
+ public UtilizationQueryGenerator() throws PerfSONARException {
try {
@@ -49,9 +46,9 @@
AuxiliaryComponentManager.
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"UtilizationQueryGenerator.constructor: "
+ "Cannot get logger component");
@@ -71,7 +68,7 @@
* stored in Message object.
*/
public String getMetadataQuery(Message query)
- throws SystemException, RequestException {
+ throws PerfSONARException {
//logger.debug("UtilizationQueryGenerator.getMetadataQuery: "
@@ -98,7 +95,7 @@
logger.error(
"UtilizationQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from the message");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"UtilizationQueryGenerator.getMetadataQuery: "
+ "Unable to get metadata from the message; "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,7 +6,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
@@ -14,10 +13,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.auxiliary.components.simplescheduler.Scheduler;
import
org.perfsonar.commons.auxiliary.components.simplescheduler.SchedulerAction;
-
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
import
org.perfsonar.service.commons.registration.GenericServiceLSRegistrator;
import
org.perfsonar.service.commons.registration.InformationXMLFileServiceContent;
import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
@@ -68,7 +64,7 @@
- public LSRegistrationComponent() throws SystemException {
+ public LSRegistrationComponent() throws PerfSONARException {
try {
@@ -77,9 +73,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"LSRegistrationComponent.initComponent: "
+ "Cannot get logger component");
@@ -94,9 +90,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"LSRegistrationComponent.initComponent: "
+ "Cannot get config component");
@@ -162,7 +158,7 @@
// ---------------------- component that loads action to scheduler
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
//Get configuration
@@ -177,7 +173,7 @@
} catch (RuntimeException e) {
//possibly not an integer - keep default interval
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
//no property - keep default interval
}
@@ -204,13 +200,13 @@
getComponent(schedulerVal);
if (scheduler == null)
- throw new SystemException("error.rrdma.no_scheduler",
+ throw new PerfSONARException("error.rrdma.no_scheduler",
"LSRegistrationComponent.initComponent: "
+ "No scheduler component in
AuxiliaryComponentManager");
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException("error.rrdma.no_scheduler",
+ throw new PerfSONARException("error.rrdma.no_scheduler",
"LSRegistrationComponent.initComponent:"
+ "LSCleanupLoader: no [component."
+ componentName + ".scheduler_component] parameter. "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/BaseChainingMergerFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/BaseChainingMergerFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/BaseChainingMergerFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -16,7 +16,7 @@
import org.perfsonar.commons.messages.BaseChaining;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementArchive.eventTypeConfig.EventType;
import
org.perfsonar.service.measurementArchive.eventTypeConfig.EventTypeConfiguration;
@@ -34,7 +34,7 @@
public static Set getBaseChainingMergers()
- throws SystemException {
+ throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
AuxiliaryComponentManager.
@@ -53,7 +53,7 @@
eventTypeConfigurationComponent.getEventTypeConfiguration();
if (eventTypeConfiguration == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.configuration",
"BaseChainingMergerFactory.getBaseChainingMerger: "
+ "eventTypeConfiguration object is null. "
@@ -86,7 +86,7 @@
+ "Unable to create an object of : "
+ className + ": "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"BaseChainingMergerFactory.getBaseChainingMerger: "
+ "Unable to create an object of "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/NMWGInterfaceBaseChaining.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/NMWGInterfaceBaseChaining.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/NMWGInterfaceBaseChaining.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -27,7 +27,7 @@
import org.perfsonar.commons.messages.BaseChaining;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -44,7 +44,7 @@
- public NMWGInterfaceBaseChaining() throws SystemException {
+ public NMWGInterfaceBaseChaining() throws PerfSONARException {
super();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -14,10 +14,9 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Key;
@@ -98,7 +97,7 @@
- public RRDStorageManager() throws SystemException {
+ public RRDStorageManager() throws PerfSONARException {
try {
@@ -108,9 +107,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"RRDStorageManager.constructor: "
+ "Cannot get logger component");
@@ -124,9 +123,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"RRDStorageManager.constructor: "
+ "Cannot get config component");
@@ -142,7 +141,7 @@
public void initStorage(Key dataRepository)
- throws SystemException {
+ throws PerfSONARException {
//do nothing
@@ -158,14 +157,14 @@
*
* @return Message object containing the data.
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @author romradz
*/
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message data = this.rrdFetch(dataQuery);
return data;
@@ -184,14 +183,14 @@
*
* @return Message object containing the request, if the update was
successful
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @author loukik
*/
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
// find out the filename from the given dataSet
@@ -222,7 +221,7 @@
"for storage do not contain a key. Key is necessary to
identify" +
"the file where data should be stored. Cannot continue
with storage");
- throw new SystemException("RRDStorageManager.store: Storage
manager cannot store" +
+ throw new PerfSONARException("RRDStorageManager.store: Storage
manager cannot store" +
"data into any rrd file as no rrd file was specified in
the data store request." +
"Such specifications are present in the key element and
no key element was found");
}
@@ -241,7 +240,7 @@
"for storage do not contain a key. Key is necessary to
identify" +
"the file where data should be stored. Cannot continue
with storage");
- throw new SystemException("RRDStorageManager.store: Storage
manager cannot store" +
+ throw new PerfSONARException("RRDStorageManager.store: Storage
manager cannot store" +
"data into any rrd file as no rrd file was specified in
the data store request." +
"Such specifications are present in the key element and
no key element was found");
@@ -255,7 +254,7 @@
try {
this.createRRDFile(dataSet);
}
- catch (SystemException se) {
+ catch (PerfSONARException se) {
throw se;
}
catch (Exception e) {
@@ -263,7 +262,7 @@
"while creating new file: " + fileName + "
Exception: " +
e.getMessage());
- throw new SystemException("RRDStorageManager.store: Unknown
exception caught " +
+ throw new PerfSONARException("RRDStorageManager.store:
Unknown exception caught " +
"while creating new file " + fileName + " Exception:
" + e.getMessage());
}
@@ -293,17 +292,17 @@
*
* @return Message object containing the data.
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @author romradz
*/
protected Message rrdFetch(Message query)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
if (query == null)
- throw new RequestException(
+ throw new PerfSONARException (
"error.ma.query",
"RRDStorageManager.rrdFetch: Query message is null");
@@ -350,16 +349,16 @@
try {
_startTime = TimeDateUtil.getUnixTime(startTime);
- } catch (DataFormatException dfex) {
- throw new DataFormatException(dfex.getResultCode(),
dfex.getMessage());
+ } catch (PerfSONARException dfex) {
+ throw new PerfSONARException(dfex.getResultCode(),
dfex.getMessage());
} catch (Exception ex) {
;
}
try {
_endTime = TimeDateUtil.getUnixTime(endTime);
- } catch (DataFormatException dfex) {
- throw new DataFormatException(dfex.getResultCode(),
dfex.getMessage());
+ } catch (PerfSONARException dfex) {
+ throw new PerfSONARException(dfex.getResultCode(),
dfex.getMessage());
} catch (Exception ex) {
;
}
@@ -505,7 +504,7 @@
logger.error("RRDStorageManager.rrdFetch: "
+ "Cannot retrieve data from rrdjtool library: "
+ se.getMessage());
- throw new SystemException(
+ throw new PerfSONARException(
"error.rrdma.rrdjtool",
"RRDStorageManager.rrdFetch: "
+ "Cannot retrieve data from rrdjtool library: "
@@ -516,7 +515,7 @@
logger.error("RRDStorageManager.rrdFetch: "
+ "Cannot connect with rrdjtool native library: "
+ ule.getMessage());
- throw new SystemException(
+ throw new PerfSONARException(
"error.rrdma.rrdjtool",
"RRDStorageManager.rrdFetch: "
+ "Cannot connect with rrdjtool native library: "
@@ -606,7 +605,7 @@
* @author mac
*/
private Data getRRDColumn(FetchData data, String dataSource, String
valueUnits)
- throws DataFormatException {
+ throws PerfSONARException {
int rows = data.getRowCount();
int cols = data.getColCount();
@@ -642,7 +641,7 @@
} else {
- throw new DataFormatException(
+ throw new PerfSONARException(
"error.rrdma.rrd_file",
"RRDStorageManager.getRRDColumn: "
+ "No " + dataSource + " column/data source in RRD
file");
@@ -660,11 +659,11 @@
* to create a new file
*
* @return true if file was created
- * @throws SystemException
+ * @throws PerfSONARException
*
* @author loukik
*/
- private boolean createRRDFile(Message request) throws SystemException {
+ private boolean createRRDFile(Message request) throws PerfSONARException
{
Map metadataMap = request.getMetadataMap();
@@ -715,7 +714,7 @@
+ dsTypeDefault);
else {
logger.fatal("RRDStorageManager.createRRDFile: config read a
null property for RRD_DS_Type_Default ?");
- throw new SystemException("RRDStorageManager: createRRDFile:
System configuration error. " +
+ throw new PerfSONARException("RRDStorageManager: createRRDFile:
System configuration error. " +
"Creating a new rrd file requires reading ds
default type from config file. " +
"This information is missing");
}
@@ -751,7 +750,7 @@
logger.fatal("RRDStorageManager.createRRDFile: could not create
rrd file " +
"because filename information could not be found in
request");
- throw new SystemException("RRDStorageManager.createRRDFile:
could not create rrd file " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
could not create rrd file " +
"because filename information could not be found in
request");
}
@@ -768,7 +767,7 @@
logger.fatal("RRDStorageManager.createRRDFile: could not create
rrd file " +
"because 'step' parameter information is missing");
- throw new SystemException("RRDStorageManager.createRRDFile:
could not create rrd file " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
could not create rrd file " +
"because 'step' parameter information is
missing");
}
@@ -780,7 +779,7 @@
logger.fatal("RRDStorageManager.createRRDFile: could not create
rrd file " +
"because 'data source' information is missing");
- throw new SystemException("RRDStorageManager.createRRDFile:
could not create rrd file " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
could not create rrd file " +
"because 'data source' information is
missing");
}
@@ -800,7 +799,7 @@
logger.fatal("RRDStorageManager.createRRDFile: could not create
rrd file " +
"because 'RRA (Round Robin Archive)' information is
missing");
- throw new SystemException("RRDStorageManager.createRRDFile:
could not create rrd file " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
could not create rrd file " +
"because 'RRA (Round Robin Archive)'
information is missing");
}
@@ -828,7 +827,7 @@
logger.fatal("RRDStorageManager.createRRDFile: command given
was: " + command);
- throw new SystemException("RRDStorageManager.createRRDFile: " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile: "
+
"RRDTool could not create RRD file with the
configured parameters " +
"and filename: " + fileName + ".
RrdException was encountered." +
" Message:" + e.getMessage());
@@ -843,7 +842,7 @@
logger.fatal("RRDStorageManager.createRRDFile: command given
was: " + command);
- throw new SystemException("RRDStorageManager.createRRDFile:
Error encountered " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:
Error encountered " +
"while creating rrd file for the given
filename:"+fileName+" and" +
"configured parameters. Message:
"+e.getMessage());
@@ -863,7 +862,7 @@
logger.fatal("RRDStorageManager.createRRDFile: Unknown error
occurred while " +
"creating rrd file");
- throw new SystemException("RRDStorageManager.createRRDFile: " +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile: "
+
"Unknown error occurred while creating
rrd file. " +
"Request could not be completed");
@@ -880,7 +879,7 @@
*
* @author loukik
*/
- private boolean updateRRDFile(Message request) throws SystemException {
+ private boolean updateRRDFile(Message request) throws PerfSONARException
{
String fileName = "";
String dataSource = "";
@@ -1115,7 +1114,7 @@
logger.fatal("RRDStorageManager.updateRRDFile: could not update
rrd file " +
"because filename information could not be found in
request");
- throw new SystemException("RRDStorageManager.updateRRDFile:
could not update rrd file " +
+ throw new PerfSONARException("RRDStorageManager.updateRRDFile:
could not update rrd file " +
"because filename information could not
be found in request");
}
@@ -1137,7 +1136,7 @@
logger.fatal("RRDStorageManager.updateRRDFile: could not update
rrd file " +
"because data-source information could not be found in
request");
- throw new SystemException("RRDStorageManager.updateRRDFile:
could not update rrd file " +
+ throw new PerfSONARException("RRDStorageManager.updateRRDFile:
could not update rrd file " +
"because data-source information could
not be found in request");
}
@@ -1170,7 +1169,7 @@
" and datasource: " + dataSource + " with the given
data." +
" Message: " + e.getMessage());
- throw new SystemException("RRDStorageManager.createRRDFile:" +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:" +
" could not update rrd file: " + fileName + " " +
" and datasource: " + dataSource +" with the given.
RrdException " +
" was encountered. Message: " + e.getMessage());
@@ -1183,7 +1182,7 @@
" and datasource: " + dataSource + " with the given
data."+
" Message: " + e.getMessage());
- throw new SystemException("RRDStorageManager.createRRDFile:" +
+ throw new PerfSONARException("RRDStorageManager.createRRDFile:" +
" could not update rrd file: " + fileName+
" and datasource: " + dataSource + " with the given.
Unknown Exception" +
" was encountered. Message: " + e.getMessage());
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/rrdType/RRDTypeMAServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,43 +6,31 @@
import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
import java.util.Map;
-import java.util.HashMap;
+import java.util.Random;
import java.util.Set;
-import java.util.Iterator;
import java.util.Vector;
-import java.util.Random;
-import java.util.Date;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.Datum;
import org.ggf.ns.nmwg.base.v2_0.Key;
-import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
-
-import org.perfsonar.service.commons.storage.NMWGStorageManager;
-import
org.perfsonar.service.measurementArchive.metadataConfig.MetadataConfigurationStorageManager;
-import
org.perfsonar.service.measurementArchive.metadataConfig.SimpleMetadataConfigurationStorageManager;
-
-import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
+import org.ggf.ns.nmwg.base.v2_0.Parameters;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
+import org.perfsonar.commons.messages.BaseChaining;
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
-
-import org.perfsonar.commons.messages.BaseChaining;
-
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-
+import org.perfsonar.service.commons.storage.NMWGStorageManager;
import org.perfsonar.service.commons.util.ResultCodesUtil;
+import
org.perfsonar.service.measurementArchive.metadataConfig.MetadataConfigurationStorageManager;
+import
org.perfsonar.service.measurementArchive.metadataConfig.SimpleMetadataConfigurationStorageManager;
/**
@@ -97,9 +85,9 @@
/**
* Construction for the service engine
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public RRDTypeMAServiceEngine() throws SystemException {
+ public RRDTypeMAServiceEngine() throws PerfSONARException {
this.serviceEngineType = "service.MeasurementArchive.RRDType";
@@ -111,9 +99,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"RRDTypeMAServiceEngine.constructor: "
+ "Cannot get logger component");
@@ -127,9 +115,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"RRDTypeMAServiceEngine.constructor: "
+ "Cannot get config component");
@@ -184,14 +172,14 @@
* @param Message object containing the request
* @return Message object containing the response
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @see org.perfsonar.service.commons.engine.ServiceEngine
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
logger.debug("RRDTypeMAServiceEngine.takeAction: "
+ "Received a request of type - "
@@ -256,7 +244,7 @@
"RRDTypeMAServiceEngine.takeAction: ActionType specified: "
+ actionType + " is not supported");
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.action",
"RRDTypeMAServiceEngine: "
+ "ActionType specified: "
@@ -305,12 +293,12 @@
* @param Message object containing the request
* @return Message object containing the response with a key
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
protected Message getKey(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
// process the base chaining
request = messageProcess(request);
@@ -333,7 +321,7 @@
} catch (NullPointerException npex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"RRDTypeMAServiceEngine.getKey: "
+ "getting the key is impossible "
@@ -368,10 +356,10 @@
* @param Message object to be processed
* @return Message processed message object
*
- * @throws SystemException
+ * @throws PerfSONARException
*/
protected Message messageProcess(Message message)
- throws SystemException {
+ throws PerfSONARException {
Set baseChainingMergers =
BaseChainingMergerFactory.getBaseChainingMergers();
@@ -397,7 +385,7 @@
/**
* Method used in getKey method. Helps to find a key for a request
message.
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
@@ -406,7 +394,7 @@
Map metadataMap,
Message message,
NMWGStorageManager metadataConfig)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
if (metadata.getSubject() != null ) {
@@ -523,12 +511,12 @@
* @param Message object containing the request
* @return Message object containing the response with measurement data
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
protected Message getData(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = new Message();
@@ -582,19 +570,19 @@
* is switched on in the service
* @return Message object containing the response
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
protected Message storeData(Message request, boolean status)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = new Message();
if (status == false) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.rrd.writing",
"RRDTypeMAServiceEngine.storeData: "
+ "Writing data or xmldb is switched off in the MA "
@@ -620,7 +608,7 @@
} catch (NullPointerException npex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"RRDTypeMAServiceEngine.storeData: "
+ "getting the store key is impossible "
@@ -659,12 +647,12 @@
/**
* Returns a key for the request with data to be stored in MA.
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*/
protected Key getStoreKey(Metadata metadata)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Key key = metadata.getKey();
@@ -676,13 +664,13 @@
Parameter dataSource = key.getParameterByName("dataSource");
if (file == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.rrdrrd_file",
"RRDTypeMAServiceEngine.getStoreKey: "
+ "No parameter in the key representing rrd file
name");
if (dataSource == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.rrdrrd_file",
"RRDTypeMAServiceEngine.getStoreKey: "
+ "No parameter in the key representing data source "
@@ -698,23 +686,13 @@
Message resp = null;
try {
resp = metadataConfig.fetch(query);
- } catch (SystemException sex) {
+ } catch (PerfSONARException sex) {
if
(sex.getResultCode().equals("warning.ma.metadata_configuration"))
resp = new Message();
else
- throw new SystemException(
- sex.getResultCode(),
- sex.getResultDescription());
- } catch (RequestException rex) {
- throw new RequestException(
- rex.getResultCode(),
- rex.getResultDescription());
- } catch (DataFormatException dfex) {
- throw new DataFormatException(
- dfex.getResultCode(),
- dfex.getResultDescription());
+ throw sex;
} catch (Exception ex) {
- throw new SystemException(
+ throw new PerfSONARException(
"uknown",
"RRDTypeMAServiceEngine.getStoreKey: "
+ "Something wrong has happened during fetching data
"
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLStorageManager.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -34,10 +34,8 @@
import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.base.v2_0.Parameters;
+
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import
org.perfsonar.service.measurementArchive.sqlType.fetch.ResponseGenerator;
import
org.perfsonar.service.measurementArchive.sqlType.fetch.ResponseGeneratorFactory;
@@ -66,7 +64,7 @@
- public SQLStorageManager() throws SystemException {
+ public SQLStorageManager() throws PerfSONARException {
try {
@@ -75,9 +73,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"SQLStorageManager.constructor: "
+ "Cannot get logger component");
@@ -93,7 +91,7 @@
public void initStorage(Key dataRepository)
- throws SystemException {
+ throws PerfSONARException {
//do nothing
@@ -101,11 +99,11 @@
public Message fetch(Message dataQuery)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
if (dataQuery == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.fetch: "
+ "Query message is null");
@@ -139,7 +137,7 @@
try {
startTime = Long.parseLong(pvalue);
} catch (NumberFormatException nfex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.fetch: "
+ "startTime parameter in the request "
@@ -153,7 +151,7 @@
try {
endTime = Long.parseLong(pvalue);
} catch (NumberFormatException nfex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.fetch: "
+ "endTime parameter in the request "
@@ -189,7 +187,7 @@
resultList = sqlMap.queryForList("getResults2",
ibatisParams);
} else {
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.fetch: "
+ "Uknown value of time parameter in the
request");
@@ -217,7 +215,7 @@
logger.error("SQLStorageManager.fetch: Unable to fetch data:
"
+ ioex.toString());
- throw new RequestException(
+ throw new PerfSONARException(
"error.sqlma.db_connection",
"SQLStorageManager.fetch: Unable to fetch data"
);
@@ -235,10 +233,10 @@
public Message store(Message dataSet)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
if (dataSet == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLStorageManager.store: Input request is null");
@@ -267,13 +265,13 @@
String ibatisConfig = (String) ibatisParams.get("ibatisConfig");
if (ibatisConfig == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.sqlma.db_connection.ibatis",
"SQLStorageManager.store: "
+ "No ibatisConfig parameter in the key");
if (ibatisConfig.trim() == "")
- throw new RequestException(
+ throw new PerfSONARException(
"error.sqlma.db_connection.ibatis",
"SQLStorageManager.store: "
+ "Empty ibatisConfig parameter in the key");
@@ -297,7 +295,7 @@
} catch (Exception ioex) {
- throw new RequestException(
+ throw new PerfSONARException(
"error.sqlma.db_connection",
"SQLStorageManager.store: Problem generated by
ibatis: "
+ ioex.toString());
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/SQLTypeMAServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,25 +6,20 @@
import java.util.Collection;
+import java.util.Date;
import java.util.Map;
import java.util.Random;
-import java.util.Date;
-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.EventType;
import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.Datum;
+import org.ggf.ns.nmwg.base.v2_0.EventType;
import org.ggf.ns.nmwg.base.v2_0.Key;
-import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.ggf.ns.nmwg.base.v2_0.Message;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
-
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
-import
org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine;
+import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import
org.perfsonar.service.measurementArchive.metadataConfig.MetadataConfigurationStorageManager;
+import
org.perfsonar.service.measurementArchive.rrdType.RRDTypeMAServiceEngine;
/**
* Class implementing the Measurement Archive Service Engine which deals
with
@@ -44,7 +39,7 @@
- public SQLTypeMAServiceEngine() throws SystemException {
+ public SQLTypeMAServiceEngine() throws PerfSONARException {
super();
serviceEngineType = "service.MeasurementArchive.SQLType";
@@ -61,7 +56,7 @@
public Message takeAction(String actionType, Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = super.takeAction(actionType, request);
@@ -76,7 +71,7 @@
protected Message getKey(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message keyMessage = super.getKey(request);
return keyMessage;
@@ -85,7 +80,7 @@
protected Message getData(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = new Message();
@@ -142,7 +137,7 @@
protected Message storeData(Message request, boolean status)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
//logger.debug("SQLTypeMAServiceEngine.storeData: start method");
@@ -152,7 +147,7 @@
if (status == false) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.writing",
"SQLTypeMAServiceEngine.storeData: "
+ "Writing data is switched off in the MA "
@@ -195,7 +190,7 @@
protected Key getStoreKey(Metadata metadata)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Key key = metadata.getKey();
@@ -207,14 +202,14 @@
Parameter ibatisConfig = key.getParameterByName("ibatisConfig");
if (ibatisConfig == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No ibatisConfig parameter in the key");
Parameter eventType = key.getParameterByName("eventType");
if (eventType == null)
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No eventType parameter in the key");
@@ -225,13 +220,13 @@
EventType eventTypeObj = metadata.getEventType();
if (eventTypeObj == null)
- throw new RequestException("error.ma.query",
+ throw new PerfSONARException("error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No eventType in the request metadata");
String eventType = eventTypeObj.getEventType().trim();
if (eventType.equals(""))
- throw new RequestException("error.ma.query",
+ throw new PerfSONARException("error.ma.query",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "eventType in the request metadata is empty");
@@ -241,11 +236,11 @@
try{
resp = metadataConfig.fetch(query);
- } catch (SystemException sex) {
+ } catch (PerfSONARException sex) {
if
(sex.getResultCode().equals("warning.ma.metadata_configuration"))
resp = new Message();
else
- throw new SystemException(
+ throw new PerfSONARException(
sex.getResultCode(),
sex.getResultDescription());
}
@@ -303,7 +298,7 @@
if (params.getParameterByName("ibatisConfig") == null) {
logger.error("SQLTypeMAServiceEngine.getStoreKey: "
+ "No default ibatis property in the key");
- throw new RequestException(
+ throw new PerfSONARException(
"error.ma.sql.db_connection.ibatis",
"SQLTypeMAServiceEngine.getStoreKey: "
+ "No default ibatis property "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/L2PathStatusResponseGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,19 +6,17 @@
import java.util.Collection;
+import java.util.Date;
import java.util.List;
import java.util.Map;
-import java.util.Date;
-import org.xml.sax.helpers.NamespaceSupport;
-
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.event.status.base.v2_0.Datum;
-import org.ggf.ns.nmwg.event.status.base.v2_0.StateOper;
import org.ggf.ns.nmwg.event.status.base.v2_0.StateAdmin;
+import org.ggf.ns.nmwg.event.status.base.v2_0.StateOper;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+import org.xml.sax.helpers.NamespaceSupport;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
/**
* Creates the response of service for L2 path status metric.
*
@@ -32,7 +30,7 @@
- public L2PathStatusResponseGenerator() throws SystemException {
+ public L2PathStatusResponseGenerator() throws PerfSONARException {
super();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/OwampResponseGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/OwampResponseGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/OwampResponseGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -9,12 +9,8 @@
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.tools.owamp.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.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
/**
* Creates the response of service for owamp data.
*
@@ -29,7 +25,7 @@
- public OwampResponseGenerator() throws SystemException {
+ public OwampResponseGenerator() throws PerfSONARException {
super();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -13,7 +13,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Creates the response of service.
@@ -36,7 +36,7 @@
- public ResponseGenerator() throws SystemException {
+ public ResponseGenerator() throws PerfSONARException {
try {
@@ -45,9 +45,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"ResponseGenerator.constructor: "
+ "Cannot get logger component");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGeneratorFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGeneratorFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/ResponseGeneratorFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementArchive.eventTypeConfig.EventType;
import
org.perfsonar.service.measurementArchive.eventTypeConfig.EventTypeConfigurationComponent;
@@ -27,7 +27,7 @@
public static ResponseGenerator getResponseGenerator(String
eventTypeName)
- throws SystemException {
+ throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
@@ -46,7 +46,7 @@
eventTypeConfigurationComponent.getEventType(eventTypeName);
if (eventType == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"ResponseGeneratorFactory.getResponseGenerator: "
+ "eventType " + eventTypeName + " is not supported");
@@ -60,7 +60,7 @@
// + className);
if (className == null || className.trim().equals(""))
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"ResponseGeneratorFactory.getResponseGenerator: "
+ "Could not find class name for eventType "
@@ -82,7 +82,7 @@
+ "Unable to create an object of : "
+ className + ": "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"ResponseGeneratorFactory.getResponseGenerator: "
+ "Unable to create an object of "
@@ -97,7 +97,7 @@
"ResponseGeneratorFactory.getResponseGenerator: "
+ "Could not create a responseGenerator object for "
+ "eventType: " + eventTypeName);
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"ResponseGeneratorFactory.getResponseGenerator: "
+ "Could not create a responseGenerator for "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/fetch/UtilizationResponseGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -13,7 +13,7 @@
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Creates the response of service for utilization metric.
@@ -28,7 +28,7 @@
- public UtilizationResponseGenerator() throws SystemException {
+ public UtilizationResponseGenerator() throws PerfSONARException {
super();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/L2PathStatusStoreRequestProcess.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.event.status.base.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Moves data from nmwg data element into ibatis map structure
@@ -25,7 +25,7 @@
- public L2PathStatusStoreRequestProcess() throws SystemException {
+ public L2PathStatusStoreRequestProcess() throws PerfSONARException {
super();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/OwampStoreRequestProcess.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/OwampStoreRequestProcess.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/OwampStoreRequestProcess.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.tools.owamp.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Moves data from nmwg data element into ibatis map structure
@@ -25,7 +25,7 @@
- public OwampStoreRequestProcess() throws SystemException {
+ public OwampStoreRequestProcess() throws PerfSONARException {
super();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcess.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcess.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcess.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -17,7 +17,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Abstract class for moving data from Data element into ibatis map
structure.
@@ -40,7 +40,7 @@
- public StoreRequestProcess() throws SystemException {
+ public StoreRequestProcess() throws PerfSONARException {
try {
@@ -49,9 +49,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"UtilizationStoreRequestProcess.constructor: "
+ "Cannot get logger component");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcessFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcessFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/StoreRequestProcessFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementArchive.eventTypeConfig.EventType;
import
org.perfsonar.service.measurementArchive.eventTypeConfig.EventTypeConfigurationComponent;
@@ -26,7 +26,7 @@
public static StoreRequestProcess getStoreRequestProcess(String
eventTypeName)
- throws SystemException {
+ throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
@@ -45,7 +45,7 @@
eventTypeConfigurationComponent.getEventType(eventTypeName);
if (eventType == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.query",
"StoreRequestProcessFactory.getStoreRequestProcess: "
+ "eventType " + eventTypeName + " is not supported");
@@ -59,7 +59,7 @@
+ className);
if (className == null || className.trim().equals(""))
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"StoreRequestProcessFactory.getStoreRequestProcess: "
+ "Could not find class name for eventType "
@@ -81,7 +81,7 @@
+ "Unable to create an object of : "
+ className + ": "
+ ex.toString());
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"StoreRequestProcessFactory.getResponseGenerator: "
+ "Unable to create an object of "
@@ -96,7 +96,7 @@
"StoreRequestProcessFactory.getResponseGenerator: "
+ "Could not create a responseGenerator object for "
+ "eventType: " + eventTypeName);
- throw new SystemException(
+ throw new PerfSONARException(
"error.ma.metadata_query_mapping_configuration",
"StoreRequestProcessFactory.getResponseGenerator: "
+ "Could not create a responseGenerator for "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/UtilizationStoreRequestProcess.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/UtilizationStoreRequestProcess.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementArchive/sqlType/store/UtilizationStoreRequestProcess.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
import org.ggf.ns.nmwg.base.v2_0.Element;
import org.ggf.ns.nmwg.base.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Moves data from nmwg data element into ibatis map structure
@@ -25,7 +25,7 @@
- public UtilizationStoreRequestProcess() throws SystemException {
+ public UtilizationStoreRequestProcess() throws PerfSONARException {
super();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,8 +8,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.measurementExecutor.MeasurementExecutor;
@@ -42,7 +41,7 @@
// ------------------------------------------------------------
Constructor
- public CommandLineAction() throws SystemException {
+ public CommandLineAction() throws PerfSONARException {
logger = (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
@@ -54,7 +53,7 @@
// Is it necessary?
if (configuration == null) {
- throw new SystemException("error.common.no_configuration",
+ throw new PerfSONARException("error.common.no_configuration",
ME_TYPE + ": "
+ "Could not get an instance of Configuration reader. "
+ "Cannot continue with the request");
@@ -63,7 +62,7 @@
if (logger == null) {
- throw new SystemException("error.common.no_logger",
+ throw new PerfSONARException("error.common.no_logger",
ME_TYPE + ": "
+ "Could not get an instance of the Logger Component. "
+ "Cannot continue with the request");
@@ -82,14 +81,14 @@
public Message makeMeasurement(
Message reqMess
- ) throws SystemException, RequestException {
+ ) throws PerfSONARException {
if (!reqMess.getType().equals("MeasurementRequest")) {
logger.error(
ME_TYPE +
": UNSUPPORTED: Can only handle MeasurementRequest
message"
);
- throw new RequestException(
+ throw new PerfSONARException(
"error.mp.clmp.validator.malformed_request",
ME_TYPE +
": UNSUPPORTED: Can only handle MeasurementRequest
message"
@@ -111,7 +110,7 @@
ME_TYPE +
": Request must have at least one
EventType defined in at least one MetaData."
);
- throw new RequestException(
+ throw new PerfSONARException(
"error.mp.clmp.validator.malformed_request",
ME_TYPE +
": Request must have at least one
EventType defined in at least one MetaData."
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineExec.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineExec.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineExec.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -16,22 +16,21 @@
*/
package org.perfsonar.service.measurementPoint.commandLine;
+import java.io.BufferedReader;
import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.InputStream;
+import java.io.InputStreamReader;
import java.io.OutputStream;
-import java.io.BufferedReader;
import java.io.PrintWriter;
-import java.io.InputStreamReader;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
import java.util.ArrayList;
-import java.util.Hashtable;
import java.util.Enumeration;
+import java.util.Hashtable;
-import org.ggf.ns.nmwg.base.v2_0.Parameters;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.ggf.ns.nmwg.base.v2_0.Parameters;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Performs execution of command-line application saving the
@@ -153,10 +152,10 @@
return proc;
}
- int getExitCode() throws SystemException
+ int getExitCode() throws PerfSONARException
{
if(!done){
- throw new SystemException(
+ throw new PerfSONARException(
"error.mp.clmp.exec.exit_request",
"MyExec: Exit code requested for still running proc"
);
@@ -255,7 +254,7 @@
public void waitFor(
int timeout
- ) throws SystemException
+ ) throws PerfSONARException
{
long curr_time = System.currentTimeMillis();
long end_time = curr_time + timeout;
@@ -296,16 +295,16 @@
err.interrupt();
}
- throw new SystemException("error.mp.clmp.exec", "The request timed
out (configured timeout: "+timeout+"ms).");
+ throw new PerfSONARException("error.mp.clmp.exec", "The request
timed out (configured timeout: "+timeout+"ms).");
}
public void run_synchronous(
int timeout_mills,
String[] cmdarr
- ) throws IOException, SystemException
+ ) throws IOException, PerfSONARException
{
if(cmdarr.length < 1){
- throw new SystemException("error.mp.clmp.exec",
"CommandLineExec: null cmd specified");
+ throw new PerfSONARException("error.mp.clmp.exec",
"CommandLineExec: null cmd specified");
}
this.cmdarr = cmdarr;
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineMPServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineMPServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineMPServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -22,8 +22,7 @@
import org.perfsonar.service.commons.engine.ServiceEngine;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* ServiceEngine class for command-line MP's.
@@ -59,7 +58,7 @@
/**
* Construction for the service engine
*/
- public CommandLineMPServiceEngine() throws SystemException {
+ public CommandLineMPServiceEngine() throws PerfSONARException {
//get logger
logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -67,7 +66,7 @@
if (logger == null) {
- throw new SystemException("error.common.no_logger",
+ throw new PerfSONARException("error.common.no_logger",
"CommandLineMPServiceEngine: "
+ "Could not get an instance of the Logger Component. "
+ "Cannot continue with the request.");
@@ -107,14 +106,14 @@
*
* @return Message object containing the response
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @see org.perfsonar.service.commons.engine.ServiceEngine
*/
public Message takeAction(String actionType, Message reqMess)
- throws SystemException, RequestException {
+ throws PerfSONARException {
logger.debug("CommandLineMPServiceEngine: takeAction for action [" +
@@ -147,7 +146,7 @@
"CommandLineMPServiceEngine.takeAction: ActionType
specified: "
+ actionType + " is not supported");
- throw new SystemException("error.common.action_not_suported",
+ throw new PerfSONARException("error.common.action_not_suported",
"CommandLineMPServiceEngine: "
+ "ActionType specified: "+ actionType
+ " is not supported");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineResourceProtector.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineResourceProtector.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineResourceProtector.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -1,6 +1,5 @@
package org.perfsonar.service.measurementPoint.commandLine;
-import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -12,7 +11,6 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
@@ -35,16 +33,16 @@
// ---------------------------------- constructors
- public CommandLineResourceProtector() throws SystemException {
+ public CommandLineResourceProtector() throws PerfSONARException {
try {
this.logger = (LoggerComponent) AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException("error.common.no_logger",
+ throw new PerfSONARException("error.common.no_logger",
"CommandLineCronComponent.initComponent: "
+ "Cannot get logger component");
@@ -55,9 +53,9 @@
this.configuration = (ConfigurationComponent)
AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException("error.common.no_configuration",
+ throw new PerfSONARException("error.common.no_configuration",
"CommandLineCronComponent.initComponent: "
+ "Cannot get config component");
@@ -80,7 +78,7 @@
// ---------------------- component that loads action to scheduler
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
PropertiesServiceDescription psd = new PropertiesServiceDescription();
psd.setRegistrationPrefix("service.mp.clmp.rp.maxthreads.");
@@ -108,7 +106,7 @@
}
- public void run(CommandLineExec cl, int timeout, String[] cmdarr) throws
SystemException{
+ public void run(CommandLineExec cl, int timeout, String[] cmdarr) throws
PerfSONARException{
String tool = cmdarr[0];
Integer actual = null, max = maxThreads.get(tool);
@@ -116,7 +114,7 @@
if (max != null){
if (max < 1){
- throw new
SystemException("error.mp.clmp.tool_disabled",
+ throw new
PerfSONARException("error.mp.clmp.tool_disabled",
CNAME + ": The tool " + cmdarr[0] + " has been
disabled in service.properties "
+ "(service.mp.clmp.rp.maxthreads."+cmdarr[0]+" <
1)."
);
@@ -146,7 +144,7 @@
CNAME + "Unable to execute command: " + cmdarr[0] + ": "
+ e.getMessage()
);
- throw new SystemException("error.mp.clmp.exec",
+ throw new PerfSONARException("error.mp.clmp.exec",
CNAME + "Unable to execute command: " + cmdarr[0] + ": "
+ e.getMessage()
);
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundle.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundle.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundle.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -22,7 +22,7 @@
*/
import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.perfsonar.service.commons.exceptions.*;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public interface CommandLineToolBundle {
@@ -63,5 +63,5 @@
* and returns the result.
*/
public Message runTool(Message reqMessage)
- throws SystemException,RequestException;
+ throws PerfSONARException;
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/CommandLineToolBundleFactory.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -15,16 +15,15 @@
package org.perfsonar.service.measurementPoint.commandLine;
-import org.ggf.ns.nmwg.base.v2_0.EventType;
+import java.util.Hashtable;
+import org.ggf.ns.nmwg.base.v2_0.EventType;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import java.util.Hashtable;
-
/**
* Factory class which can be used to get the appropriate ToolBundle
* for the given event type.
@@ -38,7 +37,7 @@
static private Hashtable m2c = null;
public static CommandLineToolBundle getCommandLineToolBundle(EventType
eventType)
- throws SystemException{
+ throws PerfSONARException{
// get a logger
LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.
@@ -46,7 +45,7 @@
if (logger == null) {
- throw new SystemException("error.common.no_logger",
+ throw new PerfSONARException("error.common.no_logger",
"CommandLineToolBundleFactory: "
+ "Could not get an instance of the Logger Component. "
+ "Cannot continue with the request.");
@@ -65,7 +64,7 @@
// Is it necessary?
if (configManager == null) {
- throw new SystemException("error.common.no_configuration",
+ throw new PerfSONARException("error.common.no_configuration",
"CommandLineToolBundleFactory: "
+ "Could not get an instance of Configuration
reader. "
+ "Cannot continue with the request");
@@ -89,7 +88,7 @@
if (m2c == null){
logger.error("CommandLineToolBundleFactory: hashtable not
created");
- throw new
SystemException("error.mp.clmp.system.toolFactory.hashtable",
+ throw new
PerfSONARException("error.mp.clmp.system.toolFactory.hashtable",
"CommandLineToolBundleFactory: "
+ "Could not create tools hashtable. "
+ "Cannot continue with the request");
@@ -101,7 +100,7 @@
String className = (String) m2c.get(eventString.toUpperCase());
if (className == null){
- throw new SystemException("error.mp.clmp.unsupported_tool",
+ throw new PerfSONARException("error.mp.clmp.unsupported_tool",
"The requested tool isn't currently supported by the
CL-MP. " +
"The following events are supported: owamp, bwctl,
ping and traceroute."
);
@@ -125,7 +124,7 @@
"CommandLineToolBundleFactory: Unable to Instantiate " +
" ToolBundle for: " + eventString +
" because: " + e.getMessage());
- throw new SystemException(
+ throw new PerfSONARException(
"error.mp.clmp.toolFactory.cant_instantiate",
"CommandLineToolBundleFactory: Unable to Instantiate " +
"ToolBundle for: " + eventString +
@@ -139,7 +138,7 @@
"ToolBundle for: " + eventString +
"because of IllegalAccessException: " +
e.getMessage());
- throw new SystemException(
+ throw new PerfSONARException(
"error.mp.clmp.toolFactory.cant_instantiate",
"CommandLineToolBundleFactory: Unable to Instantiate " +
"ToolBundle for: " + eventString +
@@ -152,7 +151,7 @@
"CommandLineToolBundleFactory: Unable to " +
"create ToolBundle for: " + eventString +
" because: " + e.getMessage());
- throw new SystemException(
+ throw new PerfSONARException(
"error.mp.clmp.toolFactory.cant_instantiate",
"CommandLineToolBundleFactory: Unable to " +
"create ToolBundle for: " + eventString +
@@ -165,7 +164,7 @@
logger.fatal(
"CommandLineToolBundleFactory: Unable to " +
"create ToolBundle for: " + eventString);
- throw new SystemException(
+ throw new PerfSONARException(
"error.mp.clmp.toolFactory.cant_instantiate",
"CommandLineToolBundleFactory: Unable to " +
"create ToolBundle for: " + eventString);
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Bwctl.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Bwctl.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Bwctl.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -36,8 +36,7 @@
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.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementPoint.commandLine.CommandLineExec;
import
org.perfsonar.service.measurementPoint.commandLine.CommandLineResourceProtector;
import
org.perfsonar.service.measurementPoint.commandLine.CommandLineToolBundle;
@@ -72,7 +71,7 @@
return "OS (Specific not implemented)";
}
- public Message runTool(Message reqMess) throws
SystemException,RequestException{
+ public Message runTool(Message reqMess) throws PerfSONARException{
Metadata[] mdArr = (Metadata[])reqMess.getMetadataArray();
@@ -80,7 +79,7 @@
logger.fatal(
CNAME + "Unsupported: request can only have one Metadata
elements"
);
- throw new SystemException(
+ throw new PerfSONARException(
CNAME + "Unsupported: request can only have one Metadata
elements"
);
}*/
@@ -104,7 +103,7 @@
CNAME +
": UNSUPPORTED: Must have at least one Subject
defined in at least one MetaData currently"
);
- throw new
RequestException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
CNAME +
": UNSUPPORTED: Must have at least one Subject
defined in at least one MetaData currently"
);
@@ -117,7 +116,7 @@
CNAME +
": UNSUPPORTED: Must have at least one Subject defined
in at least one MetaData currently"
);
- throw new
RequestException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
CNAME +
": UNSUPPORTED: Must have at least one Subject defined
in at least one MetaData currently"
);
@@ -134,7 +133,7 @@
(org.ggf.ns.nmwg.tools.bwctl.v2_0.Subject) subject.getSubject();
if (sub == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message metadata must have a subject
element with " +
"an endPointPair element. The endPointPair element must
have at" +
" least a dst element."
@@ -144,7 +143,7 @@
org.ggf.ns.nmwg.topology.v2_0.EndPointPair end =
sub.getEndPointPair();
if (end == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message must have an endPointPair element
inside " +
"the subject element of its metadata. The endPointPair
element" +
" must have at least a dst element."
@@ -160,7 +159,7 @@
Parameter p = null;
if (params == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message metadata must have a parameters
element. If " +
"no parameters are wanted, an empty parameters element
must exist."
);
@@ -199,7 +198,7 @@
// Check for dst addr
if(dst == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The endPointPair element must have at least a
dst element. " +
"The dst element informs the destination IP
address."
);
@@ -221,7 +220,7 @@
cmd.add("-u");
else if
(p.getParameterValue().toLowerCase().equals("tcp")) {
} else
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"Parameter protocol must be 'tcp' or
'udp'."
);
} else {
@@ -256,7 +255,7 @@
CNAME + "Unable to execute command: " + "bwctl" + ": "
+ t.getMessage()
);
- throw new SystemException("error.mp.clmp.exec",
+ throw new PerfSONARException("error.mp.clmp.exec",
CNAME + "Unable to execute command: " + "bwctl" + ": "
+ t.getMessage(),
t
@@ -265,7 +264,7 @@
logger.fatal(
CNAME + ": Parameters count and interval must be
integers."
);
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
CNAME + ": Parameter duration must be an integer.",
e
);
@@ -322,7 +321,7 @@
return respMess;
}
- private Datum[][] parseResults(CommandLineExec cle) throws
SystemException{
+ private Datum[][] parseResults(CommandLineExec cle) throws
PerfSONARException{
String datumRegex =
"[^]]*[^0-9]*([0-9]*\\.[0-9]*)\\-[^0-9]*([0-9]*\\.[0-9]*)[^a-zA-Z]*([a-zA-Z]*)[^0-9]*([0-9]*)[^a-zA-Z]*([a-zA-Z]*)[^0-9]*([0-9]*)[^a-zA-Z]*([a-zA-Z\\/]*)([^0-9]*([0-9]*\\.[0-9]*)[^a-zA-Z]*([a-zA-Z]*)[^0-9]*([0-9]*)\\/[^0-9]*([0-9]*)[^\\(]*\\(([0-9]*))?.*";
Pattern datumPattern = Pattern.compile(datumRegex);
@@ -386,7 +385,7 @@
logger.debug(
CNAME + ": Got empty out response for the
request. Check the error file "+ es.getName()
);
- throw new
SystemException("error.mp.clmp.system.tool_response",
+ throw new
PerfSONARException("error.mp.clmp.system.tool_response",
"The tool returned no response data. This might
be caused by a wrong parameter syntax " +
"or this tool might not be available at the
server."
);
@@ -509,7 +508,7 @@
CNAME + ": IOException
ocurred while processing response. " +
"Related files: "+ os.getName() + "
and "+ es.getName()
);
- throw new
SystemException("error.mp.clmp.system.ioexception.bwctl",
+ throw new
PerfSONARException("error.mp.clmp.system.ioexception.bwctl",
"An error ocurred while trying to parse
the results of the request. Please try again. " +
"If this problem persists, contact the
service administrator."
);
@@ -535,7 +534,7 @@
CNAME + ": IOException ocurred while
processing response. " +
"Related files: "+ os.getName() + " and "+
es.getName()
);
- throw new
SystemException("error.mp.clmp.system.ioexception.bwctl",
+ throw new
PerfSONARException("error.mp.clmp.system.ioexception.bwctl",
"An error ocurred while trying to parse the results of
the request. Please try again. " +
"If this problem persists, contact the service
administrator."
);
@@ -564,7 +563,7 @@
//static private Hashtable defaults = null;
- public Bwctl() throws SystemException{
+ public Bwctl() throws PerfSONARException{
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
protector =
(CommandLineResourceProtector)AuxiliaryComponentManager.getInstance().getComponent("clmprp");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Owamp.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Owamp.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Owamp.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -18,29 +18,24 @@
import java.io.BufferedReader;
import java.io.File;
-import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.io.IOException;
-
-import java.util.Hashtable;
+import java.io.InputStreamReader;
import java.util.ArrayList;
-
+import java.util.Hashtable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Parameters;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
+import org.ggf.ns.nmwg.base.v2_0.Parameters;
import org.ggf.ns.nmwg.tools.owamp.v2_0.Datum;
-
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
-import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementPoint.commandLine.CommandLineExec;
import
org.perfsonar.service.measurementPoint.commandLine.CommandLineResourceProtector;
import
org.perfsonar.service.measurementPoint.commandLine.CommandLineToolBundle;
@@ -75,7 +70,7 @@
return "OS (Specific not implemented)";
}
- public Message runTool(Message reqMess) throws
SystemException,RequestException{
+ public Message runTool(Message reqMess) throws PerfSONARException{
Metadata[] mdArr = (Metadata[])reqMess.getMetadataArray();
@@ -83,7 +78,7 @@
logger.fatal(
CNAME + "Unsupported: request can only have one Metadata"
);
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
CNAME + "Unsupported: request can only have one Metadata"
);
}
@@ -100,7 +95,7 @@
(org.ggf.ns.nmwg.tools.owamp.v2_0.Subject) mdArr[0].getSubject();
if (sub == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message metadata must have a subject
element with " +
"an endPointPair element. The endPointPair element must
have at" +
" least a dst element."
@@ -110,7 +105,7 @@
org.ggf.ns.nmwg.topology.v2_0.EndPointPair end =
sub.getEndPointPair();
if (end == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message must have an endPointPair element
inside " +
"the subject element of its metadata. The endPointPair
element" +
" must have at least a dst element."
@@ -124,7 +119,7 @@
Parameter p = null;
if (params == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message metadata must have a parameters
element. If " +
"no parameters are wanted, an empty parameters element
must exist."
);
@@ -151,7 +146,7 @@
else if
(p.getParameterValue().toLowerCase().equals("to")) {
cmd.add("-t");
} else
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"Parameter direction must be 'from' or
'to'."
);
} else {
@@ -168,7 +163,7 @@
// Check for dst addr
if(dst == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The endPointPair element must have at least a
dst element. " +
"The dst element informs the destination IP
address."
);
@@ -204,7 +199,7 @@
CNAME + "Unable to execute command: " + "owamp" + ": "
+ t.getMessage()
);
- throw new SystemException("error.mp.clmp.exec",
+ throw new PerfSONARException("error.mp.clmp.exec",
CNAME + "Unable to execute command: " + "owamp" + ": "
+ t.getMessage(),
t
@@ -213,7 +208,7 @@
logger.fatal(
CNAME + ": Parameters count and interval must be
integers."
);
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
CNAME + ": Parameter count must be an integer.",
e
);
@@ -245,7 +240,7 @@
return respMess;
}
- private Datum[] parseResults(CommandLineExec cle) throws SystemException{
+ private Datum[] parseResults(CommandLineExec cle) throws
PerfSONARException{
//0 14401306382784727093 1 2.15625 14401306380491903908 1 0.0544434
255
String datumRegex = "([0-9]*) ([0-9]*) ([0-9]) ([0-9\\.[Ee]\\-?]*)
([0-9]*) ([0-9]) ([0-9\\.[Ee]\\-?]*) ([0-9]*)";
Pattern datumPattern = Pattern.compile(datumRegex);
@@ -278,7 +273,7 @@
logger.debug(
CNAME + ": Got empty out response for the
request. Check the error file "+ es.getName()
);
- throw new
SystemException("error.mp.clmp.system.tool_response",
+ throw new
PerfSONARException("error.mp.clmp.system.tool_response",
"The tool returned no response data. This might
be caused by a wrong parameter syntax " +
"or this tool might not be available at the
server."
);
@@ -322,7 +317,7 @@
CNAME + ": IOException ocurred while
processing response. " +
"Related files: "+ os.getName() + " and "+
es.getName()
);
- throw new
SystemException("error.mp.clmp.system.ioexception.owamp",
+ throw new
PerfSONARException("error.mp.clmp.system.ioexception.owamp",
"An error ocurred while trying to parse the results of
the request. Please try again. " +
"If this problem persists, contact the service
administrator."
);
@@ -345,7 +340,7 @@
//static private Hashtable defaults = null;
- public Owamp() throws SystemException{
+ public Owamp() throws PerfSONARException{
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
protector =
(CommandLineResourceProtector)AuxiliaryComponentManager.getInstance().getComponent("clmprp");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Ping.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Ping.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Ping.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -18,29 +18,24 @@
import java.io.BufferedReader;
import java.io.File;
-import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.io.IOException;
-
-import java.util.Hashtable;
+import java.io.InputStreamReader;
import java.util.ArrayList;
-
+import java.util.Hashtable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Data;
+import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Parameters;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
+import org.ggf.ns.nmwg.base.v2_0.Parameters;
import org.ggf.ns.nmwg.tools.ping.v2_0.Datum;
-
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
-import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementPoint.commandLine.CommandLineExec;
import
org.perfsonar.service.measurementPoint.commandLine.CommandLineResourceProtector;
import
org.perfsonar.service.measurementPoint.commandLine.CommandLineToolBundle;
@@ -77,7 +72,7 @@
return "OS (Specific not implemented)";
}
- public Message runTool(Message reqMess) throws
SystemException,RequestException{
+ public Message runTool(Message reqMess) throws PerfSONARException {
Metadata[] mdArr = (Metadata[])reqMess.getMetadataArray();
@@ -85,7 +80,7 @@
logger.fatal(
CNAME + "Unsupported: request can only have one Metadata"
);
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
CNAME + "Unsupported: request can only have one Metadata"
);
}
@@ -109,7 +104,7 @@
(org.ggf.ns.nmwg.tools.ping.v2_0.Subject) mdArr[0].getSubject();
if (sub == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message metadata must have a subject
element with " +
"an endPointPair element. The endPointPair element must
have at" +
" least a dst element."
@@ -119,7 +114,7 @@
org.ggf.ns.nmwg.topology.v2_0.EndPointPair end =
sub.getEndPointPair();
if (end == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message must have an endPointPair element
inside " +
"the subject element of its metadata. The endPointPair
element" +
" must have at least a dst element."
@@ -133,7 +128,7 @@
Parameter p = null;
if (params == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message metadata must have a parameters
element. If " +
"no parameters are wanted, an empty parameters element
must exist."
);
@@ -166,7 +161,7 @@
// Check for dst addr
if(dst == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The endPointPair element must have at least a
dst element. " +
"The dst element informs the destination IP
address."
);
@@ -205,7 +200,7 @@
CNAME + "Unable to execute command: " + "ping" + ": "
+ t.getMessage()
);
- throw new SystemException("error.mp.clmp.exec",
+ throw new PerfSONARException("error.mp.clmp.exec",
CNAME + "Unable to execute command: " + "ping" + ": "
+ t.getMessage(),
t
@@ -214,7 +209,7 @@
logger.fatal(
CNAME + ": Parameters count and interval must be
integers."
);
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
CNAME + ": Parameters count and interval must be
integers.",
e
);
@@ -246,7 +241,7 @@
return respMess;
}
- private Datum[] parseResults(CommandLineExec cle) throws SystemException{
+ private Datum[] parseResults(CommandLineExec cle) throws
PerfSONARException{
String datumRegex = "([0-9]*)
([a-zA-Z]*)[^=]*=([0-9]*)[^=]*=([0-9]*)[^=]*=([0-9\\.]*) ([a-zA-Z]*)";
Pattern datumPattern = Pattern.compile(datumRegex);
@@ -276,7 +271,7 @@
logger.debug(
CNAME + ": Got empty out response for the
request. Check the error file "+ es.getName()
);
- throw new
SystemException("error.mp.clmp.system.tool_response",
+ throw new
PerfSONARException("error.mp.clmp.system.tool_response",
"The tool returned no response data. This might
be caused by a wrong parameter syntax " +
"or this tool might not be available at the
server."
);
@@ -313,7 +308,7 @@
CNAME + ": IOException ocurred while
processing response. " +
"Related files: "+ os.getName() + " and "+
es.getName()
);
- throw new
SystemException("error.mp.clmp.system.ioexception.ping",
+ throw new
PerfSONARException("error.mp.clmp.system.ioexception.ping",
"An error ocurred while trying to parse the results of
the request. Please try again. " +
"If this problem persists, contact the service
administrator."
);
@@ -336,7 +331,7 @@
//static private Hashtable defaults = null;
- public Ping() throws SystemException{
+ public Ping() throws PerfSONARException{
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
protector =
(CommandLineResourceProtector)AuxiliaryComponentManager.getInstance().getComponent("clmprp");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Traceroute.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Traceroute.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/commandLine/tools/Traceroute.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -35,8 +35,7 @@
import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.tools.traceroute.v2_0.Datum;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
@@ -78,7 +77,7 @@
return "OS (Specific not implemented)";
}
- public Message runTool(Message reqMess) throws
SystemException,RequestException{
+ public Message runTool(Message reqMess) throws PerfSONARException {
Metadata[] mdArr = (Metadata[])reqMess.getMetadataArray();
@@ -86,7 +85,7 @@
logger.fatal(
CNAME + "Unsupported: request can only have one Metadata"
);
- throw new SystemException(
+ throw new PerfSONARException(
CNAME + "Unsupported: request can only have one Metadata"
);
}
@@ -106,7 +105,7 @@
(org.ggf.ns.nmwg.tools.traceroute.v2_0.Subject)
mdArr[0].getSubject();
if (sub == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message metadata must have a subject
element with " +
"an endPointPair element. The endPointPair element must
have at" +
" least a dst element."
@@ -116,7 +115,7 @@
org.ggf.ns.nmwg.topology.v2_0.EndPointPair end =
sub.getEndPointPair();
if (end == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message must have an endPointPair element
inside " +
"the subject element of its metadata. The endPointPair
element" +
" must have at least a dst element."
@@ -130,7 +129,7 @@
Parameter p = null;
if (params == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The request message metadata must have a parameters
element. If " +
"no parameters are wanted, an empty parameters element
must exist."
);
@@ -152,7 +151,7 @@
cmd = cl.checkParameters(cmd, params, toolOptions);
// Check for dst addr
if(dst == null){
- throw new
SystemException("error.mp.clmp.validator.malformed_request",
+ throw new
PerfSONARException("error.mp.clmp.validator.malformed_request",
"The endPointPair element must have at least a
dst element. " +
"The dst element informs the destination IP
address."
);
@@ -196,7 +195,7 @@
CNAME + "Unable to execute command: " + "traceroute" +
": "
+ t.getMessage()
);
- throw new SystemException("error.mp.clmp.exec",
+ throw new PerfSONARException("error.mp.clmp.exec",
CNAME + "Unable to execute command: " + "traceroute" +
": "
+ t.getMessage(),
t
@@ -229,7 +228,7 @@
return respMess;
}
- private Datum[] parseResults(CommandLineExec cle) throws SystemException{
+ private Datum[] parseResults(CommandLineExec cle) throws
PerfSONARException{
String datumRegex =
"[^0-9]*([0-9]*)[^0-9]*(([0-9]{1,3}\\.){3}([0-9]{1,3}))";
String datumQueryRegex =
"(([^0-9]*([0-9\\.]*)[^a-zA-Z]*([a-zA-Z]*)([^\\(]*\\(([0-9]*)\\))?)?|\\*)";
@@ -288,7 +287,7 @@
logger.debug(
CNAME + ": Got empty out response for the
request. Check the error file "+ es.getName()
);
- throw new
SystemException("error.mp.clmp.system.tool_response",
+ throw new
PerfSONARException("error.mp.clmp.system.tool_response",
"The tool returned no response data. This might
be caused by a wrong parameter syntax " +
"or this tool might not be available at the
server."
);
@@ -343,7 +342,7 @@
CNAME + ": IOException ocurred while processing
response. " +
"Related files: "+ os.getName() + " and "+
es.getName()
);
- throw new
SystemException("error.mp.clmp.system.ioexception.traceroute",
+ throw new
PerfSONARException("error.mp.clmp.system.ioexception.traceroute",
"An error ocurred while trying to parse the results of
the request. Please try again. " +
"If this problem persists, contact the service
administrator."
);
@@ -366,7 +365,7 @@
//static private Hashtable defaults = null;
- public Traceroute() throws SystemException{
+ public Traceroute() throws PerfSONARException{
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
protector =
(CommandLineResourceProtector)AuxiliaryComponentManager.getInstance().getComponent("clmprp");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/ConfigFileWriter.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/ConfigFileWriter.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/ConfigFileWriter.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,7 +10,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Writes a config file for the flowmp python scripts (nfdump) to read.
@@ -29,13 +29,13 @@
* Parameters derived from the soap request.
* @param routers
* A list of routers derived from the soap request.
- * @throws SystemException
+ * @throws PerfSONARException
* When the configuration or logger component fails.
* @throws IOException
* When the configuration file cannot be written.
*/
public static void save(Integer key, Hashtable<String, String> params,
- ArrayList<String> routers) throws SystemException,
IOException {
+ ArrayList<String> routers) throws PerfSONARException,
IOException {
LoggerComponent logger = (LoggerComponent)
AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.LOGGER);
@@ -89,9 +89,9 @@
*
* @param key
* The unique key of this tunnel (will be the filename).
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public static void delete(Integer key) throws SystemException {
+ public static void delete(Integer key) throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.LOGGER);
@@ -112,10 +112,10 @@
/**
* Cleans the configuration files on services startup.
*
- * @throws SystemException
+ * @throws PerfSONARException
* when logger or configuration component fails
*/
- public static void cleanUp() throws SystemException {
+ public static void cleanUp() throws PerfSONARException {
LoggerComponent logger = (LoggerComponent)
AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.LOGGER);
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/FlowTypeMPServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/FlowTypeMPServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/FlowTypeMPServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -22,11 +22,9 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.engine.ServiceEngine;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
/**
* Service Engine implementation for flow MP.
*
@@ -54,7 +52,7 @@
/**
* Instantiates the FlowTypeMPServiceEngine.
*/
- public FlowTypeMPServiceEngine() throws SystemException {
+ public FlowTypeMPServiceEngine() throws PerfSONARException {
this.serviceEngineType = "FlowTypeMPServiceEngine";
@@ -91,8 +89,7 @@
* @return A response with a unique key identifying the tunnel.
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, ResourceException,
DataFormatException,
- RequestException {
+ throws PerfSONARException {
logger.debug("FlowTypeMPServiceEngine: request.getType() = "
+ request.getType());
@@ -104,7 +101,7 @@
} else if
(request.getType().equals(FlowTypeConstants.FLOW_UNSUBSCRIBE)) {
return unsubscribe(request);
} else {
- throw new
SystemException("error.common.action_not_supported","Request type " +
request.getType()
+ throw new
PerfSONARException("error.common.action_not_supported","Request type " +
request.getType()
+ " not understood.");
}
}
@@ -123,7 +120,7 @@
* When parameters aren't properly formatted.
*/
private Hashtable<String, String> filterCommonParams(Message request)
- throws DataFormatException {
+ throws PerfSONARException {
// TODO validate parameter list
Hashtable<String, String> params = new Hashtable<String,
String>();
@@ -157,7 +154,7 @@
* aren't properly formatted.
*/
private ArrayList<String> filterRouters(Message request)
- throws DataFormatException {
+ throws PerfSONARException {
// TODO validate routerlist
ArrayList<String> routers = new ArrayList<String>();
@@ -174,7 +171,7 @@
}
}
if (routers.size() < 1) {
- throw new DataFormatException("No routers found in
request.");
+ throw new PerfSONARException("No routers found in
request.");
} else {
// TODO check routernames with configured list
return routers;
@@ -194,7 +191,7 @@
* formatted.
*/
private Hashtable<String, String> filterEndPointParams(Message
request)
- throws DataFormatException {
+ throws PerfSONARException {
Hashtable<String, String> clientParams = new
Hashtable<String, String>();
// Data item, client options
@@ -218,7 +215,7 @@
FlowTypeConstants.KEY_CLIENT_ADDRESS,
address);
} else {
- throw new
DataFormatException(
+ throw new
PerfSONARException(
"endpoint address is not set.");
}
@@ -227,7 +224,7 @@
clientParams.put(FlowTypeConstants.KEY_CLIENT_PORT,
port);
} else {
- throw new
DataFormatException(
+ throw new
PerfSONARException(
"endpoint port is not set.");
}
@@ -236,7 +233,7 @@
}
}
}
- throw new DataFormatException("No endpoint found in
request.");
+ throw new PerfSONARException("No endpoint found in request.");
}
/**
@@ -248,7 +245,7 @@
* @throws DataFormatException
* if the key is not properly formatted, or does not
exist.
*/
- private Integer filterKey(Message request) throws DataFormatException
{
+ private Integer filterKey(Message request) throws PerfSONARException {
// search for a metadata element
for (Metadata meta : request.getMetadataArray()) {
// with a key element
@@ -263,14 +260,14 @@
if (key != null && key > 0) {
return key;
} else {
- throw new
DataFormatException(
+ throw new
PerfSONARException(
"Key
is not positive numeric.");
}
}
}
}
}
- throw new DataFormatException("No key found in request.");
+ throw new PerfSONARException("No key found in request.");
}
// ---------------------------- Helper methods for this service
@@ -282,8 +279,7 @@
*
* @return a Message object that should be returned to the client.
*/
- private Message subscribe(Message request) throws DataFormatException,
- SystemException {
+ private Message subscribe(Message request) throws PerfSONARException{
ArrayList<String> routers = new ArrayList<String>();
Hashtable<String, String> params = new Hashtable<String,
String>();
@@ -308,7 +304,7 @@
Integer portNr = Integer.parseInt(params
.get(FlowTypeConstants.KEY_CLIENT_PORT));
if (portNr == null || portNr < 0 || portNr > 65535) {
- throw new DataFormatException("Invalid
portnumber");
+ throw new PerfSONARException("Invalid
portnumber");
}
Integer key =
ZebedeeControl.getInstance().startTunnel(
params.get(FlowTypeConstants.KEY_CLIENT_ADDRESS), portNr);
@@ -323,7 +319,7 @@
for (StackTraceElement ste : e.getStackTrace()) {
logger.error(ste.toString());
}
- throw new SystemException(
+ throw new PerfSONARException(
"IOException was thrown when opening
tunnel", e);
}
}
@@ -336,8 +332,8 @@
*
* @return a Message object that should be returned to the client.
*/
- private Message unsubscribe(Message request) throws SystemException,
- DataFormatException {
+ private Message unsubscribe(Message request) throws PerfSONARException
+ {
// stop tunnel
Integer key = filterKey(request);
@@ -354,8 +350,8 @@
*
* @return a Message object that should be returned to the client.
*/
- private Message keepalive(Message request) throws SystemException,
- DataFormatException {
+ private Message keepalive(Message request) throws PerfSONARException
+ {
// Keep alive
Integer key = filterKey(request);
ZebedeeControl.getInstance().keepAlive(key);
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/ZebedeeControl.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/ZebedeeControl.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/flowType/ZebedeeControl.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -9,7 +9,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Controls a list of active zebedee tunnels, with keepalive feature.
@@ -84,10 +84,10 @@
/**
* Singleton constructor.
*
- * @throws SystemException
+ * @throws PerfSONARException
* if configuration items can not be read.
*/
- private ZebedeeControl() throws SystemException {
+ private ZebedeeControl() throws PerfSONARException {
logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance()
.getComponent(ComponentNames.LOGGER);
@@ -118,10 +118,10 @@
*
* @return the singleton instance (a running ZebedeeControl thread
* instance).
- * @throws SystemException
+ * @throws PerfSONARException
* if configuration items can not be read.
*/
- public static ZebedeeControl getInstance() throws SystemException {
+ public static ZebedeeControl getInstance() throws PerfSONARException {
// If there's no instance, create it, and start it's thread.
if (instance == null) {
// create an instance (singleton).
@@ -168,16 +168,16 @@
* port is supplied by the subscriber.
* @throws IOException
* When the program execution failed.
- * @throws SystemException
+ * @throws PerfSONARException
*/
public Integer startTunnel(String clientIP, Integer outPort)
- throws IOException, SystemException {
+ throws IOException, PerfSONARException {
// Get a new unique key
Integer key = newKey();
//check for max clients reached
if(key == -1) {
- throw new
SystemException("error.mp.flow.max_clients_reached","The maximum number of
clients is reached, try again later.");
+ throw new
PerfSONARException("error.mp.flow.max_clients_reached","The maximum number of
clients is reached, try again later.");
}
logger.debug("ZebedeeControl: starting tunnel with key " +
key + ".");
@@ -206,9 +206,9 @@
*
* @param key
* Unique key identifying the client (supplied by the
service).
- * @throws SystemException
+ * @throws PerfSONARException
*/
- public void stopTunnel(Integer key) throws SystemException {
+ public void stopTunnel(Integer key) throws PerfSONARException {
logger.debug("ZebedeeControl: stopping tunnel with key " +
key + ".");
// Get the process that needs to be killed
Process processToKill = processList.get(key);
@@ -241,8 +241,8 @@
// close timed-out tunnels
try {
checkForTimeouts();
- } catch (SystemException e) {
- logger.error("ZebedeeControl:
SystemException! "
+ } catch (PerfSONARException e) {
+ logger.error("ZebedeeControl:
PerfSONARException! "
+ e.getMessage());
for (StackTraceElement ste :
e.getStackTrace()) {
logger.error(ste.toString());
@@ -270,9 +270,9 @@
/**
* Checks the keepAliveList list for timed-out tunnels and closes
them.
*
- * @throws SystemException
+ * @throws PerfSONARException
*/
- private void checkForTimeouts() throws SystemException {
+ private void checkForTimeouts() throws PerfSONARException {
logger.debug("ZebedeeControl: checking for timeouts.");
// temporary list with timed out tunnel connections
ArrayList<Integer> tunnelsToClose = new ArrayList<Integer>();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSTypeMPServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSTypeMPServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSTypeMPServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -17,11 +17,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import
org.perfsonar.service.commons.storage.xmldb.exist.ExistDbXmlStorageManager;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -49,7 +45,7 @@
/**
*
*/
- public NMSTypeMPServiceEngine() throws SystemException {
+ public NMSTypeMPServiceEngine() throws PerfSONARException {
this.serviceEngineType = "NMSTypeMPServiceEngine";
@@ -85,8 +81,7 @@
*
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, ResourceException,
- DataFormatException, RequestException {
+ throws PerfSONARException {
logger.info("NMSTypeMPServiceEngine: " +
"Received a request of type: "+actionType);
@@ -231,7 +226,7 @@
"NMSTypeMPServiceEngine.takeAction: ActionType
specified: "
+ actionType + " is not supported");
- throw new SystemException("NMSTypeMPServiceEngine: "
+ throw new PerfSONARException("NMSTypeMPServiceEngine: "
+ "ActionType specified: "+ actionType
+ " is not supported");
}
@@ -251,12 +246,12 @@
*
* @param request
* @return Message object containing Key along with original request
- * @throws SystemException
+ * @throws PerfSONARException
* @throws DataFormatException
* @throws RequestException
*
*/
- private Message[] getKey(Message request) throws SystemException,
RequestException, DataFormatException{
+ private Message[] getKey(Message request) throws PerfSONARException {
logger.info("NMSTypeMPServiceEngine.getKey: Trying to get key/s for
given metadata");
Message[] response = null;
@@ -351,12 +346,12 @@
* Contacts the appropriate measurement executor for data
* @param request
* @return Message object containing Data along with original request
- * @throws SystemException
+ * @throws PerfSONARException
* @throws DataFormatException
* @throws ResourceException
* @throws RequestException
*/
- private Message getMeasurement(Message request) throws SystemException,
RequestException, ResourceException, DataFormatException {
+ private Message getMeasurement(Message request) throws
PerfSONARException {
logger.info("NMSTypeMPServiceEngine.getMeasurement: Calling on
Measurement Executor");
NMSTypeMeasurementExecutor nmsTypeME = new
NMSTypeMeasurementExecutor();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSTypeMeasurementExecutor.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSTypeMeasurementExecutor.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSTypeMeasurementExecutor.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -25,10 +25,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.measurementExecutor.MeasurementExecutor;
@@ -71,9 +68,9 @@
/**
* Default constructor.
- * @throws SystemException -
+ * @throws PerfSONARException -
*/
- public NMSTypeMeasurementExecutor() throws SystemException {
+ public NMSTypeMeasurementExecutor() throws PerfSONARException {
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
@@ -84,7 +81,7 @@
/**
* Implements the method MeasurementExecutor.makeMeasurement
*/
- public Message makeMeasurement(Message request) throws
SystemException, RequestException, ResourceException, DataFormatException {
+ public Message makeMeasurement(Message request) throws
PerfSONARException {
String lamda = null;
String event = null;
@@ -111,7 +108,7 @@
if(waveparam == null) {
logger.fatal("NMSTypeMeasurementExecutor.makeMeasurement: " +
"Wavelength description not found in the Request
Message.");
- throw new
RequestException("NMSTypeMeasurementExecutor.makeMeasurement: " +
+ throw new
PerfSONARException("NMSTypeMeasurementExecutor.makeMeasurement: " +
"Wavelength description not found in the Request
Message.");
}
@@ -119,7 +116,7 @@
if(lamda == null || lamda.equals("")) {
logger.fatal("NMSTypeMeasurementExecutor.makeMeasurement:" +
" Wavelength description not found or incorrect in the
Request Message.");
- throw new
RequestException("NMSTypeMeasurementExecutor.makeMeasurement: " +
+ throw new
PerfSONARException("NMSTypeMeasurementExecutor.makeMeasurement: " +
"Wavelength description not found or incorrect in the
Request Message.");
}
@@ -130,14 +127,14 @@
if(eventType == null) {
logger.fatal("NMSTypeMeasurementExecutor.makeMeasurement: " +
"No Event Type found in the request.");
- throw new
RequestException("NMSTypeMeasurementExecutor.makeMeasurement:" +
+ throw new
PerfSONARException("NMSTypeMeasurementExecutor.makeMeasurement:" +
"No Event Type found in the request.");
}
event = eventType.getEventType(); //right now not catering
for variants of event type !
if(event == null || event.equals("")) {
logger.fatal("NMSTypeMeasurementExecutor.makeMeasurement: No Event found in
the request.");
- throw new
RequestException("NMSTypeMeasurementExecutor.makeMeasurement: No Event found
in the request.");
+ throw new
PerfSONARException("NMSTypeMeasurementExecutor.makeMeasurement: No Event
found in the request.");
}
logger.info("Loading and validating event types");
@@ -174,7 +171,7 @@
String response = getDataFromIOO(iooNativeRequest);
if(response.equals(emptyresponse)) {
logger.error("NMSTypeMeasurementExecutor.makeMeasurement: No data could be
fetched from the IOO for the given time slice.");
- throw new DataFormatException("No data could be
fetched from the IOO for the given time slice.");
+ throw new PerfSONARException("No data could be
fetched from the IOO for the given time slice.");
}
logger.info("Parse the IOO server response and get a list of
available event-type values");
@@ -187,7 +184,7 @@
logger.error("NMSTypeMeasurementExecutor.makeMeasurement: Incorrect number of
responses expected.");
logger.debug("NMSTypeMeasurementExecutor.makeMeasurement: " +
"Incorrect number of responses expected : " +
eventValue.size() + "!=" + respExpected);
- throw new RequestException("Incorrect number of
responses expected.");
+ throw new PerfSONARException("Incorrect number of
responses expected.");
}
logger.info("Populate the Datum object to fill the Data
within the request message");
@@ -231,15 +228,15 @@
* @param event - The value of which to look for in the response
* @param lamda - The lamda name with which the value is associated.
Doing this because of a bug in IOS! Doesnt retrive SDH lamda specific value
when queried!
* @return the vector containing all the event data value for the
time interval.
- * @throws RequestException -
+ * @throws PerfSONARException -
*/
- private Vector getEventDataValue(String iooResponse, String event,
String lamda, String ne) throws RequestException {
+ private Vector getEventDataValue(String iooResponse, String event,
String lamda, String ne) throws PerfSONARException {
Vector data = new Vector();
int start = iooResponse.indexOf(lamda);
if(start == -1) {
logger.fatal("NMSTypeMeasurementExecutor.getEventDataValue: Incorrect Lamda
name found in the Request.");
- throw new
RequestException("NMSTypeMeasurementExecutor.getEventDataValue: Incorrect
Lamda name found in the Request.");
+ throw new
PerfSONARException("NMSTypeMeasurementExecutor.getEventDataValue: Incorrect
Lamda name found in the Request.");
}
int end = iooResponse.indexOf(ne,start+1);
@@ -270,11 +267,11 @@
* Get the response from IOO server.
* @param request - the IOO request string.
* @return - the response string.
- * @throws SystemException -
+ * @throws PerfSONARException -
* @throws DataFormatException -
* @throws ResourceException -
*/
- private String getDataFromIOO(String request) throws SystemException,
DataFormatException, ResourceException {
+ private String getDataFromIOO(String request) throws
PerfSONARException {
TCPConnector connector = new TCPConnector();
String response = connector.execute(request);
@@ -300,15 +297,15 @@
*
* @param lamda
* @return NE name
- * @throws RequestException -
+ * @throws PerfSONARException -
*/
- private String getNEName(String lamda) throws RequestException {
+ private String getNEName(String lamda) throws PerfSONARException {
String[] split = lamda.split("/");
if(split.length == 1) {
//means string not splitted
logger.fatal("NMSTypeMeasurementExecutor.getNEName: "
+
"Incorrect wavelength key found in request Message.");
- throw new
RequestException("NMSTypeMeasurementExecutor.getNEName: " +
+ throw new
PerfSONARException("NMSTypeMeasurementExecutor.getNEName: " +
"Incorrect wavelength key found in request Message.");
}
@@ -366,9 +363,9 @@
*
* @param event - the parsed event type as requested.
* @return true only if both are true otherwise false.
- * @throws RequestException when the event type is not valid
+ * @throws PerfSONARException when the event type is not valid
*/
- private boolean validate(String event) throws RequestException {
+ private boolean validate(String event) throws PerfSONARException {
boolean validevent = false;
for(int i = 0;i < dataParams.length;i++) {
@@ -386,7 +383,7 @@
errorMessage = errorMessage+",";
}
- throw new RequestException(errorMessage);
+ throw new PerfSONARException(errorMessage);
}
return validevent;
@@ -395,14 +392,14 @@
/**
* Loads all the validators to validate the request parameters.
* @throws ResourceException -
- * @throws SystemException -
+ * @throws PerfSONARException -
* @throws DataFormatException -
*/
- private void loadValidator() throws ResourceException,
SystemException, DataFormatException {
+ private void loadValidator() throws PerfSONARException {
String evts =
config.getProperty("service.mp.nms.NMS_EventType_Translations");
if(evts == null || evts.equals("")) {
- throw new
DataFormatException("NMSTypeMeasurementExecutor.loadValidator: " +
+ throw new
PerfSONARException("NMSTypeMeasurementExecutor.loadValidator: " +
"Property service.mp.nms.NMS_EventType_Translations not
found/set in config file");
}
@@ -463,9 +460,9 @@
}
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
e.printStackTrace();
- } catch (RequestException e) {
+ } catch (PerfSONARException e) {
e.printStackTrace();
} catch (ResourceException e) {
e.printStackTrace();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSXPathExpressionGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSXPathExpressionGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/NMSXPathExpressionGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -22,7 +22,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.util.XMLUtils;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -47,7 +47,7 @@
- public NMSXPathExpressionGenerator() throws SystemException {
+ public NMSXPathExpressionGenerator() throws PerfSONARException {
logger = (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
@@ -208,13 +208,13 @@
* Returns nmwg object with specific tag name parsed from xml string
*/
public Element transformResults(String xmlPart, String tagName)
- throws SystemException {
+ throws PerfSONARException {
String f = "";
try {
f = configuration.getProperty("service.sax_parser.config");
- } catch (SystemException sex) {
- throw new
SystemException("NMSConfigurationQueryGenerator.transformResults: "
+ } catch (PerfSONARException sex) {
+ throw new
PerfSONARException("NMSConfigurationQueryGenerator.transformResults: "
+ "unable to read service.sax_parser.config property
properly");
}
@@ -231,7 +231,7 @@
public String serializeXML(Element element)
- throws SystemException {
+ throws PerfSONARException {
return XMLUtils.serializeXML(element);
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/TCPConnector.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/TCPConnector.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/nmsType/TCPConnector.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -16,10 +16,9 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
/**
*
* @author Navneet
@@ -60,10 +59,10 @@
/**
* Default constructor.
* @throws ResourceException -
- * @throws SystemException -
+ * @throws PerfSONARException -
* @throws DataFormatException -
*/
- public TCPConnector() throws ResourceException, SystemException,
DataFormatException {
+ public TCPConnector() throws PerfSONARException {
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
@@ -79,9 +78,9 @@
* @return response from the IOO server.
* @throws ResourceException -
* @throws DataFormatException -
- * @throws SystemException -
+ * @throws PerfSONARException -
*/
- public String execute(String request) throws ResourceException,
DataFormatException, SystemException {
+ public String execute(String request) throws PerfSONARException {
String response;
loadConnectInfo();
@@ -95,7 +94,7 @@
}
else {
logger.fatal("TCPConnector.execute : Could not
connect and/or initialise properly with the IOO server.");
- throw new ResourceException("TCPConnector.execute :
Could not connect and/or initialise properly with the IOO server.");
+ throw new PerfSONARException("TCPConnector.execute :
Could not connect and/or initialise properly with the IOO server.");
}
return response;
@@ -104,9 +103,9 @@
/**
*
* @return whether connected successfully to the IOO server or not.
- * @throws SystemException -
+ * @throws PerfSONARException -
*/
- private boolean connect() throws SystemException {
+ private boolean connect() throws PerfSONARException {
boolean connected = false;
@@ -125,12 +124,12 @@
if(socket == null) {
logger.fatal("TCPConnector.connect : Connect to all
the available IOO servers failed. Maybe the Servers are down.");
- throw new SystemException("TCPConnector.connect :
Connect to all the available IOO servers failed. Maybe the Servers are
down.");
+ throw new PerfSONARException("TCPConnector.connect :
Connect to all the available IOO servers failed. Maybe the Servers are
down.");
}
if(!socket.isConnected()) {
logger.fatal("TCPConnector.connect : Connect to the
IOO server " + socket.getInetAddress() + " at " + socket.getPort() + "
failed.");
- throw new SystemException("TCPConnector.connect :
Connect to the IOO server " + socket.getInetAddress() + " at " +
socket.getPort() + " failed.");
+ throw new PerfSONARException("TCPConnector.connect :
Connect to the IOO server " + socket.getInetAddress() + " at " +
socket.getPort() + " failed.");
}
/** get I/O streams */
@@ -139,14 +138,14 @@
out = socket.getOutputStream();
} catch (IOException e) {
logger.fatal("TCPConnector.connect : Unable to
associate with IOO server I/O streams. Server : " + socket.getInetAddress() +
" on port " + socket.getPort());
- throw new SystemException("TCPConnector.connect :
Unable to associate with IOO server I/O streams. Server : " +
socket.getInetAddress() + " on port " + socket.getPort());
+ throw new PerfSONARException("TCPConnector.connect :
Unable to associate with IOO server I/O streams. Server : " +
socket.getInetAddress() + " on port " + socket.getPort());
}
String resp;
try {
resp = sendRequest("CON_REQ[" + authPwd + "]");
- } catch (DataFormatException e) {
+ } catch (PerfSONARException e) {
return false;
}
@@ -165,9 +164,9 @@
* @param request to the IOO server.
* @return response from the IOO server.
* @throws DataFormatException -
- * @throws SystemException -
+ * @throws PerfSONARException -
*/
- private String sendRequest(String request) throws
DataFormatException, SystemException {
+ private String sendRequest(String request) throws PerfSONARException
{
//System.out.println(request);
@@ -199,7 +198,7 @@
}
} catch (IOException e) {
logger.error("Could not listen to IOO server
response properly. IOException encountered in TCPConnector.sendRequest");
- throw new SystemException("Could not listen
to IOO server response properly. IOException encountered in
TCPConnector.sendRequest");
+ throw new PerfSONARException("Could not
listen to IOO server response properly. IOException encountered in
TCPConnector.sendRequest");
}
/** check whether received the complete response or
not */
@@ -221,7 +220,7 @@
}
else {
logger.fatal("IOO Server " + socket.getInetAddress()
+ " on port " + socket.getPort() + "persistent on not giving complete
response.");
- throw new DataFormatException("IOO Server " +
socket.getInetAddress() + " on port " + socket.getPort() + "persistent on not
giving complete response.");
+ throw new PerfSONARException("IOO Server " +
socket.getInetAddress() + " on port " + socket.getPort() + "persistent on not
giving complete response.");
}
}
@@ -247,15 +246,15 @@
/**
* Loads the properties.
* @throws ResourceException -
- * @throws SystemException -
+ * @throws PerfSONARException -
* @throws DataFormatException -
*/
- private void loadConnectInfo() throws ResourceException,
SystemException, DataFormatException {
+ private void loadConnectInfo() throws PerfSONARException {
String servers =
config.getProperty("service.mp.nms.NMS_Servers");
if(servers == null || servers.equals("")) {
logger.fatal("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers not found/set in config file");
- throw new
DataFormatException("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers not found/set in config file");
+ throw new
PerfSONARException("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers not found/set in config file");
}
//get list of available servers
@@ -266,14 +265,14 @@
if(port == 0) {
logger.fatal("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers_Port not found/set in config file");
- throw new
DataFormatException("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers_Port not found/set in config file");
+ throw new
PerfSONARException("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers_Port not found/set in config file");
}
//get the IOO connect password
authPwd =
config.getProperty("service.mp.nms.NMS_Servers_IOO_Password");
if(authPwd == null || authPwd.equals("")) {
logger.fatal("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers_IOO_Password not found/set in config file");
- throw new
DataFormatException("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers_IOO_Password not found/set in config file");
+ throw new
PerfSONARException("TCPConnect.loadConnectInfo : Property
service.mp.nms.NMS_Servers_IOO_Password not found/set in config file");
}
}
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/register/LSRegistrationComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/register/LSRegistrationComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/register/LSRegistrationComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,7 +6,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.commons.auxiliary.AuxiliaryComponent;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
@@ -14,10 +13,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.auxiliary.components.simplescheduler.Scheduler;
import
org.perfsonar.commons.auxiliary.components.simplescheduler.SchedulerAction;
-
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
import
org.perfsonar.service.commons.registration.GenericServiceLSRegistrator;
import
org.perfsonar.service.commons.registration.InformationXMLFileServiceContent;
import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
@@ -67,7 +63,7 @@
- public LSRegistrationComponent() throws SystemException {
+ public LSRegistrationComponent() throws PerfSONARException {
try {
@@ -76,9 +72,9 @@
getInstance().
getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"LSRegistrationComponent.initComponent: "
+ "Cannot get logger component");
@@ -93,9 +89,9 @@
getInstance().
getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"LSRegistrationComponent.initComponent: "
+ "Cannot get config component");
@@ -160,7 +156,7 @@
// ---------------------- component that loads action to scheduler
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
//Get configuration
@@ -175,7 +171,7 @@
} catch (RuntimeException e) {
//possibly not an integer - keep default interval
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
//no property - keep default interval
}
@@ -202,13 +198,13 @@
getComponent(schedulerVal);
if (scheduler == null)
- throw new SystemException("error.common.no_scheduler",
+ throw new PerfSONARException("error.common.no_scheduler",
"LSRegistrationComponent.initComponent: "
+ "No scheduler component in
AuxiliaryComponentManager");
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException("error.common.no_scheduler",
+ throw new PerfSONARException("error.common.no_scheduler",
"LSRegistrationComponent.initComponent:"
+ "LSCleanupLoader: no [component."
+ componentName + ".scheduler_component] parameter. "
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPTypeMPServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPTypeMPServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPTypeMPServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -4,7 +4,6 @@
* Project : perfSONAR
*/
package org.perfsonar.service.measurementPoint.snmpType;
-
import java.util.Iterator;
import org.ggf.ns.nmwg.base.v2_0.Data;
@@ -17,10 +16,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import
org.perfsonar.service.commons.storage.xmldb.exist.ExistDbXmlStorageManager;
@@ -49,7 +45,7 @@
/**
*
*/
- public SNMPTypeMPServiceEngine() throws SystemException {
+ public SNMPTypeMPServiceEngine() throws PerfSONARException {
this.serviceEngineType = "SNMPTypeMPServiceEngine";
@@ -85,8 +81,7 @@
*
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, ResourceException,
- DataFormatException, RequestException {
+ throws PerfSONARException {
logger.info("SNMPTypeMPServiceEngine: " +
"Received a request of type: "+actionType);
@@ -235,7 +230,7 @@
"SNMPTypeMPServiceEngine.takeAction: ActionType
specified: "
+ actionType + " is not supported");
- throw new SystemException("SNMPTypeMPServiceEngine: "
+ throw new PerfSONARException("SNMPTypeMPServiceEngine: "
+ "ActionType specified: "+ actionType
+ " is not supported");
}
@@ -255,12 +250,12 @@
*
* @param request
* @return Message object containing Key along with original request
- * @throws SystemException
+ * @throws PerfSONARException
* @throws DataFormatException
- * @throws RequestException
+ * @throws PerfSONARException
*
*/
- private Message[] getKey(Message request) throws SystemException,
RequestException, DataFormatException{
+ private Message[] getKey(Message request) throws PerfSONARException {
logger.info("SNMPTypeMPServiceEngine.getKey: Trying to get key/s for
given metadata");
Message[] response = null;
@@ -355,12 +350,12 @@
* Contacts the appropriate measurement executor for data
* @param request
* @return Message object containing Data along with original request
- * @throws SystemException
+ * @throws PerfSONARException
* @throws DataFormatException
* @throws ResourceException
- * @throws RequestException
+ * @throws PerfSONARException
*/
- private Message getMeasurement(Message request) throws SystemException,
RequestException, ResourceException, DataFormatException {
+ private Message getMeasurement(Message request) throws
PerfSONARException {
logger.info("SNMPTypeMPServiceEngine.getMeasurement: Calling on
Measurement Executor");
SNMPTypeMeasurementExecutor snmpTypeME = new
SNMPTypeMeasurementExecutor();
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPTypeMeasurementExecutor.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPTypeMeasurementExecutor.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPTypeMeasurementExecutor.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -10,8 +10,7 @@
import java.util.Iterator;
import java.util.Map;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
@@ -70,10 +69,10 @@
*
* @param measurementExecutorRequest parameter of type
MeasurementExecutorRequest
* @return MeasurementExecutorResponse
- * @throws SystemException
- * @throws RequestException
+ * @throws PerfSONARException
+ * @throws PerfSONARException
*/
- public Message makeMeasurement(Message request) throws
SystemException, RequestException {
+ public Message makeMeasurement(Message request) throws
PerfSONARException, PerfSONARException {
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
@@ -81,14 +80,14 @@
if(configuration==null) {
- throw new SystemException("SNMPTypeMeasurementExecutor: " +
+ throw new PerfSONARException("SNMPTypeMeasurementExecutor: " +
"Could not get an instance of Configuration reader." +
"Cannot continue with the request");
}
if(logger==null) {
- throw new SystemException("SNMPTypeMeasurementExecutor: " +
+ throw new PerfSONARException("SNMPTypeMeasurementExecutor: " +
"Could not get an instance of Configuration reader." +
"Cannot continue with the request");
}
@@ -102,7 +101,7 @@
logger.fatal("SNMPTypeMeasurementExecutor.makeMeasurement(): " +
"Request to the measurement executor cannot be null");
- throw new
SystemException("SNMPTypeMeasurementExecutor.makeMeasurement(): " +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor.makeMeasurement(): " +
"Request to the measurement executor cannot
be null");
}
@@ -120,7 +119,7 @@
logger.fatal(
"SNMPTypeMeasurementExecutor. makeMeasurement: No data
elements " +
"found in request. At least one is required in the
message");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement: No data
elements " +
"found in request. At least one is required in the
message");
}
@@ -135,7 +134,7 @@
"SNMP Service Engine is currently designed to accept
only " +
"one request in a message");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"More than one data element found in the message. " +
"SNMP Service Engine is currently designed to accept
only " +
@@ -147,7 +146,7 @@
logger.fatal(
"SNMPTypeMeasurementExecutor. makeMeasurement: No
metadata elements " +
"found in request. At least one is required in the
message");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement: No
metadata elements " +
"found in request. At least one is required in the
message");
}
@@ -167,7 +166,7 @@
"a metadata element with metadata id
"+dataElement.getMetadataIdRef()+". This "+
"metadata element could not be read from the
message");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:
Referenced metadata element " +
"missing in request. Data element with id
"+dataElement.getId()+"references " +
"a metadata element with metadata id
"+dataElement.getMetadataIdRef()+". This "+
@@ -189,7 +188,7 @@
logger.fatal("SNMPTypeMeasurementExecutor: Format error" +
" while reading subject and key elements. Error
Message: "+e.getMessage());
- throw new SystemException("SNMPTypeMeasurementExecutor:
Format error" +
+ throw new PerfSONARException("SNMPTypeMeasurementExecutor:
Format error" +
" while reading subject and key elements. Error
Message: "+e.getMessage());
}
@@ -200,7 +199,7 @@
"No Key element found in request. Key element
contains the OID parameters" +
"required by the Measurement executor to complete
the request.");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"No Key element found in request. Key element
contains the OID parameters" +
"required by the Measurement executor to complete
the request.");
@@ -228,7 +227,7 @@
"Only one metadata element and one data " +
"element can be part of the chain");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement: " +
"A chain of metadata elements was found" +
"Such chains are currently not understood by this
implementation " +
@@ -244,7 +243,7 @@
"No Key element found in request. Key element
contains the OID parameters" +
"required by the Measurement executor to complete
the request.");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"No Key element found in request. Key element
contains the OID parameters" +
"required by the Measurement executor to complete
the request.");
@@ -268,7 +267,7 @@
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. No eventType element found");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. No eventType element found. " +
"eventType element specifies the action to be taken
" +
@@ -288,7 +287,7 @@
"Request Error. Key is corrupt. " +
"No Parameters element was found inside the key");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"No Parameters element was found inside the key");
@@ -307,7 +306,7 @@
"Request Error. Key is corrupt. " +
"Expected OIDNumeric parameter element not found in
the key");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"Expected OIDNumeric parameter element not found in
the key");
@@ -321,7 +320,7 @@
"Request Error. Key is corrupt. " +
"Expected ifIndex parameter element not found in the
key");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"Expected ifIndex parameter element not found in the
key");
@@ -335,7 +334,7 @@
"Request Error. Key is corrupt. " +
"Expected SNMP Agent Port parameter element not
found in the key");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"Expected SNMP Agent Port parameter element not
found in the key");
@@ -349,7 +348,7 @@
"Request Error. Key is corrupt. " +
"Expected SNMP Agent parameter element not found in
the key");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"Expected SNMP Agent parameter element not found in
the key");
@@ -370,7 +369,7 @@
"Request Error. Key is corrupt. " +
"Expected OID parameter element has no/empty value");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"Expected OID parameter element has no/empty value");
@@ -384,7 +383,7 @@
"Request Error. Key is corrupt. " +
"Expected ifIndex parameter element has no/empty
value");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"Expected ifIndex parameter element has no/empty
value");
@@ -398,7 +397,7 @@
"Request Error. Key is corrupt. " +
"Expected SNMPAgent parameter element has no/empty
value");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"Expected SNMPAgent parameter element has no/empty
value");
@@ -411,7 +410,7 @@
"Request Error. Key is corrupt. " +
"Expected SNMPAgentPort parameter element has
no/empty value");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement:" +
"Request Error. Key is corrupt. " +
"Expected SNMPAgentPort parameter element has
no/empty value");
@@ -424,7 +423,7 @@
logger.fatal("SNMPTypeMeasurementExecutor.makeMeasurement: "+
"SNMP Agent Port value in request is corrupt. An
Integer was expected");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor. makeMeasurement: "+
"SNMP Agent Port value is corrupt. An Integer was
expected");
}
@@ -473,7 +472,7 @@
logger.fatal("SNMPTypeMeasurementExecutor.makeMeasurement: "+
"SNMP Version value in
request is corrupt. An Integer was expected");
- throw new RequestException(
+ throw new PerfSONARException(
"SNMPTypeMeasurementExecutor.
makeMeasurement: "+
"SNMP Version
value is corrupt. An Integer was expected");
}
@@ -508,7 +507,7 @@
this.validateRequest(eventTypeString,snmpAgentName,
snmpAgentAddress, communityName, OIDList);
}
- catch(RequestException re) {
+ catch(PerfSONARException re) {
throw re;
}
@@ -517,7 +516,7 @@
logger.fatal("SNMPTypeMeasurementExecutor. makeMeasurement:"
+
"Unknown exception was caught while validating
request. Message: "+e.getMessage());
- throw new SystemException("SNMPTypeMeasurementExecutor.
makeMeasurement:" +
+ throw new PerfSONARException("SNMPTypeMeasurementExecutor.
makeMeasurement:" +
"Unknown exception was caught while validating request.
Message: "+e.getMessage());
}
@@ -534,7 +533,7 @@
"Only SNMP Versions 1 and 2 are currently supported.
Request specified that" +
"SNMP Version "+snmpVersion+ "should be used");
- throw new
RequestException("SNMPTypeMeasurementExecutor.makeMeasurement: " +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor.makeMeasurement: " +
"Only SNMP Versions 1 and 2 are currently
supported. Request specified that" +
"SNMP Version "+snmpVersion+ "should be
used");
}
@@ -591,7 +590,7 @@
"Unknown Error occured while using SNMP " +
"to get measurement values. Error message:
"+e.getMessage());
- throw new
RequestException("SNMPTypeMeasurementExecutor.makeMeasurement. " +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor.makeMeasurement. " +
"Unknown Error occured while using SNMP " +
"to get measurement values. Error message:
"+e.getMessage());
}
@@ -622,7 +621,7 @@
"Error in retrieving values via snmp. " +
"Null values were returned by the network
element");
- throw new
SystemException("SNMPTypeMeasurementExecutor.makeMeasurement: " +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor.makeMeasurement: " +
"Measurement Executor encountered a problem " +
"while retrieving values via snmp. " +
"Null values were returned by the network
element");
@@ -664,7 +663,7 @@
"Unknown Error occured while using SNMP " +
"to get measurement values. Error message:
"+e.getMessage());
- throw new RequestException("SNMP Measurement Executor:
makeMeasurement. " +
+ throw new PerfSONARException("SNMP Measurement Executor:
makeMeasurement. " +
"Unknown Error occured while using SNMP " +
"to get measurement values. Error message:
"+e.getMessage());
}
@@ -700,7 +699,7 @@
"Unsupported Request type:
"+eventTypeString+" Supported" +
"Types are :
"+SNMPTypeMERequestTypes.SNMP_GET);
- throw new
RequestException("SNMPTypeMeasurementExecutor: " +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor: " +
"Unsupported Request type:
"+eventTypeString+" Supported" +
"Types are :
"+SNMPTypeMERequestTypes.SNMP_GET);
@@ -710,7 +709,7 @@
"Unsupported Request type:
"+eventTypeString+" Supported" +
"Types are :
"+SNMPTypeMERequestTypes.SNMP_GET);
- throw new
RequestException("SNMPTypeMeasurementExecutor: " +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor: " +
"Unsupported Request type:
"+eventTypeString+" Supported" +
"Types are :
"+SNMPTypeMERequestTypes.SNMP_GET);
}
@@ -727,14 +726,14 @@
private boolean validateRequest(String requestType, String
networkElementName, String networkElementAddress,
- String communityName, String[]OIDList) throws
RequestException{
+ String communityName, String[]OIDList) throws
PerfSONARException{
if(requestType==null) {
logger.fatal("SNMPTypeMERequest: Request type specified to" +
" SNMP Measurement Executor cannot be null");
- throw new RequestException("SNMPTypeMERequest: Request type
specified to" +
+ throw new PerfSONARException("SNMPTypeMERequest: Request type
specified to" +
" SNMP Measurement Executor cannot be null");
}
@@ -759,7 +758,7 @@
": "+requestType+" type not supported. Please refer
to SNMP Type MP" +
"documentation for a list of supported types");
- throw new
RequestException("SNMPTypeMeasurementExecutor.validateRequest: SNMP Command
request" +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor.validateRequest: SNMP Command
request" +
": "+requestType+" type not
supported. Please refer to SNMP Type MP" +
"documentation for a list of
supported types");
@@ -772,7 +771,7 @@
logger.fatal("SNMPTypeMeasurementExecutor.validateRequest: SNMP
Command request" +
"should contain SNMP Agent name (DNS)");
- throw new
RequestException("SNMPTypeMeasurementExecutor.validateRequest: SNMP Command
request" +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor.validateRequest: SNMP Command
request" +
"should contain SNMP Agent name (DNS)");
}
@@ -783,7 +782,7 @@
"require community name. No community name supplied and
no defaults configured " +
"on the SNMP Type MP Service. Cannot continue further");
- throw new
RequestException("SNMPTypeMeasurementExecutor.validateRequest: SNMPv2
commands (only v1 & v2 supported) " +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor.validateRequest: SNMPv2
commands (only v1 & v2 supported) " +
"require community name. No community name
supplied and no defaults configured " +
"on the SNMP Type MP Service. Cannot continue further");
}
@@ -794,7 +793,7 @@
"require community name. No community name supplied and
no defaults configured " +
"on the SNMP Type MP Service. Cannot continue further");
- throw new
RequestException("SNMPTypeMeasurementExecutor.validateRequest: List of OIDs
to be polled " +
+ throw new
PerfSONARException("SNMPTypeMeasurementExecutor.validateRequest: List of OIDs
to be polled " +
"cannot be null or empty. At least one OID is
required");
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPXPathExpressionGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPXPathExpressionGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPXPathExpressionGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -21,7 +21,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.util.XMLUtils;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -46,7 +46,7 @@
- public SNMPXPathExpressionGenerator() throws SystemException {
+ public SNMPXPathExpressionGenerator() throws PerfSONARException {
logger = (LoggerComponent)AuxiliaryComponentManager.
getInstance().getComponent(ComponentNames.LOGGER);
@@ -220,13 +220,13 @@
* Returns nmwg object with specific tag name parsed from xml string
*/
public Element transformResults(String xmlPart, String tagName)
- throws SystemException {
+ throws PerfSONARException {
String f = "";
try {
f = configuration.getProperty("service.sax_parser.config");
- } catch (SystemException sex) {
- throw new
SystemException("SNMPConfigurationQueryGenerator.transformResults: "
+ } catch (PerfSONARException sex) {
+ throw new
PerfSONARException("SNMPConfigurationQueryGenerator.transformResults: "
+ "unable to read service.sax_parser.config property
properly");
}
@@ -242,7 +242,7 @@
public String serializeXML(Element element)
- throws SystemException {
+ throws PerfSONARException {
return XMLUtils.serializeXML(element);
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPXQueryExpressionGenerator.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPXQueryExpressionGenerator.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/snmpType/SNMPXQueryExpressionGenerator.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -4,7 +4,6 @@
* Project : perfSONAR
*/
package org.perfsonar.service.measurementPoint.snmpType;
-
import java.util.Iterator;
import java.util.Map;
import java.util.Vector;
@@ -21,7 +20,7 @@
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.commons.util.XMLUtils;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
@@ -43,7 +42,7 @@
// -------------------------------------- constructors
- public SNMPXQueryExpressionGenerator() throws SystemException{
+ public SNMPXQueryExpressionGenerator() throws PerfSONARException{
@@ -365,13 +364,13 @@
* Returns nmwg object with specific tag name parsed from xml string
*/
public Element transformResults(String xmlPart, String tagName)
- throws SystemException {
+ throws PerfSONARException {
String f = "";
try {
f = configuration.getProperty("service.sax_parser.config");
- } catch (SystemException sex) {
- throw new
SystemException("SNMPXQueryExpressionGenerator.transformResults: "
+ } catch (PerfSONARException sex) {
+ throw new
PerfSONARException("SNMPXQueryExpressionGenerator.transformResults: "
+ "unable to read service.sax_parser.config property
properly");
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeMeasurementExecutor.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeMeasurementExecutor.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeMeasurementExecutor.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -27,8 +27,7 @@
import java.net.InetAddress;
import java.net.UnknownHostException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
@@ -158,11 +157,11 @@
*
* @param measurementExecutorRequest parameter of type
MeasurementExecutorRequest
* @return MeasurementExecutorResponse
- * @throws SystemException
- * @throws RequestException
+ * @throws PerfSONARException
+ * @throws PerfSONARException
*/
public Message makeMeasurement(Message request)
- throws SystemException, RequestException {
+ throws PerfSONARException, PerfSONARException {
logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
@@ -170,7 +169,7 @@
if (configuration == null) {
- throw new SystemException("error.common.no_configuration",
+ throw new PerfSONARException("error.common.no_configuration",
type + ": "
+ "Could not get an instance of Configuration reader."
+ "Cannot continue with the request");
@@ -179,7 +178,7 @@
if (logger == null) {
- throw new SystemException("error.common.no_logger",
+ throw new PerfSONARException("error.common.no_logger",
type + ": "
+ "Could not get an instance of Configuration reader."
+ "Cannot continue with the request");
@@ -194,7 +193,7 @@
Message response = new Message();
// Verify the incoming request Message
- // Throw either SystemException on RequestException if validation
fails
+ // Throw either PerfSONARException on PerfSONARException if
validation fails
TCMPTypeMeasurementRequest req = validateTCMPRequest(request);
// Add table entry(ies) for the given capture(s) to SQL db.
@@ -212,7 +211,7 @@
pstmt.setString(1, req.getCredentials().getUsername());
rst = pstmt.executeQuery();
if (! rst.next())
- throw new SystemException("error.common.sqldb_error",
+ throw new PerfSONARException("error.common.sqldb_error",
"Unable to retrieve id for user '"
+ req.getCredentials().getUsername() + "'");
int id = rst.getInt(1);
@@ -252,7 +251,7 @@
logger.fatal(type + ".makeMeasurement: Unable to add
tracefile"
+ " entry to SQL db: " + se);
- throw new SystemException("error.common.sqldb_error",
+ throw new PerfSONARException("error.common.sqldb_error",
"Unable to add tracefile entry to SQL db: " + se);
} finally {
@@ -278,7 +277,7 @@
if (scheduler == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_scheduler",
"No scheduler component in TCMPTypeMeasurementExecutor");
@@ -385,7 +384,7 @@
if (scheduler == null)
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_scheduler",
"No scheduler component in TCMPTypeMeasurementExecutor");
scheduler.remSchedulerTask(this);
@@ -396,7 +395,7 @@
if (this.configuration == null) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_configuration",
"Could not get an instance of Configuration reader."
+ "Cannot continue with the request");
@@ -405,7 +404,7 @@
if (this.logger == null) {
- throw new SystemException(
+ throw new PerfSONARException(
"error.common.no_logger",
"Could not get an instance of Configuration reader."
+ "Cannot continue with the request");
@@ -452,13 +451,13 @@
break;
default:
- throw new SystemException(
+ throw new PerfSONARException(
"error.mp.tcmp.unknown_capture_interface",
"Unknown capture interface");
}
// If this is a remote flow, check if required tracefile exists
- // already. Throw SystemException if it does.
+ // already. Throw PerfSONARException if it does.
FileTransport ft = null;
Location localLoc = null;
Location remoteLoc = null;
@@ -479,7 +478,7 @@
FileTransportFactory.SSH_FILE_TRANSPORT_IMPL);
if (ft.exists(fileName, remoteLoc))
- throw new SystemException(
+ throw new PerfSONARException(
"error.mp.tcmp.validator.remote_datum_filename_exists",
"Remote datum filename (" + fileName
+ ") already exists. Use different datum filename.");
@@ -695,9 +694,9 @@
this.logger.info(type + ".runAction: Thread exiting (tid="
+ Thread.currentThread().getId() + ")");
- } catch (SystemException sysEx) {
+ } catch (PerfSONARException sysEx) {
- this.logger.fatal(type + ".runAction: Received SystemException
(tid="
+ this.logger.fatal(type + ".runAction: Received
PerfSONARException (tid="
+ Thread.currentThread().getId() + "): " + sysEx);
} catch (MAPIException mapiEx) {
@@ -760,18 +759,18 @@
* service.mp.tcmp.pcap.file.storage.dir.
*
* @param request Message
- * @throws SystemException
- * @throws RequestException
+ * @throws PerfSONARException
+ * @throws PerfSONARException
*/
private TCMPTypeMeasurementRequest validateTCMPRequest(Message request)
- throws SystemException, RequestException {
+ throws PerfSONARException, PerfSONARException {
TCMPTypeMeasurementRequest req = new TCMPTypeMeasurementRequest();
String fileSeparator = System.getProperty("file.separator");
if (request == null) {
- throw new
SystemException("error.mp.tcmp.validator.missing_request",
+ throw new
PerfSONARException("error.mp.tcmp.validator.missing_request",
type + ".validateTCMPRequest(): "
+ "Request to the measurement executor cannot be null");
@@ -790,7 +789,7 @@
logger.fatal(
type + ".validateTCMPRequest: No data elements "
+ "found in request. At least one is required in the
message");
- throw new
RequestException("error.mp.tcmp.validator.no_data_elements",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_data_elements",
type + ".validateTCMPRequest: No data elements "
+ "found in request. At least one is required in the
message");
@@ -801,7 +800,7 @@
logger.fatal(
type + ".validateTCMPRequest: No metadata elements "
+ "found in request. At least one is required in the
message");
- throw new
RequestException("error.mp.tcmp.validator.no_metadata_elements",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_metadata_elements",
type + ".validateTCMPRequest: No metadata elements "
+ "found in request. At least one is required in the
message");
@@ -822,7 +821,7 @@
logger.fatal(
type + ".validateTCMPRequest: No subject in metadata
element "
+ "of request.");
- throw new
RequestException("error.mp.tcmp.validator.no_metadata_subject",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_metadata_subject",
type + ".validateTCMPRequest: No subject in metadata
element "
+ "of request.");
@@ -843,7 +842,7 @@
logger.fatal(
type + ".validateTCMPRequest: Either hostName or
ipAddress element "
+ "required in interface element.");
- throw new
RequestException("error.mp.tcmp.validator.no_interface_hostName_or_ipAddress",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_interface_hostName_or_ipAddress",
type + ".validateTCMPRequest: Either hostName or
ipAddress element "
+ "required in interface element.");
@@ -862,7 +861,7 @@
logger.fatal(
type + ".validateTCMPRequest: ifName element "
+ "required in interface element.");
- throw new
RequestException("error.mp.tcmp.validator.no_interface_ifName",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_interface_ifName",
type + ".validateTCMPRequest: ifName element "
+ "required in interface element.");
@@ -895,7 +894,7 @@
logger.fatal(
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
- throw new
RequestException("error.mp.tcmp.validator.unsupported_endPoint_type",
+ throw new
PerfSONARException("error.mp.tcmp.validator.unsupported_endPoint_type",
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
@@ -905,7 +904,7 @@
logger.fatal(
type + ".validateTCMPRequest: endPoint value is
required.");
- throw new
RequestException("error.mp.tcmp.validator.no_endPoint_value",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_endPoint_value",
type + ".validateTCMPRequest: endPoint value is
required.");
}
@@ -915,7 +914,7 @@
logger.fatal(
type + ".validateTCMPRequest: endPoint port is
required.");
- throw new
RequestException("error.mp.tcmp.validator.no_endPoint_port",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_endPoint_port",
type + ".validateTCMPRequest: endPoint port is
required.");
}
@@ -931,7 +930,7 @@
logger.fatal(
type + ".validateTCMPRequest: endPointPair element
requires "
+ "both src and dst elements.");
- throw new
RequestException("error.mp.tcmp.validator.no_endPointPair_src_and_dst",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_endPointPair_src_and_dst",
type + ".validateTCMPRequest: endPointPair element
requires "
+ "both src and dst elements.");
@@ -946,7 +945,7 @@
logger.fatal(
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
- throw new
RequestException("error.mp.tcmp.validator.unsupported_endPoint_type",
+ throw new
PerfSONARException("error.mp.tcmp.validator.unsupported_endPoint_type",
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
@@ -956,7 +955,7 @@
logger.fatal(
type + ".validateTCMPRequest: src endPoint value is
required.");
- throw new
RequestException("error.mp.tcmp.validator.no_src_endPoint_value",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_src_endPoint_value",
type + ".validateTCMPRequest: src endPoint value is
required.");
}
@@ -966,7 +965,7 @@
logger.fatal(
type + ".validateTCMPRequest: src endPoint port is
required.");
- throw new
RequestException("error.mp.tcmp.validator.no_src_endPoint_port",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_src_endPoint_port",
type + ".validateTCMPRequest: src endPoint port is
required.");
}
@@ -977,7 +976,7 @@
logger.fatal(
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
- throw new
RequestException("error.mp.tcmp.validator.unsupported_endPoint_type",
+ throw new
PerfSONARException("error.mp.tcmp.validator.unsupported_endPoint_type",
type + ".validateTCMPRequest: The only supported
endPoint "
+ "type is currently 'hostname'");
@@ -987,7 +986,7 @@
logger.fatal(
type + ".validateTCMPRequest: dst endPoint value is
required.");
- throw new
RequestException("error.mp.tcmp.validator.no_dst_endPoint_value",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_dst_endPoint_value",
type + ".validateTCMPRequest: dst endPoint value is
required.");
}
@@ -997,7 +996,7 @@
logger.fatal(
type + ".validateTCMPRequest: dst endPoint port is
required.");
- throw new
RequestException("error.mp.tcmp.validator.no_dst_endPoint_port",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_dst_endPoint_port",
type + ".validateTCMPRequest: dst endPoint port is
required.");
}
@@ -1009,7 +1008,7 @@
type + ".validateTCMPRequest: Missing one of
(nmwg:interface, "
+ "nmwg:endPoint, nmwg:endPointPair) elements in subject
element "
+ "of request.");
- throw new
RequestException("error.mp.tcmp.validator.no_interface_or_endPoint_or_endPointPair",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_interface_or_endPoint_or_endPointPair",
type + ".validateTCMPRequest: Missing one of
(nmwg:interface, "
+ "nmwg:endPoint, nmwg:endPointPair) elements in subject
element "
+ "of request.");
@@ -1039,7 +1038,7 @@
logger.fatal(
type + ".validateTCMPRequest: No parameters in metadata
element "
+ "found in request.");
- throw new
RequestException("error.mp.tcmp.validator.no_metadata_parameters",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_metadata_parameters",
type + ".validateTCMPRequest: No parameters in metadata
element "
+ "found in request.");
@@ -1063,7 +1062,7 @@
logger.fatal(
type + ".validateTCMPRequest: Credentials error:"
+ e);
- throw new RequestException(
+ throw new PerfSONARException(
"error.mp.tcmp.validator.credentials_error",
type + ".validateTCMPRequest: Credentials error: "
+ e,
@@ -1092,7 +1091,7 @@
logger.fatal(
type + ".validateTCMPRequest: Authorization error:"
+ e);
- throw new RequestException(
+ throw new PerfSONARException(
"error.mp.tcmp.validator._error",
type + ".validateTCMPRequest: Credentials error: "
+ e,
@@ -1123,7 +1122,7 @@
logger.fatal(
type + ".validateTCMPRequest: Unknown flow_s_type
parameter ("
+ flowSType + ") found in request.");
- throw new
RequestException("error.mp.tcmp.validator.unsupported_flow_s_type_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.unsupported_flow_s_type_parameter",
type + ".validateTCMPRequest: Unknown flow_s_type
parameter ("
+ flowSType + ") found in request.");
@@ -1147,7 +1146,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter
flow_s_thre ("
+ flowSThre + ") is not positive Integer.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_flow_s_thre_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_flow_s_thre_parameter",
type + ".validateTCMPRequest: Parameter
flow_s_thre ("
+ flowSThre + ") is not positive Integer.");
@@ -1160,7 +1159,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter flow_s_thre
("
+ flowSThreStr + ") could not be converted to
Integer.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_flow_s_thre_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_flow_s_thre_parameter",
type + ".validateTCMPRequest: Parameter flow_s_thre
("
+ flowSThreStr + ") could not be converted to
Integer.");
@@ -1195,7 +1194,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter
characteristics ("
+ charact + ") is not positive Integer.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_characteristics_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_characteristics_parameter",
type + ".validateTCMPRequest: Parameter
characteristics ("
+ charact + ") is not positive Integer.");
@@ -1208,7 +1207,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter
characteristics ("
+ charactStr + ") could not be converted to
Integer.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_characteristics_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_characteristics_parameter",
type + ".validateTCMPRequest: Parameter
characteristics ("
+ charactStr + ") could not be converted to
Integer.");
@@ -1232,7 +1231,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter
granularity ("
+ gran + ") is not positive Integer.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_granularity_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_granularity_parameter",
type + ".validateTCMPRequest: Parameter
granularity ("
+ gran + ") is not positive Integer.");
@@ -1245,7 +1244,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter granularity
("
+ granStr + ") could not be converted to Integer.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_granularity_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_granularity_parameter",
type + ".validateTCMPRequest: Parameter granularity
("
+ granStr + ") could not be converted to Integer.");
@@ -1263,7 +1262,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing start_time
parameter "
+ "in request.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_start_time_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_start_time_parameter",
type + ".validateTCMPRequest: Missing start_time
parameter "
+ "in request.");
@@ -1276,7 +1275,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing start_time(child)
parameter "
+ "in request.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_start_time_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_start_time_parameter",
type + ".validateTCMPRequest: Missing start_time(child)
parameter "
+ "in request.");
@@ -1298,7 +1297,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter start_time ("
+ unixTsStr + ") could not be converted from unix ts
to Date.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_start_time_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_start_time_parameter",
type + ".validateTCMPRequest: Parameter start_time ("
+ unixTsStr + ") could not be converted from unix ts
to Date.");
@@ -1309,7 +1308,7 @@
logger.fatal(
type + ".validateTCMPRequest: Only 'unix' type of
start_time "
+ "is currently supported.");
- throw new
RequestException("error.mp.tcmp.validator.unsupported_start_time_type",
+ throw new
PerfSONARException("error.mp.tcmp.validator.unsupported_start_time_type",
type + ".validateTCMPRequest: Only 'unix' type of
start_time "
+ "is currently supported.");
@@ -1322,7 +1321,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing end_time parameter
"
+ "in request.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_end_time_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_end_time_parameter",
type + ".validateTCMPRequest: Missing end_time parameter
"
+ "in request.");
@@ -1335,7 +1334,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing end_time(child)
parameter "
+ "in request.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_end_time_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_end_time_parameter",
type + ".validateTCMPRequest: Missing end_time(child)
parameter "
+ "in request.");
@@ -1357,7 +1356,7 @@
logger.fatal(
type + ".validateTCMPRequest: Parameter end_time ("
+ unixTsStr + ") could not be converted from unix ts
to Date.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_end_time_parameter",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_end_time_parameter",
type + ".validateTCMPRequest: Parameter end_time ("
+ unixTsStr + ") could not be converted from unix ts
to Date.");
@@ -1368,7 +1367,7 @@
logger.fatal(
type + ".validateTCMPRequest: Only 'unix' type of
end_time "
+ "is currently supported.");
- throw new
RequestException("error.mp.tcmp.validator.unsupported_end_time_type",
+ throw new
PerfSONARException("error.mp.tcmp.validator.unsupported_end_time_type",
type + ".validateTCMPRequest: Only 'unix' type of
end_time "
+ "is currently supported.");
@@ -1384,7 +1383,7 @@
logger.fatal(
type + ".validateTCMPRequest: Missing commonTime element
inside datum element.");
- throw new
RequestException("error.mp.tcmp.validator.no_commonTime",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_commonTime",
type + ".validateTCMPRequest: Missing commonTime element
inside datum element.");
}
@@ -1396,7 +1395,7 @@
logger.fatal(
type + ".validateTCMPRequest: commonTime must contain at
least one datum child.");
- throw new
RequestException("error.mp.tcmp.validator.no_datum_in_commonTime",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_datum_in_commonTime",
type + ".validateTCMPRequest: commonTime must contain at
least one datum child.");
}
@@ -1408,7 +1407,7 @@
logger.fatal(
type + ".validateTCMPRequest: First datum of commonTime
must contain filename attribute.");
- throw new
RequestException("error.mp.tcmp.validator.no_first_datum_filename_attribute",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_first_datum_filename_attribute",
type + ".validateTCMPRequest: First datum of commonTime
must contain filename attribute.");
}
@@ -1419,7 +1418,7 @@
logger.fatal(
type + ".validateTCMPRequest: Filename attribute of
first datum "
+ "contains file separator char.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_first_datum_filename_attribute",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_first_datum_filename_attribute",
type + ".validateTCMPRequest: Filename attribute of
first datum "
+ "contains file separator char.");
@@ -1433,7 +1432,7 @@
logger.fatal(
type + ".validateTCMPRequest: commonTime must
contain two datum childs.");
- throw new
RequestException("error.mp.tcmp.validator.no_second_datum_in_commonTime",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_second_datum_in_commonTime",
type + ".validateTCMPRequest: commonTime must
contain two datum childs.");
}
@@ -1445,7 +1444,7 @@
logger.fatal(
type + ".validateTCMPRequest: Second datum of
commonTime must contain filename attribute.");
- throw new
RequestException("error.mp.tcmp.validator.no_second_datum_filename_attribute",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_second_datum_filename_attribute",
type + ".validateTCMPRequest: Second datum of
commonTime must contain filename attribute.");
}
@@ -1456,7 +1455,7 @@
logger.fatal(
type + ".validateTCMPRequest: Filename attribute of
second datum "
+ "contains file separator char.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_second_datum_filename_attribute",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_second_datum_filename_attribute",
type + ".validateTCMPRequest: Filename attribute of
second datum "
+ "contains file separator char.");
@@ -1468,7 +1467,7 @@
logger.fatal(
type + ".validateTCMPRequest: Filename attributes of
first and second datum "
+ "should not be equal.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_second_datum_filename_attribute",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_second_datum_filename_attribute",
type + ".validateTCMPRequest: Filename attributes of
first and second datum "
+ "should not be equal.");
@@ -1483,7 +1482,7 @@
logger.fatal(
type + ".validateTCMPRequest:
service.mp.tcmp.pcap.file.storage.dir "
+ "property missing in service.properties.");
- throw new
RequestException("error.mp.tcmp.validator.no_pcap_storage_dir",
+ throw new
PerfSONARException("error.mp.tcmp.validator.no_pcap_storage_dir",
type + ".validateTCMPRequest:
service.mp.tcmp.pcap.file.storage.dir "
+ "property missing in service.properties.");
@@ -1494,7 +1493,7 @@
logger.fatal(
type + ".validateTCMPRequest:
service.mp.tcmp.pcap.file.storage.dir "
+ "property should point to a directory!");
- throw new
RequestException("error.mp.tcmp.validator.invalid_pcap_storage_dir",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_pcap_storage_dir",
type + ".validateTCMPRequest:
service.mp.tcmp.pcap.file.storage.dir "
+ "property should point to a directory!");
@@ -1524,7 +1523,7 @@
logger.fatal(
type + ".validateTCMPRequest: First datum filename (" +
req.getFirstFilenameDatum()
+ ") already exists. Use different datum filename.");
- throw new
RequestException("error.mp.tcmp.validator.first_datum_filename_exists",
+ throw new
PerfSONARException("error.mp.tcmp.validator.first_datum_filename_exists",
type + ".validateTCMPRequest: First datum filename (" +
req.getFirstFilenameDatum()
+ ") already exists. Use different datum filename.");
@@ -1537,7 +1536,7 @@
logger.fatal(
type + ".validateTCMPRequest: Second datum filename
(" + req.getSecondFilenameDatum()
+ ") already exists. Use different datum filename.");
- throw new
RequestException("error.mp.tcmp.validator.second_datum_filename_exists",
+ throw new
PerfSONARException("error.mp.tcmp.validator.second_datum_filename_exists",
type + ".validateTCMPRequest: Second datum filename
(" + req.getSecondFilenameDatum()
+ ") already exists. Use different datum filename.");
@@ -1579,7 +1578,7 @@
type + ".validateTCMPRequest:
service.mp.tcmp.remote.interfaces "
+ "property contains host:interface token (" +
hostIf
+ ") without ':' char.");
- throw new
RequestException("error.mp.tcmp.validator.invalid_remote_interfaces_configuration",
+ throw new
PerfSONARException("error.mp.tcmp.validator.invalid_remote_interfaces_configuration",
type + ".validateTCMPRequest:
service.mp.tcmp.remote.interfaces "
+ "property contains host:interface token (" +
hostIf
+ ") without ':' char.");
@@ -1601,7 +1600,7 @@
type + ".validateTCMPRequest: Local Tracefile
capture requested, but interface "
+ req.getFirstEndPointInterface()
+ " is not present in
service.mp.tcmp.local.interfaces property.");
- throw new
RequestException("error.mp.tcmp.validator.denied_trace_on_interface",
+ throw new
PerfSONARException("error.mp.tcmp.validator.denied_trace_on_interface",
type + ".validateTCMPRequest: Local Tracefile
capture requested, but interface "
+ req.getFirstEndPointInterface()
+ " is not present in
service.mp.tcmp.local.interfaces property.");
@@ -1615,7 +1614,7 @@
type + ".validateTCMPRequest: Remote Tracefile capture
requested, but host:interface "
+ req.getFirstEndPointHost().toLowerCase() + ":" +
req.getFirstEndPointInterface()
+ " is not present in service.mp.tcmp.remote.interfaces
property.");
- throw new
RequestException("error.mp.tcmp.validator.remote_host_interface_not_configured",
+ throw new
PerfSONARException("error.mp.tcmp.validator.remote_host_interface_not_configured",
type + ".validateTCMPRequest: Remote Tracefile capture
requested, but host:interface "
+ req.getFirstEndPointHost().toLowerCase() + ":" +
req.getFirstEndPointInterface()
+ " is not present in service.mp.tcmp.remote.interfaces
property.");
@@ -1632,7 +1631,7 @@
type + ".validateTCMPRequest: Local Tracefile
capture requested, but second interface "
+ req.getSecondEndPointInterface()
+ " is not present in
service.mp.tcmp.local.interfaces property.");
- throw new
RequestException("error.mp.tcmp.validator.denied_trace_on_second_interface",
+ throw new
PerfSONARException("error.mp.tcmp.validator.denied_trace_on_second_interface",
type + ".validateTCMPRequest: Local Tracefile
capture requested, but second interface "
+ req.getSecondEndPointInterface()
+ " is not present in
service.mp.tcmp.local.interfaces property.");
@@ -1646,7 +1645,7 @@
type + ".validateTCMPRequest: Remote Tracefile
capture requested, but second host:interface "
+ req.getSecondEndPointHost().toLowerCase() + ":" +
req.getSecondEndPointInterface()
+ " is not present in
service.mp.tcmp.remote.interfaces property.");
- throw new
RequestException("error.mp.tcmp.validator.second_remote_interface_not_configured",
+ throw new
PerfSONARException("error.mp.tcmp.validator.second_remote_interface_not_configured",
type + ".validateTCMPRequest: Remote Tracefile
capture requested, but second host:interface "
+ req.getSecondEndPointHost().toLowerCase() + ":" +
req.getSecondEndPointInterface()
+ " is not present in
service.mp.tcmp.remote.interfaces property.");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/TCMPTypeServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,43 +6,23 @@
package org.perfsonar.service.measurementPoint.tracefileCaptureType;
-import java.util.Collection;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Vector;
import java.util.Iterator;
-import java.util.Random;
-import java.util.Date;
+import java.util.Map;
+import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.Datum;
-import org.ggf.ns.nmwg.base.v2_0.Key;
-import org.ggf.ns.nmwg.base.v2_0.Parameters;
-import org.ggf.ns.nmwg.base.v2_0.Parameter;
-
-import org.perfsonar.service.commons.storage.NMWGStorageManager;
-
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
-
-import
org.perfsonar.service.measurementPoint.tracefileCaptureType.TCMPTypeMeasurementExecutor;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import
org.perfsonar.service.measurementPoint.register.LSRegistrationComponent;
-import org.perfsonar.commons.messages.BaseChaining;
-//import org.perfsonar.commons.messages.MABaseChaining;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
/**
* Object implementing the Measurement Point Service Engine which deals
with Tracefile Capture
* measurement requests.
@@ -86,7 +66,7 @@
* Construction for the service engine
* @throws SystemException
*/
- public TCMPTypeServiceEngine() throws SystemException {
+ public TCMPTypeServiceEngine() throws PerfSONARException {
this.serviceEngineType = "service.MeasurementPoint.TCMPType";
@@ -136,13 +116,13 @@
* @return Message object containing the response
*
* @throws SystemException
- * @throws RequestException
+ * @throws PerfSONARException
* @throws DataFormatException
*
* @see org.perfsonar.service.commons.engine.ServiceEngine
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
logger.debug("TCMPTypeServiceEngine.takeAction: " +
"Received a request of type - " + actionType);
@@ -164,7 +144,7 @@
"TCMPTypeServiceEngine.takeAction: ActionType specified:
"
+ actionType + " is not supported");
- throw new SystemException("error.common.action_not_suported",
+ throw new PerfSONARException("error.common.action_not_suported",
"TCMPTypeServiceEngine: "
+ "ActionType specified: "+ actionType
+ " is not supported");
@@ -193,11 +173,11 @@
* @return Message object containing the response with measurement data
*
* @throws SystemException
- * @throws RequestException
+ * @throws PerfSONARException
* @throws DataFormatException
*/
protected Message makeMeasurement(Message request)
- throws SystemException, RequestException, DataFormatException {
+ throws PerfSONARException {
Message response = new Message();
response.setType("SetupDataResponse");
@@ -240,7 +220,7 @@
"TCMPTypeServiceEngine.makeMeasurement: Data with id
"
+ data.getId() + " has a blank metadataIdRef");
- throw new
SystemException("error.mp.tcmp.data_missing_metadataIdRef",
+ throw new
PerfSONARException("error.mp.tcmp.data_missing_metadataIdRef",
"TCMPTypeServiceEngine: "
+ "Data with id "+ data.getId()
+ " has a blank metadataIdRef");
Modified:
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/servlets/FileServerServlet.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/servlets/FileServerServlet.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/measurementPoint/tracefileCaptureType/servlets/FileServerServlet.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,25 +6,23 @@
package org.perfsonar.service.measurementPoint.tracefileCaptureType.servlets;
-import java.io.IOException;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.io.FileInputStream;
+import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletException;
-import javax.servlet.ServletContext;
import org.perfsonar.commons.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-
/**
* This class is simple file servlet used for serving PCAP files
* captured by TCMP. Verification for accessing those files is
@@ -55,7 +53,7 @@
configuration =
(ConfigurationComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {} // NOTE: It is not the best to ignore
this!
+ } catch (PerfSONARException e) {} // NOTE: It is not the best to
ignore this!
}
@@ -118,7 +116,7 @@
pcapDirStr =
configuration.getProperty("service.mp.tcmp.pcap.file.storage.dir");
- } catch (SystemException e) {}
+ } catch (PerfSONARException e) {}
if (pcapDirStr == null) {
logger.fatal(logPrefix + "service.mp.tcmp.pcap.file.storage.dir
property missing "
Modified:
trunk/perfsonar/src/org/perfsonar/service/testHarness/nmsType/NMSTypeMPServiceEngineTester.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/testHarness/nmsType/NMSTypeMPServiceEngineTester.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/testHarness/nmsType/NMSTypeMPServiceEngineTester.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -12,7 +12,6 @@
import java.util.Map;
import java.util.Vector;
-import org.exist.soap.Query;
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.Datum;
import org.ggf.ns.nmwg.base.v2_0.EventType;
@@ -25,10 +24,7 @@
import org.ggf.ns.nmwg.topology.v2_0.Dst;
import org.ggf.ns.nmwg.topology.v2_0.EndPointPair;
import org.ggf.ns.nmwg.topology.v2_0.Src;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.measurementPoint.nmsType.NMSTypeMPServiceEngine;
@@ -36,7 +32,7 @@
public class NMSTypeMPServiceEngineTester {
- public boolean processRequest(String[] args) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public boolean processRequest(String[] args) throws PerfSONARException {
/*
map.put("type",typeString);
@@ -324,7 +320,7 @@
- public Message testGetKey(Message request) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public Message testGetKey(Message request) throws PerfSONARException {
System.out.println("Came until request");
System.out.println("Request: "+request);
@@ -339,7 +335,7 @@
}
- public Message testGetData(Message request) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public Message testGetData(Message request) throws PerfSONARException {
System.out.println("Came until request");
@@ -445,7 +441,7 @@
- public static void main(String[] args) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public static void main(String[] args) throws PerfSONARException {
NMSTypeMPServiceEngineTester tester =
new NMSTypeMPServiceEngineTester();
Modified:
trunk/perfsonar/src/org/perfsonar/service/testHarness/snmpType/SNMPTypeMPServiceEngineTester.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/testHarness/snmpType/SNMPTypeMPServiceEngineTester.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/testHarness/snmpType/SNMPTypeMPServiceEngineTester.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -25,10 +25,7 @@
import org.ggf.ns.nmwg.topology.v2_0.IpAddress;
import org.ggf.ns.nmwg.topology.v2_0.IfName;
import org.ggf.ns.nmwg.topology.v2_0.Interface;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import
org.perfsonar.service.measurementPoint.snmpType.SNMPTypeMPServiceEngine;
@@ -36,7 +33,7 @@
public class SNMPTypeMPServiceEngineTester {
- public boolean processRequest(String[] args) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public boolean processRequest(String[] args) throws PerfSONARException{
/*
map.put("type",typeString);
@@ -454,7 +451,7 @@
- public Message testGetKey(Message request) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public Message testGetKey(Message request) throws PerfSONARException {
System.out.println("Came until request");
System.out.println("Request: "+request);
@@ -469,7 +466,7 @@
}
- public Message testGetData(Message request) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public Message testGetData(Message request) throws PerfSONARException{
System.out.println("Came until request");
@@ -639,7 +636,7 @@
- public static void main(String[] args) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public static void main(String[] args) throws PerfSONARException {
SNMPTypeMPServiceEngineTester tester =
new SNMPTypeMPServiceEngineTester();
Modified:
trunk/perfsonar/src/org/perfsonar/service/testHarness/snmpType/SNMPXQueryGenTester.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/testHarness/snmpType/SNMPXQueryGenTester.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/testHarness/snmpType/SNMPXQueryGenTester.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,29 +8,20 @@
import gnu.getopt.Getopt;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
-import java.util.Vector;
import org.ggf.ns.nmwg.base.v2_0.Data;
-import org.ggf.ns.nmwg.base.v2_0.Datum;
import org.ggf.ns.nmwg.base.v2_0.EventType;
-import org.ggf.ns.nmwg.base.v2_0.Key;
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Parameter;
import org.ggf.ns.nmwg.base.v2_0.Parameters;
import org.ggf.ns.nmwg.base.v2_0.Subject;
import org.ggf.ns.nmwg.topology.v2_0.HostName;
-import org.ggf.ns.nmwg.topology.v2_0.IfAddress;
import org.ggf.ns.nmwg.topology.v2_0.IfName;
import org.ggf.ns.nmwg.topology.v2_0.Interface;
import org.ggf.ns.nmwg.topology.v2_0.IpAddress;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.ResourceException;
-import org.perfsonar.service.commons.exceptions.SystemException;
-import
org.perfsonar.service.measurementPoint.snmpType.SNMPTypeMPServiceEngine;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import
org.perfsonar.service.measurementPoint.snmpType.SNMPXQueryExpressionGenerator;
@@ -38,7 +29,7 @@
public class SNMPXQueryGenTester {
- public boolean processRequest(String[] args) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public boolean processRequest(String[] args) throws PerfSONARException {
/*
map.put("type",typeString);
@@ -381,7 +372,7 @@
- public static void main(String[] args) throws SystemException,
ResourceException, DataFormatException, RequestException {
+ public static void main(String[] args) throws PerfSONARException {
SNMPXQueryGenTester tester =
new SNMPXQueryGenTester();
Modified:
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopServiceEngine.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopServiceEngine.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -15,9 +15,7 @@
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* ServiceEngine class for the Topology Service. (The heart of the Topology
@@ -82,7 +80,7 @@
/**
* Construction for the service engine
*/
- public TopServiceEngine() throws SystemException {
+ public TopServiceEngine() throws PerfSONARException {
// set the accepted action types
this.acceptedTypes = Arrays
@@ -104,7 +102,7 @@
if (logger == null) {
String m = "TopologyServiceEngine: can't obtain
Logger object";
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
logger.debug("TopServiceEngine: starting... ");
@@ -120,7 +118,7 @@
String m = "TopServiceEngine: can't obtain [" +
TOPS_JDBC_COMPONENT
+ "] object";
logger.error(m);
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
logger.debug("TopServiceEngine: forcing jdbc initialization");
@@ -132,7 +130,7 @@
String m = "TopServiceEngine: can't obtain jdbc
connection from the component";
logger.error(m);
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
/* String mm = "TopServiceEngine: trying to get registrator
component";
@@ -145,7 +143,7 @@
String m = "TopServiceEngine: can't obtain ["
+ TOPS_REGISTRATOR_COMPONENT + "]
component";
logger.error(m);
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
*/
logger.debug("TopServiceEngine: started ");
@@ -174,14 +172,14 @@
*
* @return Message object containing the response
*
- * @throws SystemException
+ * @throws PerfSONARException
* @throws RequestException
* @throws DataFormatException
*
* @see org.perfsonar.service.commons.engine.ServiceEngine
*/
public Message takeAction(String actionType, Message request)
- throws SystemException, RequestException,
DataFormatException {
+ throws PerfSONARException {
logger.debug("TopServiceEngine: takeAction for action [" +
actionType
+ "]");
@@ -193,7 +191,7 @@
String m = "TopServiceEngine: ActionType specified: "
+ actionType
+ " is not supported";
logger.info(m);
- throw new
SystemException("error.common.action_not_supported", m);
+ throw new
PerfSONARException("error.common.action_not_supported", m);
}
logger.debug("TopServiceEngine: action valid for this
ServiceEngine: "
@@ -214,7 +212,7 @@
String m = "TopServiceEngine: Action [" + actionType
+ "] not supported";
logger.info(m);
- throw new
SystemException("error.common.action_not_supported", m);
+ throw new
PerfSONARException("error.common.action_not_supported", m);
}
response = action.performAction(request);
Modified:
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsAction.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -16,10 +16,9 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
+
/**
* Generic class for all Tops actions performed by TopServiceEngine
*
@@ -49,7 +48,7 @@
// ------------------------------------------------------------
Constructor
- public TopsAction(Connection jdbc) throws SystemException {
+ public TopsAction(Connection jdbc) throws PerfSONARException {
this.jdbc = jdbc;
logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance()
.getComponent(ComponentNames.LOGGER);
@@ -156,7 +155,7 @@
// ----------------------------------------------- Abstract methods
public abstract Message performAction(Message request)
- throws SystemException, RequestException,
DataFormatException;
+ throws PerfSONARException;
// ---------------------------------------------------------- Inner
classes
Modified:
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsDownloadAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsDownloadAction.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsDownloadAction.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -6,7 +6,6 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
-import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;
import java.util.UUID;
@@ -31,9 +30,7 @@
import org.ggf.ns.nmwg.topology.l3.v3_0.Name;
import org.ggf.ns.nmwg.topology.l3.v3_0.Netmask;
import org.ggf.ns.nmwg.topology.l3.v3_0.Type;
-import org.perfsonar.service.commons.exceptions.DataFormatException;
-import org.perfsonar.service.commons.exceptions.RequestException;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
public class TopsDownloadAction extends TopsAction {
private static String TYPE_RESPONSE = "SetupDataResponse";
@@ -48,12 +45,12 @@
private Properties interfacesDesc;
- public TopsDownloadAction(Connection jdbc) throws SystemException {
+ public TopsDownloadAction(Connection jdbc) throws PerfSONARException {
super(jdbc);
readInterfacesDescription();
}
- private void readInterfacesDescription() throws SystemException {
+ private void readInterfacesDescription() throws PerfSONARException {
try {
interfacesDesc=new Properties();
logger.debug(ROOT_LOG+"reading file:
"+configuration.getProperty("service.tops.interfaces"));
@@ -62,7 +59,7 @@
} catch (IOException io) {
String m= ROOT_LOG+"error while reading interfaces
description: " + io.getMessage();
logger.error(m);
- throw new SystemException("error.tops.fetching", m);
+ throw new PerfSONARException("error.tops.fetching", m);
}
}
@@ -86,9 +83,9 @@
}
@Override
- public Message performAction(Message request) throws SystemException,
- RequestException, DataFormatException {
+ public Message performAction(Message request) throws
PerfSONARException {
+
logger.debug(ROOT_LOG+"performing TopsDownloadAction...");
Message response = new Message();
@@ -142,7 +139,7 @@
return response;
}
- protected void fillNetworkInterfaces(Link link, int network_oid) throws
SystemException {
+ protected void fillNetworkInterfaces(Link link, int network_oid) throws
PerfSONARException {
try {
Statement st = jdbc.createStatement();
ResultSet rs;
@@ -206,11 +203,11 @@
} catch (SQLException e) {
String m= ROOT_LOG+"error while fetching from the database: "
+ e.getMessage();
logger.error(m);
- throw new SystemException("error.tops.fetching", m);
+ throw new PerfSONARException("error.tops.fetching", m);
}
}
- protected void fillNetwork(Data networksData, int network_oid) throws
SystemException {
+ protected void fillNetwork(Data networksData, int network_oid) throws
PerfSONARException {
try {
Statement st = jdbc.createStatement();
ResultSet rs;
@@ -248,11 +245,11 @@
+ e.getMessage();
logger.error(m);
- throw new SystemException("error.tops.fetching", m);
+ throw new PerfSONARException("error.tops.fetching", m);
}
}
- protected void fillNodesNetworks(Data networksData, String domain_id)
throws SystemException {
+ protected void fillNodesNetworks(Data networksData, String domain_id)
throws PerfSONARException {
try {
int network_oid, network_interface_oid;
Statement st = jdbc.createStatement();
@@ -281,11 +278,11 @@
+ e.getMessage();
logger.error(m);
- throw new SystemException("error.tops.fetching", m);
+ throw new PerfSONARException("error.tops.fetching", m);
}
}
- protected void fillNodes(Data nodesData, String domain_id) throws
SystemException {
+ protected void fillNodes(Data nodesData, String domain_id) throws
PerfSONARException {
String m;
int node_id;
@@ -341,7 +338,7 @@
+ e.getMessage();
logger.error(m);
- throw new SystemException("error.tops.fetching", m);
+ throw new PerfSONARException("error.tops.fetching", m);
}
}
Modified:
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsJDBCComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsJDBCComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsJDBCComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -8,7 +8,7 @@
import org.perfsonar.commons.auxiliary.ComponentNames;
import
org.perfsonar.commons.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.commons.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.service.commons.exceptions.SystemException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
/**
* Action for simple Scheduler that registers with the LS
@@ -39,16 +39,16 @@
// ---------------------- component that loads action to scheduler
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
try {
logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance()
.getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "TopsJDBCComponent: Can't obtain Logger
component ";
- throw new SystemException(m);
+ throw new PerfSONARException(m);
}
logger.debug("TopsJDBCComponent: initializing component");
@@ -56,11 +56,11 @@
try {
config = (ConfigurationComponent)
AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "TopsJDBCComponent: Can't obtain Config
component ";
logger.error(m);
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
try {
@@ -68,7 +68,7 @@
} catch (Exception e) {
String m = "TopsJDBCComponent: Can't obtain
postgresql driver for JDBC access";
logger.error(m);
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
String jdbcURI = config.getProperty("component." +
componentName
@@ -86,7 +86,7 @@
String m = "TopsJDBCComponent: Can't obtain jdbc
connection: uri: "
+ jdbcURI + ", user: " + jdbcUSER +
", pass: " + jdbcPASS;
logger.error(m);
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
logger.debug("TopsJDBCComponent: component initialized");
Modified:
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsLSRegistrationComponent.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsLSRegistrationComponent.java
2007-05-14 13:43:22 UTC (rev 2377)
+++
trunk/perfsonar/src/org/perfsonar/service/topologyService/TopsLSRegistrationComponent.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -9,7 +9,6 @@
import org.perfsonar.commons.auxiliary.components.simplescheduler.Scheduler;
import
org.perfsonar.commons.auxiliary.components.simplescheduler.SchedulerAction;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import
org.perfsonar.service.commons.registration.GenericServiceLSRegistrator;
import
org.perfsonar.service.commons.registration.InformationXMLFileServiceContent;
import
org.perfsonar.service.commons.registration.PropertiesServiceDescription;
@@ -88,28 +87,28 @@
// ---------------------- component that loads action to scheduler
- public void initComponent() throws SystemException {
+ public void initComponent() throws PerfSONARException {
try {
logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance()
.getComponent(ComponentNames.LOGGER);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
- throw new SystemException("error.tops.dependency",
+ throw new PerfSONARException("error.tops.dependency",
"TopsLSRegistrationComponent: Can't
obtain Logger component");
}
try {
config = (ConfigurationComponent)
AuxiliaryComponentManager
.getInstance().getComponent(ComponentNames.CONFIG);
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "TopsLSRegistrationComponent: Can't obtain
Config component";
logger.error(m);
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
// Get configuration
@@ -122,7 +121,7 @@
interval = Integer.parseInt(intervalVal);
} catch (RuntimeException e) {
// possibly not an integer - keep default interval
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
// no property - keep default interval
}
@@ -149,17 +148,17 @@
String m = "TopsLSRegistrationComponent:
Can't obtain scheduler component";
logger.error(m);
- throw new
SystemException("error.tops.dependency", m);
+ throw new
PerfSONARException("error.tops.dependency", m);
}
- } catch (SystemException e) {
+ } catch (PerfSONARException e) {
String m = "TopsLSRegistrationComponent: no
[component."
+ componentName +
".scheduler_component] parameter. "
+ e.getMessage();
logger.error(m);
- throw new SystemException("error.tops.dependency", m);
+ throw new PerfSONARException("error.tops.dependency",
m);
}
// add cleanup action to scheduler
Modified: trunk/perfsonar/src/org/perfsonar/service/web/RequestHandler.java
===================================================================
--- trunk/perfsonar/src/org/perfsonar/service/web/RequestHandler.java
2007-05-14 13:43:22 UTC (rev 2377)
+++ trunk/perfsonar/src/org/perfsonar/service/web/RequestHandler.java
2007-05-14 14:05:48 UTC (rev 2378)
@@ -16,7 +16,6 @@
import org.perfsonar.commons.messages.MessageHandlerFactory;
import org.perfsonar.commons.util.XMLUtils;
import org.perfsonar.service.commons.exceptions.PerfSONARException;
-import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.util.ResultCodesUtil;
import org.w3c.dom.Document;
@@ -181,7 +180,7 @@
logger.error("RequestHandler: " +
"Message object constructed as null from request");
- throw new SystemException("error.common.parse_error",
+ throw new PerfSONARException("error.common.parse_error",
"RequestHandler: " +
"Server could not construct a message object " +
"from the request due to unknown error. " +
- perfsonar: r2378 - in trunk/perfsonar/src/org/perfsonar: client/commons/requests client/commons/requests/lookupService commons/auxiliary commons/auxiliary/components/configuration commons/auxiliary/components/configuration/properties commons/auxiliary/components/mapping commons/auxiliary/components/scheduler commons/auxiliary/components/scheduler/actions commons/auxiliary/components/simplescheduler commons/container/listeners commons/messages commons/util service/commons/authn service/commons/authn/tokens service/commons/engine service/commons/exceptions service/commons/measurementExecutor service/commons/registration service/commons/storage service/commons/storage/xmldb service/commons/storage/xmldb/exist service/commons/storage/xmldb/exist/rest service/commons/storage/xmldb/exist/xmlrpc service/commons/storage/xmlfile service/lookupService/xmlType service/measurementArchive/eventTypeConfig service/measurementArchive/metadataConfig service/measurementArchive/metadat aConfig/queryGenerator service/measurementArchive/register service/measurementArchive/rrdType service/measurementArchive/sqlType service/measurementArchive/sqlType/fetch service/measurementArchive/sqlType/store service/measurementPoint/commandLine service/measurementPoint/commandLine/tools service/measurementPoint/flowType service/measurementPoint/nmsType service/measurementPoint/register service/measurementPoint/snmpType service/measurementPoint/tracefileCaptureType service/measurementPoint/tracefileCaptureType/servlets service/testHarness/nmsType service/testHarness/snmpType service/topologyService service/web, svnlog, 05/14/2007
Archive powered by MHonArc 2.6.16.