Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3682 - in trunk/perfsonar_base: . ant doc src/main/java/org/perfsonar/base/auxiliary src/main/java/org/perfsonar/base/auxiliary/components src/main/java/org/perfsonar/base/auxiliary/components/authn src/main/java/org/perfsonar/base/auxiliary/components/context src/main/java/org/perfsonar/base/auxiliary/components/context/inMemory src/main/java/org/perfsonar/base/auxiliary/components/scheduler src/main/java/org/perfsonar/base/auxiliary/components/scheduler/actions src/main/java/org/perfsonar/base/util src/main/java/org/perfsonar/client/axis src/main/java/org/perfsonar/client/base/authn src/main/java/org/perfsonar/client/base/authn/edugain src/main/java/org/perfsonar/client/base/authn/saslca src/main/java/org/perfsonar/client/base/requests/lookupService src/main/java/org/perfsonar/client/testHarness src/main/java/org/perfsonar/service/base/authn src/main/java/org/perfsonar/service/base/authn/tokens src/main/java/org/perfsonar/service/base/container/listener s src/main/java/org/perfsonar/service/base/engine src/main/java/org/perfsonar/service/base/measurementExecutor src/main/java/org/perfsonar/service/base/messages src/main/java/org/perfsonar/service/base/registration src/main/java/org/perfsonar/service/base/storage src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc src/main/java/org/perfsonar/service/base/storage/xmlfile src/main/java/org/perfsonar/service/base/transport src/main/java/org/perfsonar/service/base/util src/main/java/org/perfsonar/service/base/web src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig src/main/java/org/perfsonar/service/measurementArchive/metadataConfig src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator src/main/java/org/perfsonar/service/measurementArchive/register

Subject: perfsonar development work

List archive

perfsonar: r3682 - in trunk/perfsonar_base: . ant doc src/main/java/org/perfsonar/base/auxiliary src/main/java/org/perfsonar/base/auxiliary/components src/main/java/org/perfsonar/base/auxiliary/components/authn src/main/java/org/perfsonar/base/auxiliary/components/context src/main/java/org/perfsonar/base/auxiliary/components/context/inMemory src/main/java/org/perfsonar/base/auxiliary/components/scheduler src/main/java/org/perfsonar/base/auxiliary/components/scheduler/actions src/main/java/org/perfsonar/base/util src/main/java/org/perfsonar/client/axis src/main/java/org/perfsonar/client/base/authn src/main/java/org/perfsonar/client/base/authn/edugain src/main/java/org/perfsonar/client/base/authn/saslca src/main/java/org/perfsonar/client/base/requests/lookupService src/main/java/org/perfsonar/client/testHarness src/main/java/org/perfsonar/service/base/authn src/main/java/org/perfsonar/service/base/authn/tokens src/main/java/org/perfsonar/service/base/container/listener s src/main/java/org/perfsonar/service/base/engine src/main/java/org/perfsonar/service/base/measurementExecutor src/main/java/org/perfsonar/service/base/messages src/main/java/org/perfsonar/service/base/registration src/main/java/org/perfsonar/service/base/storage src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc src/main/java/org/perfsonar/service/base/storage/xmlfile src/main/java/org/perfsonar/service/base/transport src/main/java/org/perfsonar/service/base/util src/main/java/org/perfsonar/service/base/web src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig src/main/java/org/perfsonar/service/measurementArchive/metadataConfig src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator src/main/java/org/perfsonar/service/measurementArchive/register


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3682 - in trunk/perfsonar_base: . ant doc src/main/java/org/perfsonar/base/auxiliary src/main/java/org/perfsonar/base/auxiliary/components src/main/java/org/perfsonar/base/auxiliary/components/authn src/main/java/org/perfsonar/base/auxiliary/components/context src/main/java/org/perfsonar/base/auxiliary/components/context/inMemory src/main/java/org/perfsonar/base/auxiliary/components/scheduler src/main/java/org/perfsonar/base/auxiliary/components/scheduler/actions src/main/java/org/perfsonar/base/util src/main/java/org/perfsonar/client/axis src/main/java/org/perfsonar/client/base/authn src/main/java/org/perfsonar/client/base/authn/edugain src/main/java/org/perfsonar/client/base/authn/saslca src/main/java/org/perfsonar/client/base/requests/lookupService src/main/java/org/perfsonar/client/testHarness src/main/java/org/perfsonar/service/base/authn src/main/java/org/perfsonar/service/base/authn/tokens src/main/java/org/perfsonar/service/base/container/listener s src/main/java/org/perfsonar/service/base/engine src/main/java/org/perfsonar/service/base/measurementExecutor src/main/java/org/perfsonar/service/base/messages src/main/java/org/perfsonar/service/base/registration src/main/java/org/perfsonar/service/base/storage src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc src/main/java/org/perfsonar/service/base/storage/xmlfile src/main/java/org/perfsonar/service/base/transport src/main/java/org/perfsonar/service/base/util src/main/java/org/perfsonar/service/base/web src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig src/main/java/org/perfsonar/service/measurementArchive/metadataConfig src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator src/main/java/org/perfsonar/service/measurementArchive/register
  • Date: Tue, 15 Apr 2008 21:54:23 -0400

Author: michael.bischoff
Date: 2008-04-15 21:54:22 -0400 (Tue, 15 Apr 2008)
New Revision: 3682

Added:

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/context/

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/context/PerfsonarContextComponent.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/context/inMemory/

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/context/inMemory/InMemoryContext.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/context/

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationContextServiceContent.java
Removed:

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/FlowQueryGenerator.java
Modified:
trunk/perfsonar_base/ant/const.properties
trunk/perfsonar_base/doc/ChangeLog.txt
trunk/perfsonar_base/pom.xml

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/AuxiliaryComponentManager.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/ComponentNames.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/authn/DynamicCrypto.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/authn/SOAPUtil.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/ScheduleMessageHandler.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/ScheduleMessageParser.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/Scheduler.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/actions/SchedulerAction.java

trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/TimeDateUtil.java
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/XMLUtils.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/axis/AxisClient.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/AuthNSAMLData.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/WSSAuthNSAMLData.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/edugain/EduGAINFilterHelper.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/saslca/SASLCAClient.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/saslca/SASLCAClientConfiguration.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/EchoRequestGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSDeregisterRequestGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSKeepaliveRequestGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSQueryRequestGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSRegisterRequestGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/testHarness/SOAPClientMulti.java

trunk/perfsonar_base/src/main/java/org/perfsonar/client/testHarness/SOAPX509Client.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/AADispatchSOAPProtocol.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/tokens/SecTokenSOAPManager.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/container/listeners/StartupInitializer.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/measurementExecutor/MeasurementExecutor.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/BaseChaining.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/DataRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/EchoRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSCleanupRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSDeregisterRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSKeepaliveRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSQueryRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSRegisterRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LookupInfoRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementArchiveStoreKeyRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementArchiveStoreRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MessageHandlerFactory.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MetadataKeyRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/Request.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/SetupDataDBRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/SetupDataRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/TOPSRequest.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/GenericServiceLSRegistrator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationExistDbXmlrpcServiceContent.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationXMLFileServiceContent.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSRegistrationComponent.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/PropertiesServiceDescription.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/NMWGStorageManager.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmlfile/XmlFileDataRepository.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmlfile/XmlFileStorageManager.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/FileTransportFactory.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/Location.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/SSHFileTransport.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/util/ResultCodesUtil.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web/RequestHandler.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfiguration.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/DiscardsQueryGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/ErrorsQueryGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
Log:
- Change: fixed most type-safe warnings.
- Change: fixed unused import warnings.
- Change: added functionality provided by
service.measurementArchive.register.LSRegistrationComponent to
service.base.registration.LSRegistrationComponent making
service.measurementArchive.register.LSRegistrationComponent obsolete
- Change: defended against possible multi-threading problems.
- Change: refactored requestHandler
- Change: fixed some spelling errors
- Change: removed bogus return and empty statements
- Change: Improved abstractness here and there (ArrayList list = new
ArrayList() -> List list = new ArrayList()) avoid programming against
implementations where abstract interfaces exists.
- Change: added context auxiliary component


Modified: trunk/perfsonar_base/ant/const.properties
===================================================================
--- trunk/perfsonar_base/ant/const.properties 2008-04-16 01:05:00 UTC (rev
3681)
+++ trunk/perfsonar_base/ant/const.properties 2008-04-16 01:54:22 UTC (rev
3682)
@@ -13,4 +13,4 @@
# name of jar file to be created
jarfilename=perfsonar-base
# version of the product (will be included in the final name of jar file)
-version=1.0.20080331
+version=1.0.20080416

Modified: trunk/perfsonar_base/doc/ChangeLog.txt
===================================================================
--- trunk/perfsonar_base/doc/ChangeLog.txt 2008-04-16 01:05:00 UTC (rev
3681)
+++ trunk/perfsonar_base/doc/ChangeLog.txt 2008-04-16 01:54:22 UTC (rev
3682)
@@ -1,5 +1,16 @@
perfSONAR Base

+2008-04-16 v1.0.20080416
+- Change: fixed most type-safe warnings.
+- Change: fixed unused import warnings.
+- Change: added functionality provided by
service.measurementArchive.register.LSRegistrationComponent to
service.base.registration.LSRegistrationComponent making
service.measurementArchive.register.LSRegistrationComponent obsolete
+- Change: defended against possible multi-threading problems.
+- Change: refactored requestHandler
+- Change: fixed some spelling errors
+- Change: removed bogus return and empty statements
+- Change: Improved abstractness here and there (ArrayList list = new
ArrayList() -> List list = new ArrayList()) avoid programming against
implementations where abstract interfaces exists.
+- Change: added context auxiliary component
+
2008-03-10 v1.0.20080310
- New: message type ErrorResponse introduced


Modified: trunk/perfsonar_base/pom.xml
===================================================================
--- trunk/perfsonar_base/pom.xml 2008-04-16 01:05:00 UTC (rev 3681)
+++ trunk/perfsonar_base/pom.xml 2008-04-16 01:54:22 UTC (rev 3682)
@@ -7,7 +7,7 @@
<artifactId>perfsonar-base</artifactId>
<packaging>jar</packaging>
<name>Perfsonar Base package</name>
- <version>1.0.20080303</version>
+ <version>1.0.20080416</version>
<description>
The perfSONAR base provides a number of common, shared
classes which can be used by
MA, MP and Clients.
@@ -21,9 +21,9 @@
</issueManagement>
<inceptionYear>2007</inceptionYear>
<scm>
- <connection>scm:svn:anonsvn.internet2.edu/svn/</connection>
+
<connection>scm:svn:http://anonsvn.internet2.edu/svn/</connection>
<developerConnection>
- scm:svn:svn.internet2.edu/svn/perfsonar/
+ scm:svn:http://svn.internet2.edu/svn/perfsonar/
</developerConnection>
</scm>
<organization>
@@ -344,11 +344,13 @@
<minimumTokens>100</minimumTokens>
<targetJdk>1.5</targetJdk>
</configuration>
- </plugin>
+ </plugin>
+ <!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changelog-plugin</artifactId>
</plugin>
+ -->
</plugins>
</reporting>
</project>

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/AuxiliaryComponentManager.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/AuxiliaryComponentManager.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/AuxiliaryComponentManager.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,9 +5,10 @@
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
import java.util.logging.Logger;

import org.perfsonar.base.exceptions.PerfSONARException;
@@ -36,14 +37,14 @@

private static volatile Object initialiseMutex = new Object();

- private static boolean initialised;
- private static boolean isInitialising;
+ private static volatile boolean initialised;
+ private static volatile boolean isInitialising;

// ----------------------------------------------------- Instance
variables
/**
* Map of components (component_name, component object reference)
*/
- private Map<String,AuxiliaryComponent> components;
+ private ConcurrentMap<String,AuxiliaryComponent> components = new
ConcurrentHashMap<String,AuxiliaryComponent>();

private String webInfLocation;

@@ -52,9 +53,7 @@
* Private constructor - object can be created by static getInstance()
* method (singleton pattern) only
*/
- private AuxiliaryComponentManager() {
- components = new HashMap<String,AuxiliaryComponent>();
- }
+ private AuxiliaryComponentManager() {}

// --------------------------------------------------------- Public
methods
/**
@@ -119,15 +118,17 @@
* @param componentClassName
* @throws PerfSONARException
*/
- public AuxiliaryComponent loadComponent(String componentName, String
componentClassName)
- throws PerfSONARException {
+ public AuxiliaryComponent loadComponent(String componentName, String
componentClassName) throws PerfSONARException {

+ if(components.containsKey(componentName)) {
+ return components.get(componentName);
+ }
+
AuxiliaryComponent component = null;

- try {
-
+ try {
//create component from classname
- Class componentClass = Class.forName(componentClassName);
+ Class<?> componentClass = Class.forName(componentClassName);
component = (AuxiliaryComponent)componentClass.newInstance();

//set component name
@@ -135,7 +136,6 @@

//add component to the list of components
setComponent(componentName, component);
-
} catch (ClassNotFoundException ex) {
String m = "AUXComponentManager: " +
"can't create component ["+componentName+"]. " +
@@ -172,9 +172,7 @@
* @return Auxiliary Component
*/
public AuxiliaryComponent getComponent(String name) {
-
- return components.get(name);
-
+ return components.get(name);
}

/**
@@ -211,7 +209,7 @@
}

/**
- * For standalone applications
+ * For stand-alone applications
*/
public static void main(String[] args) throws PerfSONARException {

@@ -221,7 +219,7 @@
}

/**
- * Profides a consistent way to lookup files within perfsonar.
+ * Provides a consistent way to lookup files within perfSONAR.
* @return File at the specified location or null if not found.
*/
public static File lookupFile(String location) {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/ComponentNames.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/ComponentNames.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/ComponentNames.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -17,6 +17,10 @@
public static final String REGISTRATOR = "registrator";

public static final String AUTHN = "authn";
+
+ /** The context aux-component is a simple in-application map
+ * that allows sharing of data */
+ public static final String CONTEXT = "context";


} //ComponentNames

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/authn/DynamicCrypto.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/authn/DynamicCrypto.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/authn/DynamicCrypto.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -3,7 +3,7 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.math.BigInteger;
-import java.security.InvalidAlgorithmParameterException;
+import java.security.GeneralSecurityException;
import java.security.Key;
import java.security.KeyStore;
import java.security.KeyStoreException;
@@ -14,7 +14,6 @@
import java.security.PublicKey;
import java.security.cert.CertPath;
import java.security.cert.CertPathValidator;
-import java.security.cert.CertPathValidatorException;
import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
@@ -66,9 +65,9 @@
if (alias != null)
return alias;
// Use brute force search
- Enumeration e = keystore.aliases();
+ Enumeration<String> e = keystore.aliases();
while (e.hasMoreElements()) {
- alias = (String) e.nextElement();
+ alias = e.nextElement();
X509Certificate cert2 = (X509Certificate)
keystore.getCertificate(alias);
if (cert2.equals(cert)) {
return alias;
@@ -87,11 +86,10 @@

public String getAliasForX509Cert(byte[] skiBytes) throws
WSSecurityException {
Certificate cert = null;
- boolean found = false;

try {
- for (Enumeration e = keystore.aliases(); e.hasMoreElements();) {
- String alias = (String) e.nextElement();
+ for (Enumeration<String> e = keystore.aliases();
e.hasMoreElements();) {
+ String alias = e.nextElement();
Certificate[] certs = keystore.getCertificateChain(alias);
if (certs == null || certs.length == 0) {
// no cert chain, so lets check if getCertificate gives
us a result.
@@ -133,17 +131,17 @@
* (this should work as well).
* --- remains to be tested in several ways --
*/
- private String getAliasForX509Cert(String issuer, BigInteger
serialNumber,
+ private String getAliasForX509Cert(String issuer, BigInteger
serialNumber,
boolean useSerialNumber)
throws WSSecurityException {
- Vector issuerRDN = splitAndTrim(issuer);
+ Vector<String> issuerRDN = splitAndTrim(issuer);
X509Certificate x509cert = null;
- Vector certRDN = null;
+ Vector<String> certRDN = null;
Certificate cert = null;

try {
- for (Enumeration e = keystore.aliases();
e.hasMoreElements();) {
- String alias = (String) e.nextElement();
+ for (Enumeration<String> e = keystore.aliases();
e.hasMoreElements();) {
+ String alias = e.nextElement();
Certificate[] certs =
keystore.getCertificateChain(alias);
if (certs == null || certs.length == 0) {
// no cert chain, so lets check if getCertificate
gives us a result.
@@ -186,8 +184,8 @@
"noSHA1availabe");
}
try {
- for (Enumeration e = keystore.aliases(); e.hasMoreElements();) {
- String alias = (String) e.nextElement();
+ for (Enumeration<String> e = keystore.aliases();
e.hasMoreElements();) {
+ String alias = e.nextElement();
Certificate[] certs = keystore.getCertificateChain(alias);
if (certs == null || certs.length == 0) {
// no cert chain, so lets check if getCertificate gives
us a result.
@@ -222,9 +220,9 @@
return null;
}

- private Vector splitAndTrim(String inString) {
+ private Vector<String> splitAndTrim(String inString) {
X509NameTokenizer nmTokens = new X509NameTokenizer(inString);
- Vector vr = new Vector();
+ Vector<String> vr = new Vector<String>();

while (nmTokens.hasMoreTokens()) {
vr.add(nmTokens.nextToken());
@@ -236,17 +234,17 @@
public String[] getAliasesForDN(String subjectDN) throws
WSSecurityException {

// Store the aliases found
- Vector aliases = new Vector();
+ Vector<String> aliases = new Vector<String>();

Certificate cert = null;

// The DN to search the keystore for
- Vector subjectRDN = splitAndTrim(subjectDN);
+ Vector<String> subjectRDN = splitAndTrim(subjectDN);

// Look at every certificate in the keystore
try {
- for (Enumeration e = keystore.aliases(); e.hasMoreElements();) {
- String alias = (String) e.nextElement();
+ for (Enumeration<String> e = keystore.aliases();
e.hasMoreElements();) {
+ String alias = e.nextElement();

Certificate[] certs = keystore.getCertificateChain(alias);
if (certs == null || certs.length == 0) {
@@ -260,7 +258,7 @@
cert = certs[0];
}
if (cert instanceof X509Certificate) {
- Vector foundRDN = splitAndTrim(((X509Certificate)
cert).getSubjectDN().getName());
+ Vector<String> foundRDN =
splitAndTrim(((X509Certificate) cert).getSubjectDN().getName());

if (subjectRDN.equals(foundRDN)) {
aliases.add(alias);
@@ -282,7 +280,7 @@

public byte[] getCertificateData(boolean reverse, X509Certificate[]
certs)
throws WSSecurityException {
- Vector list = new Vector();
+ Vector<X509Certificate> list = new Vector<X509Certificate>();
for (int i = 0; i < certs.length; i++) {
if (reverse) {
list.insertElementAt(certs[i], 0);
@@ -419,6 +417,7 @@
return abyte0;
}

+ @SuppressWarnings("unchecked") // the data must only contain
X509Certificates
public X509Certificate[] getX509Certificates(byte[] data, boolean
reverse)
throws WSSecurityException {
InputStream in = new ByteArrayInputStream(data);
@@ -429,11 +428,11 @@
throw new
WSSecurityException(WSSecurityException.SECURITY_TOKEN_UNAVAILABLE,
"parseError");
}
- List l = path.getCertificates();
+ List<X509Certificate> l = (List<X509Certificate>)
path.getCertificates();
X509Certificate[] certs = new X509Certificate[l.size()];
- Iterator iterator = l.iterator();
+ Iterator<X509Certificate> iterator = l.iterator();
for (int i = 0; i < l.size(); i++) {
- certs[(reverse) ? (l.size() - 1 - i) : i] = (X509Certificate)
iterator.next();
+ certs[(reverse) ? (l.size() - 1 - i) : i] = iterator.next();
}
return certs;
}
@@ -455,9 +454,8 @@
throws WSSecurityException {
try {
// Generate cert path
- java.util.List certList =
java.util.Arrays.asList(certs);
- CertPath path =
this.getCertificateFactory().generateCertPath(
- certList);
+ List<X509Certificate> certList =
java.util.Arrays.asList(certs);
+ CertPath path =
this.getCertificateFactory().generateCertPath(certList);

// Use the certificates in the keystore as
TrustAnchors
PKIXParameters param = new
PKIXParameters(this.keystore);
@@ -476,32 +474,14 @@

provider);
}
certPathValidator.validate(path, param);
- } catch (NoSuchProviderException ex) {
- throw new
WSSecurityException(WSSecurityException.FAILURE,
- "certpath",
new Object[] { ex.getMessage() },
- (Throwable)
ex);
- } catch (NoSuchAlgorithmException ex) {
- throw new
WSSecurityException(WSSecurityException.FAILURE,
- "certpath",
new Object[] { ex.getMessage() },
- (Throwable)
ex);
- } catch (CertificateException ex) {
- throw new
WSSecurityException(WSSecurityException.FAILURE,
- "certpath",
new Object[] { ex.getMessage() },
- (Throwable)
ex);
- } catch (InvalidAlgorithmParameterException ex) {
- throw new
WSSecurityException(WSSecurityException.FAILURE,
- "certpath",
new Object[] { ex.getMessage() },
- (Throwable)
ex);
- } catch (CertPathValidatorException ex) {
- throw new
WSSecurityException(WSSecurityException.FAILURE,
- "certpath",
new Object[] { ex.getMessage() },
- (Throwable)
ex);
- } catch (KeyStoreException ex) {
- throw new
WSSecurityException(WSSecurityException.FAILURE,
- "certpath",
new Object[] { ex.getMessage() },
- (Throwable)
ex);
+ } catch (GeneralSecurityException ex) {
+ throw new WSSecurityException(
+ WSSecurityException.FAILURE,
+ "certpath",
+ new Object[] { ex.getMessage() },
+ ex
+ );
}
-
return true;
}


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/authn/SOAPUtil.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/authn/SOAPUtil.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/authn/SOAPUtil.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -1,13 +1,14 @@
package org.perfsonar.base.auxiliary.components.authn;

-import org.apache.xml.security.c14n.Canonicalizer;
-import org.w3c.dom.Document;
+import java.io.ByteArrayInputStream;

import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.dom.DOMSource;
-import java.io.ByteArrayInputStream;

+import org.apache.xml.security.c14n.Canonicalizer;
+import org.w3c.dom.Document;
+
public class SOAPUtil {

/**

Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/context/PerfsonarContextComponent.java

Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/context/inMemory/InMemoryContext.java

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/ScheduleMessageHandler.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/ScheduleMessageHandler.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/ScheduleMessageHandler.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -7,16 +7,15 @@

import java.util.Iterator;

+import org.ggf.ns.nmwg.base.v2_0.Element;
+import org.ggf.ns.nmwg.base.v2_0.Handler;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.exceptions.PerfSONARException;

-import org.ggf.ns.nmwg.base.v2_0.Element;
-import org.ggf.ns.nmwg.base.v2_0.Handler;


-
/**
* Message Handler for scheduler which extends nmwg handler by adding the
* capability to retrieve element objects and not just complete message
object

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/ScheduleMessageParser.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/ScheduleMessageParser.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/ScheduleMessageParser.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -15,13 +15,11 @@

import org.apache.xml.serialize.XMLSerializer;
import org.ggf.ns.nmwg.base.v2_0.Handler;
-
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.exceptions.PerfSONARException;
-
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/Scheduler.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/Scheduler.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/Scheduler.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -12,7 +12,6 @@
import org.ggf.ns.nmwg.base.v2_0.EventType;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.base.v2_0.Subject;
-
import org.perfsonar.base.auxiliary.AuxiliaryComponent;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
@@ -238,7 +237,7 @@
"at this time");

ScheduleMessageParser parser = new ScheduleMessageParser();
- Vector metadataIdVector = new Vector();
+ Vector<String> metadataIdVector = new Vector<String>();
for(int i=0;i<scheduleResults.length;i++) {

try{
@@ -274,7 +273,7 @@

for(int i = 0;i<metadataIdVector.size();i++) {

- leafMetadataIds[i] = (String)metadataIdVector.get(i);
+ leafMetadataIds[i] = metadataIdVector.get(i);
}

// there can be many leaves, where each leaf is the end part of a
schedule
@@ -477,13 +476,14 @@
"for the metadata chain containing head with
event type: "+
eventTypeString);

- Class tempClass;
+ Class<?> tempClass;
SchedulerAction schedulerActionClass;

try {

tempClass = Class.forName(schedulerActionType);

+ //TODO handle ClassCastException.
schedulerActionClass =
(SchedulerAction)tempClass.newInstance();


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/actions/SchedulerAction.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/actions/SchedulerAction.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/auxiliary/components/scheduler/actions/SchedulerAction.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -33,7 +33,8 @@
public abstract class SchedulerAction implements Runnable {

// TODO: thread.stop is used here but has been deprecated. Need to
replace this.
-
+ // FIXME thread.stop is deathlock prone
+
// ----------------------------Member Variables

public Metadata[] metadataList = null;

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/TimeDateUtil.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/TimeDateUtil.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/TimeDateUtil.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -15,7 +15,6 @@
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
-
import org.perfsonar.base.exceptions.PerfSONARException;


@@ -27,8 +26,6 @@
*/
public class TimeDateUtil {

-
-
/**
* Returns unix time value.
*
@@ -64,7 +61,6 @@

}

-
protected static String _getUnixTime(Parameter timeParemeter)
throws PerfSONARException {

@@ -73,7 +69,7 @@
try {
subelement = (Element) pchildren.firstElement();
} catch (NoSuchElementException nseex) {
- ;
+ // TODO handle.
}

if (subelement == null)
@@ -121,6 +117,4 @@

}

-
-
} //TimeDateUtil

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/XMLUtils.java
===================================================================
--- trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/XMLUtils.java
2008-04-16 01:05:00 UTC (rev 3681)
+++ trunk/perfsonar_base/src/main/java/org/perfsonar/base/util/XMLUtils.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -45,12 +45,8 @@
*/
public class XMLUtils {

+ // --------------------------------------------------------------
constants

-
- // --------------------------------------------------------------
constants
-
-
-
/* feature ids */
public static final String NAMESPACES_FEATURE_ID =
"http://xml.org/sax/features/namespaces";;
public static final String NAMESPACE_PREFIXES_FEATURE_ID =
"http://xml.org/sax/features/namespace-prefixes";;
@@ -60,12 +56,8 @@
public static final boolean DEFAULT_NAMESPACES = true;
public static final boolean DEFAULT_NAMESPACE_PREFIXES = true;

-
-
// --------------------------------------------------------- public
methods

-
-
/**
* Converts XML entities \&lt\; and \&gt\; to characters "<" ">".
* @param input input string
@@ -105,8 +97,7 @@
return stringOut.toString();

}
-
-
+
/**
* Serialize schema element. It omits all comments, document type and XML
* declaration, so can be used to generate part of XML document
@@ -142,7 +133,6 @@
}

}
-

/**
* Converts Message into DOM Document
@@ -169,7 +159,6 @@
}

}
-

/**
* Converts Document containing message into NMWG Message object
@@ -250,7 +239,6 @@

}

-
/**
* Returns nmwg object with specific tag name parsed from xml string
*/
@@ -264,7 +252,6 @@
return elements;
}

-
public static Map<String, Element> getElementFromXML(
String xmlPart, String[] tagNames, String parserFile) {

@@ -275,23 +262,17 @@

}

-
/**
* Remove HTML/XML tags from string
*/
-
public static String removeXMLTags(String xml) {

return xml.replaceAll("\\<[^\\>]+\\>","");

}

-
-
// --------------------------------------------------------- private
methods

-
-
public static ElemHandler parseNmwgXML(
String xmlPart, String parserFile) {

@@ -305,7 +286,7 @@


ElemHandler handler = new ElemHandler();
- handler.setConfigFile(parserFile);
+ Handler.setConfigFile(parserFile);

XMLReader parser = null;

@@ -350,7 +331,6 @@

}

-
public static String extractXMLTag(String str, String tag) {

//trim from blank spaces
@@ -484,8 +464,6 @@

// ---------------------------------------------------------- Inner class

-
-
/**
* Private class based on Handler class from ggf package.
* This adds a method to get any object representing xml tag
@@ -493,23 +471,18 @@
*/
private static class ElemHandler extends Handler {

-
public ElemHandler() {
super();
}

-
public Map<String, Element> getElement(String[] names) {
-
- Map<String, Element> map = new HashMap();
-
+ Map<String, Element> map = new HashMap<String, Element>();
Element element = null;
boolean found = false;

for (int i = 0; i < names.length; i++) {
-
- Iterator it = ht.values().iterator();

+ Iterator it = ht.values().iterator();
while(it.hasNext()) {

element = (Element) it.next();
@@ -519,9 +492,7 @@
found = true;
map.put(element.getId(), element);
}
-
}
-
}

if (!found) return null;
@@ -529,9 +500,6 @@
return map;
}

-
} //ElemHandler

-
-
} //XMLUtils

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/axis/AxisClient.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/axis/AxisClient.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/axis/AxisClient.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -6,17 +6,12 @@
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.message.SOAPBodyElement;
-
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.base.util.XMLUtils;
-
import org.w3c.dom.Document;

/**

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/AuthNSAMLData.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/AuthNSAMLData.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/AuthNSAMLData.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -1,12 +1,13 @@
package org.perfsonar.client.base.authn;

import java.security.PrivateKey;
+import java.security.cert.Certificate;
import java.util.Collection;

import org.opensaml.SAMLAssertion;
import org.perfsonar.base.exceptions.PerfSONARException;

public interface AuthNSAMLData {
- public Object addSAMLSTInMessage(Object message,SAMLAssertion
authAssertion,PrivateKey key,Collection certchain,String
cidPerfsonarResource,String cidPerfsonarClient) throws PerfSONARException;
- public Object addSAMLSTInMessage(Object message,SAMLAssertion
authAssertion,PrivateKey key,Collection certchain,String
cidPerfsonarResource,String cidPerfsonarClient,int ttl) throws
PerfSONARException;
+ public Object addSAMLSTInMessage(Object message,SAMLAssertion
authAssertion,PrivateKey key,Collection<Certificate> certchain,String
cidPerfsonarResource,String cidPerfsonarClient) throws PerfSONARException;
+ public Object addSAMLSTInMessage(Object message,SAMLAssertion
authAssertion,PrivateKey key,Collection<Certificate> certchain,String
cidPerfsonarResource,String cidPerfsonarClient,int ttl) throws
PerfSONARException;
}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/WSSAuthNSAMLData.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/WSSAuthNSAMLData.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/WSSAuthNSAMLData.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -58,14 +58,14 @@
private String digalg = MessageDigestAlgorithm.ALGO_ID_DIGEST_SHA1;

public Object addSAMLSTInMessage(Object message,
- SAMLAssertion authAssertion, PrivateKey key,
Collection certchain,
+ SAMLAssertion authAssertion, PrivateKey key,
Collection<Certificate> certchain,
String cidPerfsonarResource, String
cidPerfsonarClient)
throws PerfSONARException {
return addSAMLSTInMessage(message, authAssertion, key,
certchain, cidPerfsonarResource, cidPerfsonarClient, defaultTtl);
}

public Object addSAMLSTInMessage(Object message,
- SAMLAssertion authAssertion, PrivateKey key,
Collection certchain,
+ SAMLAssertion authAssertion, PrivateKey key,
Collection<Certificate> certchain,
String cidPerfsonarResource, String
cidPerfsonarClient, int ttl)
throws PerfSONARException {
if (!(message instanceof SOAPBodyElement)) {
@@ -84,8 +84,8 @@
}
KeyStore ks=crypto.getKeyStore();
try {
- Certificate[] certs=new Certificate[certchain.size()];
- certs=(Certificate[])certchain.toArray(certs);
+ Certificate[] certs = new Certificate[certchain.size()];
+ certs = certchain.toArray(certs);
ks.setKeyEntry("xmlsec", (Key)key, "security".toCharArray(),
certs);
} catch (KeyStoreException e) {
throw new PerfSONARException("error.as.crypto","WSSAuthNData:
"+e.getMessage());
@@ -164,7 +164,7 @@
return envelope;
}

- private SAMLAssertion getAssertionAsSecurityToken(SAMLAssertion
authAssertion,PrivateKey key,Collection certchain,String
cidPerfsonarResource,String cidPerfsonarClient) throws SAMLException {
+ private SAMLAssertion getAssertionAsSecurityToken(SAMLAssertion
authAssertion,PrivateKey key,Collection<Certificate> certchain,String
cidPerfsonarResource,String cidPerfsonarClient) throws SAMLException {
SAMLAssertion authStatementAssertion=new SAMLAssertion();

// Adding the client information

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/edugain/EduGAINFilterHelper.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/edugain/EduGAINFilterHelper.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/edugain/EduGAINFilterHelper.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -12,10 +12,11 @@

public class EduGAINFilterHelper {

+ @SuppressWarnings("unchecked") // should be save
public static SAMLAssertion getAuthenticationAssertion(HttpSession
session) {
SAMLAssertion authStatementAssertion=null;

- Enumeration attrs = session.getAttributeNames();
+ Enumeration<String> attrs = session.getAttributeNames();
while (attrs.hasMoreElements()&&authStatementAssertion==null)
{
String attrName = (String)attrs.nextElement();
Object attrValRaw = session.getAttribute(attrName);

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/saslca/SASLCAClient.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/saslca/SASLCAClient.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/saslca/SASLCAClient.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -3,7 +3,6 @@
import java.security.KeyPair;
import java.security.NoSuchAlgorithmException;
import java.security.cert.X509Certificate;
-import java.text.DateFormat;
import java.util.Map;

import javax.security.auth.Subject;
@@ -11,7 +10,6 @@
import org.perfsonar.base.exceptions.PerfSONARException;

import codec.pkcs10.CertificationRequest;
-
import edu.psu.sasl_ca.ClientProtocolHandler;
import edu.psu.sasl_ca.util.StringConstants;
import edu.psu.sasl_ca.util.Util;
@@ -54,9 +52,11 @@
subj.getPrincipals().add(userID);

try {
- edugainCSR = clientProtocolHandler.generateCSR(
- StringConstants.edugainCertIdentifier,
eduGainKeyPair,
- "SHA1withRSA");
+ edugainCSR = ClientProtocolHandler.generateCSR(
+ StringConstants.edugainCertIdentifier,
+ eduGainKeyPair,
+ "SHA1withRSA"
+ );
} catch (Exception e) {
String m = "SASLCAClient: Error generating the CSR:
"+e.getMessage();
throw new PerfSONARException(m);

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/saslca/SASLCAClientConfiguration.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/saslca/SASLCAClientConfiguration.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/authn/saslca/SASLCAClientConfiguration.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -45,12 +45,8 @@

package org.perfsonar.client.base.authn.saslca;

-import java.io.InputStream;
-import java.io.IOException;
-import java.io.FileInputStream;
-import java.util.Map;
import java.util.HashMap;
-import java.util.Properties;
+import java.util.Map;

import javax.security.auth.callback.CallbackHandler;

@@ -60,11 +56,6 @@
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.exceptions.PerfSONARException;

-import com.sun.security.auth.callback.TextCallbackHandler;
-
-import edu.psu.sasl_ca.apps.client.subject.MyOwnCallbackHandler;
-import edu.psu.sasl_ca.util.MissingPropertyException;
-import edu.psu.sasl_ca.util.OptionalPropertyNames;
import edu.psu.sasl_ca.util.StringConstants;

public class SASLCAClientConfiguration {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/EchoRequestGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/EchoRequestGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/EchoRequestGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -9,8 +9,8 @@
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.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.client.base.requests.RequestGenerator;
-import org.perfsonar.base.exceptions.PerfSONARException;

/**
* @author Maciej Glowiak

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSDeregisterRequestGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSDeregisterRequestGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSDeregisterRequestGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -9,8 +9,8 @@
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.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.client.base.requests.RequestGenerator;
-import org.perfsonar.base.exceptions.PerfSONARException;


/**

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSKeepaliveRequestGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSKeepaliveRequestGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSKeepaliveRequestGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -9,8 +9,8 @@
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.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.client.base.requests.RequestGenerator;
-import org.perfsonar.base.exceptions.PerfSONARException;

/**
* @author Maciej Glowiak

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSQueryRequestGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSQueryRequestGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSQueryRequestGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -9,8 +9,8 @@
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.lookup.xquery.v1_0.Subject;
+import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.client.base.requests.RequestGenerator;
-import org.perfsonar.base.exceptions.PerfSONARException;


/**

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSRegisterRequestGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSRegisterRequestGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/base/requests/lookupService/LSRegisterRequestGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -1,6 +1,7 @@
package org.perfsonar.client.base.requests.lookupService;


+import java.io.File;
import java.util.Collection;
import java.util.Map;

@@ -18,12 +19,12 @@
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceType;
import org.ggf.ns.nmwg.tools.org.perfsonar.service.v1_0.ServiceVersion;
import org.ggf.ns.nmwg.tools.org.perfsonar.v1_0.Subject;
-import org.perfsonar.client.base.requests.RequestGenerator;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
+import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.base.util.XMLUtils;
-import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.client.base.requests.RequestGenerator;

/**
* This class is responsible for creating LSRegisterRequest
@@ -180,11 +181,14 @@
//put them

//TODO: get rid of getting parser file from CONFIG here
- if (parserFile==null)
- parserFile = ((ConfigurationComponent)
- AuxiliaryComponentManager.getInstance().
- getComponent(ComponentNames.CONFIG)).
- getProperty("service.sax_parser.config");
+ if (parserFile==null) {
+ parserFile = ((ConfigurationComponent)
AuxiliaryComponentManager.getInstance()
+
.getComponent(ComponentNames.CONFIG)).getProperty("service.sax_parser.config");
+ File file = AuxiliaryComponentManager.lookupFile(parserFile);
+ if(file!=null) {
+ parserFile = file.getAbsolutePath();
+ }
+ }

for (int i=0; i<metadataElements.length; i++) {

@@ -254,10 +258,8 @@

}

- public Map getCommonParameters() {
-
- return commonParameters;
-
+ public Map<String,String> getCommonParameters() {
+ return commonParameters;
}

public String getParserFile() {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/testHarness/SOAPClientMulti.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/testHarness/SOAPClientMulti.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/testHarness/SOAPClientMulti.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -19,10 +19,8 @@
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.message.SOAPBodyElement;
-
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
-
import org.w3c.dom.Document;



Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/client/testHarness/SOAPX509Client.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/client/testHarness/SOAPX509Client.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/client/testHarness/SOAPX509Client.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -19,12 +19,10 @@
import org.apache.axis.utils.XMLUtils;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
-
+import org.perfsonar.client.base.authn.AuthNDataFactory;
+import org.perfsonar.client.base.authn.AuthNX509Data;
import org.w3c.dom.Document;

-import org.perfsonar.client.base.authn.AuthNX509Data;
-import org.perfsonar.client.base.authn.AuthNDataFactory;
-
/**
* Class which provides the basic web service (Doc/Lit) client capability
* without stubs but including the possibility of sending the X.509

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/AADispatchSOAPProtocol.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/AADispatchSOAPProtocol.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/AADispatchSOAPProtocol.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -110,7 +110,7 @@
}

javax.xml.soap.SOAPHeader
header=(javax.xml.soap.SOAPHeader)req.getSecurityToken().getSecToken();
- Iterator it=header.examineAllHeaderElements();
+ Iterator<?> it=header.examineAllHeaderElements();
while (it.hasNext()) {
SOAPHeaderElement
he=(SOAPHeaderElement)it.next();


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/tokens/SecTokenSOAPManager.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/tokens/SecTokenSOAPManager.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/tokens/SecTokenSOAPManager.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -6,7 +6,6 @@

import javax.xml.namespace.NamespaceContext;
import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeaderElement;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
@@ -26,7 +25,6 @@
import org.perfsonar.base.exceptions.PerfSONARException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class SecTokenSOAPManager implements SecTokenManager {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/container/listeners/StartupInitializer.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/container/listeners/StartupInitializer.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/container/listeners/StartupInitializer.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -21,7 +21,6 @@
*
*/
public class StartupInitializer implements ServletContextListener {
-
// --------------------------------------------------------- Public
methods
/**
* Context initialized event handler.
@@ -39,22 +38,19 @@
e.printStackTrace();
}
}
-
/**
* Context uninitialized event handler.
*
*
* @param sce servlet context event
*/
- public void contextDestroyed(ServletContextEvent sce) {
-
- // Stop all the component threads (running in a seperate thread).
+ public void contextDestroyed(ServletContextEvent sce) {
+ // Stop all the component threads (running in a separate thread).
// They should implement AuxiliaryThreadedComponent instead of
// AuxiliaryComponent
try {

- Iterator<Map.Entry<String, AuxiliaryComponent>> it =
- AuxiliaryComponentManager.getInstance().componentsIterator();
+ Iterator<Map.Entry<String, AuxiliaryComponent>> it =
AuxiliaryComponentManager.getInstance().componentsIterator();

while (it != null && it.hasNext()) {

@@ -70,11 +66,8 @@
}
}

- } catch (Exception e) {
-
- System.err.println(
- "Error stopping perfSONAR threaded components: " + e);
-
+ } catch (Exception e) {
+ System.err.println("Error stopping perfSONAR threaded
components: " + e);
}

}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/engine/ServiceEngineFactory.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -16,13 +16,11 @@
* @author loukik
*
* @see org.perfsonar.service.commons.engine.ServiceEngine
- *
+ * TODO provided a
{@link
ServiceEngine} is state-less
{@link
ServiceEngine}'s should be cached.
*/
public class ServiceEngineFactory {

-
-
- /**
+ /**
* Returns the instance of Service Engine.
*
* @param engineClassName class name of a service engine
@@ -32,13 +30,12 @@
* @throws PerfSONARException if an error was encountered while
* getting the instance
*/
- public static ServiceEngine getServiceEngine(String engineClassName)
- throws PerfSONARException {
+ public static ServiceEngine getServiceEngine(String engineClassName)
throws PerfSONARException {

// get a logger
- LoggerComponent logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
+ LoggerComponent logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);

- Class engineClass = null;
+ Class<?> engineClass = null;

// try to get the class for the given className
try {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/measurementExecutor/MeasurementExecutor.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/measurementExecutor/MeasurementExecutor.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/measurementExecutor/MeasurementExecutor.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -8,8 +8,6 @@
import org.ggf.ns.nmwg.base.v2_0.Message;
import org.perfsonar.base.exceptions.PerfSONARException;

-
-
/**
* This is an interface specification for MeasurementExecutor
*
@@ -17,7 +15,6 @@
*
*/
public interface MeasurementExecutor {
-

// ---------------------------------- public methods


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/BaseChaining.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/BaseChaining.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/BaseChaining.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -11,11 +11,9 @@
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.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
-
import org.perfsonar.base.exceptions.PerfSONARException;

/**

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/DataRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/DataRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/DataRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -8,13 +8,13 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;

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.base.exceptions.PerfSONARException;

/**
@@ -47,7 +47,7 @@
protected void addChainList(
Metadata head,
Map mdMap,
- ArrayList mdChain,
+ List<Metadata> mdChain,
boolean mustKey)
throws PerfSONARException
{
@@ -75,8 +75,7 @@
org.ggf.ns.nmwg.base.v2_0.Subject subj =
((org.ggf.ns.nmwg.base.v2_0.Subject)head.getSubject());
if(subj != null){
// Recurse again if this metadata is chained
- addChainList((Metadata)mdMap.get(subj.getMetadataIdRef()),
- mdMap,mdChain,mustKey);
+ addChainList((Metadata)mdMap.get(subj.getMetadataIdRef()),
mdMap,mdChain,mustKey);
}
// If there was no subject, a key is required or this is an invalid
// metadata
@@ -93,7 +92,6 @@
logger.debug(
"DataRequest.addChainList: Adding metadata(Id=" +
head.getId() + ")");
- return;
}

/**
@@ -121,7 +119,7 @@

Message atomResp = null;

- ArrayList mdChain = new ArrayList();
+ List<Metadata> mdChain = new ArrayList<Metadata>();

logger.debug("DataRequest.metaToKey: Iterate on data");

@@ -153,8 +151,7 @@
addChainList(reqmd,metadataMap,mdChain,false);

// Put current md chain and data in request bean
- logger.debug(
- "DataRequest.metaToKey: atomReq.addChild(metadata)");
+ logger.debug("DataRequest.metaToKey:
atomReq.addChild(metadata)");

/* clear message and fill with new Atomic Request */
atomReq.clearData();
@@ -165,7 +162,7 @@
* ignore return - this md was already in another message
* no worries about adding it in another.
*/
- atomReq.addChild((Metadata)mdChain.get(j));
+ atomReq.addChild(mdChain.get(j));
}

logger.debug(

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/EchoRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/EchoRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/EchoRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -13,13 +13,11 @@
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.base.exceptions.PerfSONARException;
import org.perfsonar.service.base.engine.ActionType;
import org.perfsonar.service.base.util.ResultCodesUtil;

-import org.perfsonar.base.exceptions.PerfSONARException;

-
/**
* MessageHandler for EchoRequest messages.
*

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSCleanupRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSCleanupRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSCleanupRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -4,17 +4,15 @@
*/
package org.perfsonar.service.base.messages;

-import org.perfsonar.service.base.engine.ActionType;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.service.base.engine.ActionType;

-
/**
* @author Maciej Glowiak
* MessageHandler for LS Cleanup
*
*/
public class LSCleanupRequest extends LSRequest {
-

/**
* @throws SystemException
@@ -27,6 +25,4 @@

}

-
-
}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSDeregisterRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSDeregisterRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSDeregisterRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -4,18 +4,15 @@
*/
package org.perfsonar.service.base.messages;

-import org.perfsonar.service.base.engine.ActionType;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.service.base.engine.ActionType;

-
-
/**
* @author Maciej Glowiak
* MessageHandler for LS DeRegiser Request
*
*/
public class LSDeregisterRequest extends LSRequest {
-

/**
* @throws SystemException
@@ -27,7 +24,5 @@
setType(ActionType.LS_DEREGISTER);

}
-

-
}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSKeepaliveRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSKeepaliveRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSKeepaliveRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -4,17 +4,15 @@
*/
package org.perfsonar.service.base.messages;

-import org.perfsonar.service.base.engine.ActionType;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.service.base.engine.ActionType;

-
/**
* @author Maciej Glowiak
* MessageHandler for LS Keep-Alive Request
*
*/
public class LSKeepaliveRequest extends LSRequest {
-

/**
* @throws SystemException
@@ -27,6 +25,4 @@

}

-
-
}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSQueryRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSQueryRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSQueryRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -4,14 +4,12 @@
*/
package org.perfsonar.service.base.messages;

-import org.perfsonar.service.base.engine.ActionType;
-import org.perfsonar.base.exceptions.PerfSONARException;
-
import java.util.Map;

import org.ggf.ns.nmwg.base.v2_0.Metadata;
+import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.service.base.engine.ActionType;

-
/**
* @author Maciej Glowiak
* MessageHandler for LS Query Request
@@ -19,24 +17,19 @@
*/
public class LSQueryRequest extends LSRequest {

-
/**
* @throws SystemException
*/
- public LSQueryRequest() throws PerfSONARException {
-
+ public LSQueryRequest() throws PerfSONARException {
super();
logger.debug("LSQueryRequest: MessageHandler created");
- setType(ActionType.LS_LOOKUP);
-
+ setType(ActionType.LS_LOOKUP);
}

-
public Map<String,Metadata> mergeAllMetadata(Map<String,Metadata>
metadatas) {

return metadatas;

}

-
}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSRegisterRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSRegisterRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSRegisterRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -7,17 +7,15 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.List;
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.Message;
import org.ggf.ns.nmwg.base.v2_0.Metadata;
-import org.omg.CORBA.SystemException;
import org.perfsonar.base.exceptions.PerfSONARException;
-import org.perfsonar.base.util.XMLUtils;
import org.perfsonar.service.base.engine.ActionType;

-
/**
* @author Maciej Glowiak
* MessageHandler for LS Regiser Request
@@ -32,7 +30,6 @@

*/
public class LSRegisterRequest extends LSRequest {
-

/**
* @throws SystemException
@@ -45,7 +42,7 @@

}

- protected ArrayList<Message> extractMultipleRequests(Message reqMessage)
{
+ protected List<Message> extractMultipleRequests(Message reqMessage) {

ArrayList<Message> messagesList = new ArrayList<Message>();

@@ -117,5 +114,4 @@

}

-
}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LSRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -4,8 +4,8 @@
*/
package org.perfsonar.service.base.messages;

-
import java.util.Map;
+
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.base.exceptions.PerfSONARException;

@@ -17,8 +17,6 @@
*/
public abstract class LSRequest extends Request {

-
-
/**
* @throws SystemException
*/
@@ -29,7 +27,6 @@

}

-
/**
* Merge chained metadata elements
* @param metadatas map of metadata elements

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LookupInfoRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LookupInfoRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/LookupInfoRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -21,14 +21,12 @@
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.ServiceVersion;
-
+import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.service.base.engine.ActionType;
import org.perfsonar.service.base.registration.PropertiesServiceDescription;
import org.perfsonar.service.base.util.ResultCodesUtil;

-import org.perfsonar.base.exceptions.PerfSONARException;

-
/**
* MessageHandler for LookupInfoRequest messages.
*

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementArchiveStoreKeyRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementArchiveStoreKeyRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementArchiveStoreKeyRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,15 +5,12 @@

package org.perfsonar.service.base.messages;

+import java.util.Map;

-import org.perfsonar.service.base.engine.ActionType;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.service.base.engine.ActionType;

-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-
-import java.util.Map;
-
-
/**
* MessageHandler for MeasurementArchiveStoreRequest messages.
*

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementArchiveStoreRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementArchiveStoreRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementArchiveStoreRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,15 +5,12 @@

package org.perfsonar.service.base.messages;

+import java.util.Map;

-import org.perfsonar.service.base.engine.ActionType;
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.service.base.engine.ActionType;

-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-
-import java.util.Map;
-
-
/**
* MessageHandler for MeasurementArchiveStoreRequest messages.
*

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MeasurementRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -6,13 +6,12 @@
package org.perfsonar.service.base.messages;


+import java.util.Map;
+
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.service.base.engine.ActionType;

-import org.ggf.ns.nmwg.base.v2_0.Metadata;
-
-import java.util.Map;
-
/**
* MessageHandler for MeasurementRequest messages
*

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MessageHandlerFactory.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MessageHandlerFactory.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MessageHandlerFactory.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -2,18 +2,17 @@
* $Id$
* Project: perfSONAR
*/
-
package org.perfsonar.service.base.messages;

+import java.util.Hashtable;
+import java.util.Map;
+
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
-
import org.perfsonar.base.exceptions.PerfSONARException;

-import java.util.Hashtable;
-
/**
* Factory class which can be used to get the appropriate messageHandler
* for the given message type.
@@ -21,115 +20,88 @@
* @author boote
*/
public class MessageHandlerFactory {
+ private final static Map<String, String> m2c = new Hashtable<String,
String>();
+ private final static Object mutex = new Object();

-
-
- static private Hashtable m2c = null;
-
- public static MessageHandler getMessageHandler(String messageType)
- throws PerfSONARException{
-
+ public static MessageHandler getMessageHandler(String messageType)
throws PerfSONARException{
// get a logger
- LoggerComponent logger = (LoggerComponent)AuxiliaryComponentManager.
- getInstance().getComponent(ComponentNames.LOGGER);
+ LoggerComponent logger =
(LoggerComponent)AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);

// one time initialization to determine what message types are
// supported by the service.
- if (m2c == null){
-
- ConfigurationComponent configManager = (ConfigurationComponent)
- AuxiliaryComponentManager.getInstance().
- getComponent(ComponentNames.CONFIG);
-
- String serviceType = configManager.getProperty("service.r.type");
- String messageTypes =
- configManager.getProperty("service." + serviceType +
- ".message_types");
- String[] allowedMesgTypes = messageTypes.split("\\s*,\\s*");
-
- m2c = new Hashtable();
-
- for(int i=0; i < allowedMesgTypes.length; i++) {
-
- m2c.put(allowedMesgTypes[i],
- ("org.perfsonar.service.base.messages." +
- allowedMesgTypes[i]));
- }
+ if (m2c.isEmpty()){
+ init();
}
-
-
- if (m2c == null){
- logger.error("MessageHandlerFactory: hashtable not created");
+
+ if (m2c.isEmpty()){
+ logger.error("MessageHandlerFactory: no known allowed Message
Types");
}

-
// get the classname for this message type
String className = (String) m2c.get(messageType);
-
- logger.debug("MessageHandlerFactory: classname asked for is "
- + className);
+ logger.debug("MessageHandlerFactory: classname asked for is " +
className);

- if (className == null)
+ if (className == null) {
throw new PerfSONARException(
"error.common.action_not_supported",
"Action ["+messageType+"] is not supported by " +
"the service or cannot be served - " +
- "cannot instantiate Message Handler");
+ "cannot instantiate Message Handler"
+ );
+ }

// try to create a message handler for the given message type.
MessageHandler handler = null;
try {
-
// get a new class for that classname
- handler =
- (MessageHandler) Class.forName(className).newInstance();
+ handler = (MessageHandler)
Class.forName(className).newInstance();
+ } catch (InstantiationException e) {
+ logger.fatal("MessageHandlerFactory: Unable to Instantiate
messageHandler for: " + messageType);
+ logger.fatal("MessageHandlerFactory: because of Instatiation
Problems " + e.getMessage());
+ throw new PerfSONARException(
+ "error.common.action_not_supported",
+ "MessageHandlerFactory: Unable to create messageHandler
for: " + messageType + " because: " + e.getMessage()
+ );
+ } catch (IllegalAccessException e) {
+ logger.fatal("MessageHandlerFactory: Unable to Instantiate
messageHandler for: " + messageType);
+ logger.fatal("MessageHandlerFactory: because of illegalAccess" +
e.getMessage());
+ throw new PerfSONARException(
+ "error.common.action_not_supported",
+ "MessageHandlerFactory: Unable to create messageHandler
for: " + messageType + " because: " + e.getMessage()
+ );
+ } catch (ClassNotFoundException e) {
+ logger.fatal("MessageHandlerFactory: Unable to Instantiate
messageHandler for: " + messageType);
+ logger.fatal("MessageHandlerFactory: because classNotFound :" +
e.getMessage());
+ throw new PerfSONARException(
+ "error.common.action_not_supported",
+ "MessageHandlerFactory: Unable to create messageHandler
for: " + messageType + " because: " + e.getMessage()
+ );
}
- catch (InstantiationException e) {

- logger.fatal("MessageHandlerFactory: Unable to Instantiate "
- + "messageHandler for: " + messageType);
- logger.fatal("MessageHandlerFactory: because of Instatiation "
- + "Problems " + e.getMessage());
- throw new
PerfSONARException("error.common.action_not_supported",
- "MessageHandlerFactory: Unable to "
- + "create messageHandler for: " + messageType
- + " because: " + e.getMessage());
- }
- catch (IllegalAccessException e) {
-
- logger.fatal("MessageHandlerFactory: Unable to Instantiate "
- + "messageHandler for: " + messageType);
- logger.fatal("MessageHandlerFactory: because of illegalAccess"
- + e.getMessage());
- throw new PerfSONARException("error.common.action_not_supported",
- "MessageHandlerFactory: Unable to "
- + "create messageHandler for: " + messageType
- + " because: " + e.getMessage());
- }
- catch (ClassNotFoundException e) {
-
- logger.fatal("MessageHandlerFactory: Unable to Instantiate "
- + "messageHandler for: " + messageType);
- logger.fatal("MessageHandlerFactory: because classNotFound :"
- + e.getMessage());
- throw new PerfSONARException("error.common.action_not_supported",
- "MessageHandlerFactory: Unable to "
- + "create messageHandler for: " + messageType
- +" because: " + e.getMessage());
- }
-
-
if (handler == null) {
-
- logger.fatal(
- "MessageHandlerFactory: Unable to create "
- + "messageHandler for: " + messageType);
- throw new
PerfSONARException("error.common.action_not_supported",
- "MessageHandlerFactory: Unable to "
- + "create messageHandler for: " + messageType);
-
+ logger.fatal("MessageHandlerFactory: Unable to create
messageHandler for: " + messageType);
+ throw new PerfSONARException(
+ "error.common.action_not_supported",
+ "MessageHandlerFactory: Unable to create messageHandler
for: " + messageType
+ );
}

return handler;
}
+
+ private static void init() throws PerfSONARException {
+ synchronized (mutex) {
+ if(!m2c.isEmpty()) return; // if the lock was
blocking a other thread then make the second thread do nothing here.
+
+ ConfigurationComponent configManager =
(ConfigurationComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.CONFIG);
+
+ String serviceType =
configManager.getProperty("service.r.type");
+ String messageTypes =
configManager.getProperty("service." + serviceType + ".message_types");
+ String[] allowedMesgTypes =
messageTypes.split("\\s*,\\s*");
+
+ for(int i=0; i < allowedMesgTypes.length; i++) {
+ m2c.put(allowedMesgTypes[i],
"org.perfsonar.service.base.messages." + allowedMesgTypes[i]);
+ }
+ }
+ }
}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MetadataKeyRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MetadataKeyRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/MetadataKeyRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,15 +5,14 @@
package org.perfsonar.service.base.messages;


+import java.util.Map;
+
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.service.base.engine.ActionType;

-import org.ggf.ns.nmwg.base.v2_0.Metadata;

-import java.util.Map;

-
-
/**
* MessageHandler for request-key messages.
*

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/Request.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/Request.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/Request.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -8,6 +8,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;

import org.ggf.ns.nmwg.base.v2_0.Data;
@@ -259,7 +260,7 @@
}


- protected ArrayList<Message> extractMultipleRequests(Message reqMessage)
{
+ protected List<Message> extractMultipleRequests(Message reqMessage) {

ArrayList<Message> messages = new ArrayList<Message>();


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/SetupDataDBRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/SetupDataDBRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/SetupDataDBRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -1,7 +1,7 @@
package org.perfsonar.service.base.messages;

+import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.service.base.engine.ActionType;
-import org.perfsonar.base.exceptions.PerfSONARException;

public class SetupDataDBRequest extends TOPSRequest {
/**

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/SetupDataRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/SetupDataRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/SetupDataRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -6,15 +6,14 @@
package org.perfsonar.service.base.messages;


+import java.util.Map;
+
+import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.service.base.engine.ActionType;

-import org.ggf.ns.nmwg.base.v2_0.Metadata;

-import java.util.Map;

-
-
/**
* MessageHandler for SetupDataRequest messages.
*

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/TOPSRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/TOPSRequest.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/TOPSRequest.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,6 +5,7 @@
package org.perfsonar.service.base.messages;

import java.util.Map;
+
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.perfsonar.base.exceptions.PerfSONARException;


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/GenericServiceLSRegistrator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/GenericServiceLSRegistrator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/GenericServiceLSRegistrator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -1,19 +1,19 @@
package org.perfsonar.service.base.registration;

+import java.io.File;
import java.util.Map;

import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;

import org.ggf.ns.nmwg.base.v2_0.Message;
-
-import org.perfsonar.client.axis.AxisClient;
-import
org.perfsonar.client.base.requests.lookupService.LSRegisterRequestGenerator;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.client.axis.AxisClient;
+import
org.perfsonar.client.base.requests.lookupService.LSRegisterRequestGenerator;

/**
* Generic Service LS Registrator.
@@ -21,43 +21,26 @@
* @author Maciej Glowiak
*/
public class GenericServiceLSRegistrator implements ServiceLSRegistrator {
-
-
+
// ----------------------------------------------------- Constants

// -------------------------------------------- Instance variables

-
- protected LoggerComponent logger;
-
+ protected LoggerComponent logger;
protected ConfigurationComponent configuration;
-
protected ServiceDescription serviceDescription;
-
protected ServiceContent serviceContent;
-
-
+
// -------------------------------------------------- Constructors

+ public GenericServiceLSRegistrator() {}

- public GenericServiceLSRegistrator() {
-
- serviceDescription = null;
- serviceContent = null;
-
- }
-
-
- public GenericServiceLSRegistrator(
- ServiceDescription sd, ServiceContent sc) {
-
+ public GenericServiceLSRegistrator(ServiceDescription sd, ServiceContent
sc) {
serviceDescription = sd;
- serviceContent = sc;
-
+ serviceContent = sc;
}

// ------------------------------------------------ Public methods
-

/**
* Initializes Registrator
@@ -71,39 +54,36 @@
getComponent(ComponentNames.CONFIG);

}
-
-
- public Message register(String lsUrl) throws PerfSONARException {

- if (lsUrl==null) throw new PerfSONARException(
+ public Message register(String lsUrl) throws PerfSONARException {
+ if (lsUrl==null) {
+ throw new PerfSONARException(
"error.lsregistrator.no_ls_url",
- "GenericServiceLSRegistrator: Lookup Service URL is null");
- if ("".equals(lsUrl)) throw new PerfSONARException(
+ "GenericServiceLSRegistrator: Lookup Service URL is null"
+ );
+ }
+ if ("".equals(lsUrl)) {
+ throw new PerfSONARException(
"error.lsregistrator.no_ls_url",
- "GenericServiceLSRegistrator: Lookup Service URL is empty");
+ "GenericServiceLSRegistrator: Lookup Service URL is empty"
+ );
+ }

logger.info("GenericServiceLSRegistrator: register to ["+lsUrl+"]");

-
Message message = getLSRegisterRequestMessage();
-
logger.debug("GenericServiceLSRegistrator: sending via Axis");
-
//send request Document to url
-
try {
-
logger.debug("GenericServiceLSRegistrator: Creating Axis
Client");
-
//return response as Message
- String parserFile = configuration.getProperty(
- "service.sax_parser.config");
-
+ String parserFile =
configuration.getProperty("service.sax_parser.config");
+ File file = AuxiliaryComponentManager.lookupFile(parserFile);
+ if(file!=null) {
+ parserFile = file.getAbsolutePath();
+ }
AxisClient client = new AxisClient();
- Message responseMsg =
- client.sendRequest(lsUrl,message, parserFile);
-
+ Message responseMsg = client.sendRequest(lsUrl,message,
parserFile);
return responseMsg;
-
} catch (ParserConfigurationException e) {
logger.error("GenericServiceLSRegistrator: "+e.getMessage());
throw new
PerfSONARException("error.common.parse_error","GenericServiceLSRegistrator:
"+e.getMessage());
@@ -114,7 +94,6 @@
logger.error("GenericServiceLSRegistrator: "+e.getMessage());
throw new
PerfSONARException("error.lsregistrator.other","GenericServiceLSRegistrator:
Error while sending request to LS: "+e.getMessage());
}
-
}


@@ -131,9 +110,6 @@
public Message keepalive(String lsUrl, String key) throws
PerfSONARException {
throw new PerfSONARException("error.common.action_not_implemented",
"Action not implemented");
}
-
-
-

/**
*
@@ -143,64 +119,52 @@
*
* @return Message NMWG
*/
- public Message getLSRegisterRequestMessage()
- throws PerfSONARException {
+ public Message getLSRegisterRequestMessage() throws PerfSONARException {

- if (serviceDescription==null) throw new
-
PerfSONARException("error.common.lsregistrator.no_service_description",
- "No service description");
+ if (serviceDescription==null) {
+ throw new PerfSONARException(
+ "error.common.lsregistrator.no_service_description",
+ "No service description"
+ );
+ }

- Map commonParameters = serviceDescription.getServiceDescription();
+ Map<String, String> commonParameters =
serviceDescription.getServiceDescription();

- LSRegisterRequestGenerator lsRegisterGenerator =
- new LSRegisterRequestGenerator();
+ LSRegisterRequestGenerator lsRegisterGenerator = new
LSRegisterRequestGenerator();
lsRegisterGenerator.setCommonParameters(commonParameters);

- if (serviceContent!=null) {
-
- String[] metadata = serviceContent.getServiceContent();
- lsRegisterGenerator.setMetadataElements(metadata);
-
- }
- else{
- //String[] metadata = new String[1];
- //metadata[0] = "<nmwg:metadata id=\"empty\" />";
- lsRegisterGenerator.setMetadataElements(new String[0]);
- }
-
+ if (serviceContent!=null) {
+ String[] metadata =
serviceContent.getServiceContent();
+ lsRegisterGenerator.setMetadataElements(metadata);
+ } else {
+ //String[] metadata = new String[1];
+ //metadata[0] = "<nmwg:metadata id=\"empty\" />";
+ lsRegisterGenerator.setMetadataElements(new
String[0]);
+ }
+
Message message = lsRegisterGenerator.generateRequestMessage();

- return message;
-
+ return message;
}
-

- public ServiceContent getServiceContent() {
-
- return serviceContent;
-
+ public ServiceContent getServiceContent() {
+ return serviceContent;
}
-

- public void setServiceContent(ServiceContent serviceContent) {
-
+ public void setServiceContent(ServiceContent serviceContent) {
this.serviceContent = serviceContent;
-
}
-

public ServiceDescription getServiceDescription() {

return serviceDescription;

}
-

public void setServiceDescription(ServiceDescription serviceDescription)
{

this.serviceDescription = serviceDescription;

}
-
-
+
} //GenericServiceLSRegistrator

Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationContextServiceContent.java

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationExistDbXmlrpcServiceContent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationExistDbXmlrpcServiceContent.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationExistDbXmlrpcServiceContent.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -2,7 +2,6 @@


import org.perfsonar.base.exceptions.PerfSONARException;
-
import org.perfsonar.service.base.storage.xmldb.XmlDbDataRepository;
import org.perfsonar.service.base.storage.xmldb.XmlDbStorageManager;
import org.perfsonar.service.base.storage.xmldb.exist.ExistDbFactory;

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationXMLFileServiceContent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationXMLFileServiceContent.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/InformationXMLFileServiceContent.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -1,81 +1,56 @@
package org.perfsonar.service.base.registration;

-
import org.perfsonar.base.exceptions.PerfSONARException;
import org.perfsonar.service.base.storage.xmlfile.XmlFileDataRepository;
import org.perfsonar.service.base.storage.xmlfile.XmlFileStorageManager;

-
/**
* Get metadatas from XML Information File
*
* @author Maciej Glowiak
- *
+ *
*/
public class InformationXMLFileServiceContent implements ServiceContent {

- // ----------------------------------------------------- Constants
-
-
- private static final String GET_METADATA_XPATH =
- "/nmwg:store/nmwg:metadata";
+ // ----------------------------------------------------- Constants

-
- // -------------------------------------------- Instance variables
-
-
- private String xmlInformationFilename;
-
-
- // --------------------------------------------------- Constructor
+ private static final String GET_METADATA_XPATH =
"/nmwg:store/nmwg:metadata";

-
- public InformationXMLFileServiceContent(String filename) {
-
- xmlInformationFilename = filename;
-
- }
-
-
- // ------------------------------------------------------- Methods
-
- /**
- * Get metadata blocks from RRD information file
- * @return array of Strings
- */
- public String[] getServiceContent(String filename) throws
PerfSONARException {
-
- XmlFileDataRepository dr = new XmlFileDataRepository(filename);
+ // -------------------------------------------- Instance variables

- XmlFileStorageManager sm = new XmlFileStorageManager();
-
- sm.initStorage(dr);
- String[] results = (String[])sm.fetch(GET_METADATA_XPATH);
+ private String xmlInformationFilename;

- return results;
+ // --------------------------------------------------- Constructor

- }
+ public InformationXMLFileServiceContent(String filename) {
+ xmlInformationFilename = filename;
+ }

-
- public String[] getServiceContent() throws PerfSONARException {
-
- return getServiceContent(xmlInformationFilename);
-
- }
+ // ------------------------------------------------------- Methods

-
- public String getXmlInformationFilename() {
-
- return xmlInformationFilename;
-
- }
-
+ /**
+ * Get metadata blocks from RRD information file
+ *
+ * @return array of Strings
+ */
+ public String[] getServiceContent(String filename) throws
PerfSONARException {
+ XmlFileDataRepository dr = new
XmlFileDataRepository(filename);
+ XmlFileStorageManager sm = new XmlFileStorageManager();
+ sm.initStorage(dr);
+ String[] results = (String[]) sm.fetch(GET_METADATA_XPATH);
+ return results;
+ }

- public void setXmlInformationFilename(String xmlInformationFilename) {
-
- this.xmlInformationFilename = xmlInformationFilename;
-
- }
+ public String[] getServiceContent() throws PerfSONARException {
+ return getServiceContent(xmlInformationFilename);
+ }

-
-} //InformationXMLFileServiceContent
+ public String getXmlInformationFilename() {
+ return xmlInformationFilename;
+ }
+
+ public void setXmlInformationFilename(String xmlInformationFilename) {
+ this.xmlInformationFilename = xmlInformationFilename;
+ }
+
+} // InformationXMLFileServiceContent

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSRegistrationComponent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSRegistrationComponent.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/LSRegistrationComponent.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -4,9 +4,7 @@
*/
package org.perfsonar.service.base.registration;

-
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.base.auxiliary.AuxiliaryComponent;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
@@ -16,7 +14,6 @@
import
org.perfsonar.base.auxiliary.components.simplescheduler.SchedulerAction;
import org.perfsonar.base.exceptions.PerfSONARException;

-
/**
* Action for simple Scheduler that registers with the LS
*
@@ -24,230 +21,208 @@
* @author romradz (contributor)
*
*/
-public class LSRegistrationComponent
- implements SchedulerAction, AuxiliaryComponent {
+public class LSRegistrationComponent implements SchedulerAction,
AuxiliaryComponent {

-
-
// ----------------------------------------------------- constants

-
-
private static final int DEFAULT_RUN_INTERVAL = 1800000;
-
private static final int MINIMAL_RUN_INTERVAL = 300000;
-
+ /** Posible values: <empty> "xmldb" "context" or "file"
+ * Where <empty> defaults to file and if the value of
+ * service.ls.registration_file is empty or whitespace
+ * don't use a
{@link
ServiceContent} this is for backward
+ * compatibility
+ */
+ private static final String SERVICE_CONTENT_TYPE =
"service.ls.service_content_type";
+ private enum ContentType {
+ EMPTY(null),
+ FILE("file"),
+ XMLDB("xmldb"),
+ CONTEXT("context");
+
+ private String name;
+
+ ContentType(String name) {
+ this.name = name;
+ }
+
+ static ContentType getByName(String name) {
+ if(name==null) {
+ return EMPTY;
+ }
+
+ for(ContentType type : values() ) {
+ if(name.equals(type.name)) {
+ return type;
+ }
+ }
+ return null;
+ }
+ }
private static final String REGISTRATION_FILE =
"service.ls.registration_file";

-
-
// -------------------------------------------- class fields

-
-
private Message responseMessage = null;
-
private String componentName = "ls-registrator";
-
private LoggerComponent logger = null;
-
private ConfigurationComponent configuration = null;
-
private Scheduler scheduler = null;
-
-
-
+
// ---------------------------------- constructors

-
-
public LSRegistrationComponent() throws PerfSONARException {
-
try {
-
- this.logger = (LoggerComponent)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(ComponentNames.LOGGER);
-
+ this.logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
} catch (PerfSONARException e) {
-
throw new PerfSONARException(
- "error.common.no_logger",
- "LSRegistrationComponent.initComponent: "
- + "Cannot get logger component");
-
+ "error.common.no_logger",
+ "LSRegistrationComponent.initComponent: Cannot get logger
component"
+ );
}

-
try {
-
- this.configuration = (ConfigurationComponent)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(ComponentNames.CONFIG);
-
+ this.configuration = (ConfigurationComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.CONFIG);
} catch (PerfSONARException e) {
-
throw new PerfSONARException(
- "error.common.no_configuration",
- "LSRegistrationComponent.initComponent: "
- + "Cannot get config component");
-
+ "error.common.no_configuration",
+ "LSRegistrationComponent.initComponent: Cannot get config
component"
+ );
}
-
}

-
-
// ---------------------------------- public methods

-
-
/**
* Scheduler action
*/
public void runAction() {
-
try {
+ ContentType type =
ContentType.getByName(getServiceContentPropery());
+ ServiceContent content = null;
+
+ switch(type) {
+ case EMPTY: case FILE: {
+ content = getXMLFileContent();
+ } break;
+
+ case XMLDB: {
+ content = getXMLDBContent();
+ } break;
+
+ case CONTEXT: {
+ content = getContextContent();
+ } break;
+ }
+ logger.debug("LSRegistrationComponent.runAction: register
ServiceContent = "+content);

- String registrationFile =
-
configuration.getProperty(LSRegistrationComponent.REGISTRATION_FILE);
+ ServiceLSRegistrator registrator = new
GenericServiceLSRegistrator(
+ new PropertiesServiceDescription(),
+ content
+ );
+ registrator.initRegistrator();
+ String lsURL =
configuration.getProperty("service.r.ls_url");
+ logger.debug("LSRegistrationComponent.runAction: register to LS
[" + lsURL + "] ");
+ responseMessage = registrator.register(lsURL);
+ /* TODO: do something with message... ? */
+
+ } catch (PerfSONARException e) {
+ logger.error("LSRegistrationComponent.runAction:
Error while registration: " + e.getMessage());
+ }
+ }

- String lsURL = configuration.getProperty(
- "service.r.ls_url");
-
- logger.debug("LSRegistrationComponent.runAction: "
- + "register to LS [" + lsURL + "] with file "
- + "[" + registrationFile + "]");
-
- ServiceLSRegistrator registrator;
-
+ protected ServiceContent getXMLFileContent() throws
PerfSONARException {
+ String registrationFile =
configuration.getProperty(LSRegistrationComponent.REGISTRATION_FILE);
+
if (registrationFile != null && registrationFile.length() > 0){
- registrator = new GenericServiceLSRegistrator(
- new PropertiesServiceDescription(),
- new
InformationXMLFileServiceContent(registrationFile));
- }else {
- registrator = new GenericServiceLSRegistrator(
- new PropertiesServiceDescription(), null);
- }
+ return new InformationXMLFileServiceContent(registrationFile);
+ }
+ return null;
+ }

- registrator.initRegistrator();
+ protected ServiceContent getXMLDBContent() throws PerfSONARException {
+ return new InformationExistDbXmlrpcServiceContent();
+ }
+
+ protected ServiceContent getContextContent() throws
PerfSONARException {
+ return new InformationContextServiceContent();
+ }

- responseMessage = registrator.register(lsURL);
+ private String getServiceContentPropery() {
+ String contentType = null;
+ try {
+ contentType =
configuration.getProperty(LSRegistrationComponent.SERVICE_CONTENT_TYPE);
+ } catch (PerfSONARException e) {
+ logger.debug("service.ls.service_content_type could
not be read.");
+ }
+ if(contentType == null || contentType.trim().equals("")) {
+ return null;
+ }
+ return contentType;
+ }

- //TODO: xxx
- //do sth with message... ?
+ public Message getResponseMessage() {
+ return responseMessage;
+ }

- } catch (PerfSONARException e) {
-
- logger.error("LSRegistrationComponent.runAction: "
- + "Error while registration: "
- + e.getMessage());
-
- }
-
- }
-
-
- public Message getResponseMessage() {
-
- return responseMessage;
-
- }
-
-
-
// ---------------------- component that loads action to scheduler
-
-
- public void initComponent() throws PerfSONARException {
-
- //Get configuration
-
- //get interval - parameter "component.CName.interval"
- int interval = LSRegistrationComponent.DEFAULT_RUN_INTERVAL;
+ public void initComponent() throws PerfSONARException {
+ // Get configuration
+ // get interval - parameter "component.CName.interval"
+ int interval = LSRegistrationComponent.DEFAULT_RUN_INTERVAL;

- try {
+ try {
+ String intervalVal =
configuration.getProperty("component." + componentName + ".interval");
+ interval = Integer.parseInt(intervalVal);
+ } catch (RuntimeException e) {
+ // possibly not an integer - keep default interval
+ } catch (PerfSONARException e) {
+ // no property - keep default interval
+ }

- String intervalVal = configuration.getProperty(
- "component." + componentName + ".interval");
- interval = Integer.parseInt(intervalVal);
-
- } catch (RuntimeException e) {
- //possibly not an integer - keep default interval
- } catch (PerfSONARException e) {
- //no property - keep default interval
- }
-
//if too small take default?
if (interval < LSRegistrationComponent.MINIMAL_RUN_INTERVAL) {
interval = LSRegistrationComponent.DEFAULT_RUN_INTERVAL;
}

- logger.debug("LSRegistrationComponent.initComponent: "
- + "LSCleanupLoader: parameter RUN_INTERVAL = " + interval);
+ logger.debug("LSRegistrationComponent.initComponent:
LSCleanupLoader: parameter RUN_INTERVAL = " + interval);

//get scheduler - parameter "component.CName.scheduler_component"
try {
-
- String schedulerVal = configuration.getProperty(
- "component." + componentName + ".scheduler_component");
-
- logger.debug("LSRegistrationComponent.initComponent: "
- + "LSCleanupLoader: parameter SCHEDULER = " +
schedulerVal);
-
- scheduler = (Scheduler)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(schedulerVal);
-
- if (scheduler == null)
- throw new PerfSONARException("error.common.no_scheduler",
- "LSRegistrationComponent.initComponent: "
- + "No scheduler component in
AuxiliaryComponentManager");
-
+ String schedulerVal = configuration.getProperty("component." +
componentName + ".scheduler_component");
+ logger.debug("LSRegistrationComponent.initComponent:
LSCleanupLoader: parameter SCHEDULER = " + schedulerVal);
+ scheduler = (Scheduler)
AuxiliaryComponentManager.getInstance().getComponent(schedulerVal);
} catch (PerfSONARException e) {
+ throw new PerfSONARException(
+ "error.rrdma.no_scheduler",
+
"LSRegistrationComponent.initComponent: "
+ + "LSCleanupLoader:
no [component." + componentName
+ +
".scheduler_component] parameter. "+ e.getMessage()
+ );
+ }

- throw new PerfSONARException("error.common.no_scheduler",
- "LSRegistrationComponent.initComponent:"
- + "LSCleanupLoader: no [component."
- + componentName + ".scheduler_component] parameter. "
- + e.getMessage());
+ if (scheduler == null) {
+ throw new PerfSONARException(
+ "error.rrdma.no_scheduler",
+
"LSRegistrationComponent.initComponent: No scheduler component in
AuxiliaryComponentManager"
+ );
+ }
+ // add cleanup action to scheduler
+ scheduler.addSchedulerTask(interval, this);
+ }

- }
+ public String getComponentName() {
+ return componentName;
+ }

- //add cleanup action to scheduler
- scheduler.addSchedulerTask(interval, this);
+ public void setComponentName(String name) {
+ componentName = name;
+ }

- }
+ // ---------------------------------------------------------- test
main() method
+ // TODO remove?
+ public static void main(String[] args) throws Exception {
+ AuxiliaryComponentManager.getInstance();
+ }

-
- public String getComponentName() {
-
- return componentName;
-
- }
-
-
- public void setComponentName(String name) {
-
- componentName = name;
-
- }
-
-
-
- // ---------------------------------------------------------- test
main() method
-
-
-
- public static void main(String[] args) throws Exception {
-
- AuxiliaryComponentManager.getInstance();
-
- }
-
-
-
-} //LSRegistrationComponent
+} // LSRegistrationComponent
\ No newline at end of file

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/PropertiesServiceDescription.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/PropertiesServiceDescription.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/registration/PropertiesServiceDescription.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -40,7 +40,7 @@
AuxiliaryComponentManager.getInstance().
getComponent(ComponentNames.CONFIG);

- Enumeration paramNames =
configuration.getProperties().propertyNames();
+ Enumeration<?> paramNames =
configuration.getProperties().propertyNames();
Map<String,String> serviceDesc = new HashMap<String,String>();

while (paramNames.hasMoreElements()) {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/NMWGStorageManager.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/NMWGStorageManager.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/NMWGStorageManager.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,12 +5,11 @@
package org.perfsonar.service.base.storage;


+import org.ggf.ns.nmwg.base.v2_0.Key;
+import org.ggf.ns.nmwg.base.v2_0.Message;
import org.perfsonar.base.exceptions.PerfSONARException;

-import org.ggf.ns.nmwg.base.v2_0.Message;
-import org.ggf.ns.nmwg.base.v2_0.Key;

-
/**
* This interface declares methods to have
* an access to a data storage.

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -143,7 +143,7 @@

try {

- Class cl = Class.forName(dbDriverClassname);
+ Class<?> cl = Class.forName(dbDriverClassname);
existDatabase = (Database)cl.newInstance();
DatabaseManager.registerDatabase(existDatabase);


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -1,5 +1,6 @@
package org.perfsonar.service.base.storage.xmldb.exist.xmlrpc;

+import java.util.List;
import java.util.Vector;

import org.perfsonar.base.auxiliary.AuxiliaryComponent;
@@ -147,7 +148,7 @@

ResourceSet result = service.query(xqueryExpression);
ResourceIterator resIt = result.getIterator();
- Vector list = new Vector();
+ List<Object> list = new Vector<Object>();

int i=0;
while(resIt.hasMoreResources()) {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmlfile/XmlFileDataRepository.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmlfile/XmlFileDataRepository.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmlfile/XmlFileDataRepository.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -13,8 +13,7 @@
public XmlFileDataRepository(String path) {
this.path = path;
}
-
-
+
public void setType(String type) {
}


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmlfile/XmlFileStorageManager.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmlfile/XmlFileStorageManager.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmlfile/XmlFileStorageManager.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -14,9 +14,8 @@
import javax.xml.transform.stream.StreamResult;

import org.apache.xpath.domapi.XPathEvaluatorImpl;
-
-import org.perfsonar.base.util.StringBufferOutputStream;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.base.util.StringBufferOutputStream;
import org.perfsonar.service.base.storage.DataRepository;
import org.perfsonar.service.base.storage.StorageManager;
import org.w3c.dom.Document;
@@ -70,20 +69,18 @@
} catch (RuntimeException ex) {
//not a string
throw new PerfSONARException(
- "XmlFileStorageManager: not a String parameter!");
+ "XmlFileStorageManager: not a String parameter!"
+ );
}

//System.out.println(" == xpath="+dataQuery);
-
dataRepository.open();
-
Vector<String> results = new Vector<String>();

try {

// Set up a DOM tree to query.
- InputSource in = new InputSource(
- new FileInputStream(dataRepository.getPath()));
+ InputSource in = new InputSource(new
FileInputStream(dataRepository.getPath()));
DocumentBuilderFactory dfactory =
DocumentBuilderFactory.newInstance();
dfactory.setNamespaceAware(true);
Document doc = dfactory.newDocumentBuilder().parse(in);
@@ -97,26 +94,21 @@
XPathNSResolver resolver = evaluator.createNSResolver(doc);

// Evaluate the xpath expression
- XPathResult result = (XPathResult)
- evaluator.evaluate(
+ XPathResult result = (XPathResult) evaluator.evaluate(
xpathQuery,
doc,
resolver,
XPathResult.UNORDERED_NODE_ITERATOR_TYPE,
null
- );
+ );


// Serialize the found nodes, store result in results as vector
// of Strings
Node n;
while ((n = result.iterateNext())!= null) {
-
StringBuffer outputBuffer = new StringBuffer();
-
- OutputStream outputStream =
- new StringBufferOutputStream(outputBuffer);
-
+ OutputStream outputStream = new
StringBufferOutputStream(outputBuffer);
//XX if (isTextNode(n)) {
//XX // DOM may have more than one node corresponding to a
//XX // single XPath text node. Coalesce all contiguous text
nodes
@@ -127,17 +119,16 @@
//XX
//XX } else {

- try {
-
- serializer.transform(
- new DOMSource(n), new StreamResult(
- new OutputStreamWriter(outputStream)));
- results.add(outputBuffer.toString());
-
- } catch (TransformerException e) {
- e.printStackTrace();
- }
+ try {
+ serializer.transform(
+ new DOMSource(n),
+ new StreamResult(new
OutputStreamWriter(outputStream))
+ );
+ results.add(outputBuffer.toString());

+ } catch (TransformerException e) {
+ e.printStackTrace();
}
+ }

//XX }
} catch (Exception ex) {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/FileTransportFactory.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/FileTransportFactory.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/FileTransportFactory.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -21,7 +21,7 @@
/**
* Array of all known implementations of FileTransport interface.
*/
- private static final Class[] FILE_TRANSPORT_IMPLS = {
+ private static final Class<?>[] FILE_TRANSPORT_IMPLS = {

SSHFileTransport.class

@@ -48,16 +48,16 @@
*/
public static FileTransport getFileTransport(String impl) throws
Exception {

- for (Class c: FILE_TRANSPORT_IMPLS) {
+ for (Class<?> c: FILE_TRANSPORT_IMPLS) {

String name = c.getName();
int n = name.lastIndexOf('.');
- if (n != -1) name = name.substring(n + 1);
-
- if (name.equalsIgnoreCase(impl + "FileTransport"))
-
+ if (n != -1) {
+ name = name.substring(n + 1);
+ }
+ if (name.equalsIgnoreCase(impl + "FileTransport")) {
return (FileTransport)c.newInstance();
-
+ }
}

throw new Exception(

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/Location.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/Location.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/Location.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -19,6 +19,12 @@


/**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+
+ /**
* Address (IP, Host, e-mail, ....)
* (optional, if null, local location is assumed).
*/

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/SSHFileTransport.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/SSHFileTransport.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/transport/SSHFileTransport.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -8,8 +8,8 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.InputStream;
import java.io.OutputStream;
-import java.io.InputStream;
import java.util.ArrayList;

/**

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/util/ResultCodesUtil.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/util/ResultCodesUtil.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/util/ResultCodesUtil.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,9 +5,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.Subject;
-
import org.ggf.ns.nmwg.result.v2_0.Datum;
-
import org.perfsonar.base.exceptions.PerfSONARException;



Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web/RequestHandler.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web/RequestHandler.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web/RequestHandler.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -32,21 +32,18 @@
*/
public class RequestHandler {

- // ----------------------------------------------------- constants
private static final String INIT_SERVICE_MESSAGE_TYPE = "InitService";
private static final String SAX_PARSER_CONFIG =
"service.sax_parser.config";

- // -------------------------------------------- instance variables
private AuxiliaryComponentManager componentManager;
private ConfigurationComponent configuration;
private LoggerComponent logger;
private AuthNComponent authnComponent;
private String saxParserConfig;
- private boolean initialised;
+
+ private volatile boolean initialised = false;
private volatile Object initialisationMutex = new Object();

- // ---------------------------------- public methods
-
/**
* Accepts web service based calls and gives back responses
*
@@ -59,45 +56,15 @@
*/
public Document acceptCall(Document request) {
try {
-
- //main code block
-
- //init if not initialized
if(!initialised) init();
-
- //check whether two required components are working
- //- logger and config
checkAuxiliaryComponents();
-
- //run handleCall on request
return handleCall(request);
-
} catch (PerfSONARException pex) {
- //If any error occured response with result/error code
-
- //create common result code with ErrorResponse
- Message responseMessage =
ResultCodesUtil.createResultCodeMetadata(null, pex);
- responseMessage.setType("ErrorResponse");
-
- //convert it into Document
- Document responseDocument = null;
- try {
- responseDocument =
XMLUtils.convertMessageToDOM(responseMessage);
- } catch (PerfSONARException e) {
- //Critical error, cannot convert message to DOM;
- // - parsing error of Error Response, shouldn't happen
- logger.fatal(
- "RequestHandler: Return null response - can
neither create " +
- "response message nor error code message!"
- );
- }
- logger.info("RequestHandler: Service sent a response with error
information");
- return responseDocument;
+ return handleError(pex);
}
}
-
/**
- * initialises this RequestHandler by creating and retrieving Aux
components
+ * initializes this RequestHandler by creating and retrieving Aux
components
* @throws PerfSONARException
*/
protected void init() throws PerfSONARException {
@@ -106,10 +73,10 @@
componentManager =
AuxiliaryComponentManager.getInstance();
configuration =
(ConfigurationComponent)componentManager.getComponent(ComponentNames.CONFIG);
logger =
(LoggerComponent)componentManager.getComponent(ComponentNames.LOGGER);
+ initialised = true;
}
}
}
-
/**
* handles the call: convert the request and calls a
handleRequestMessage and returns the result.
* @param request
@@ -119,108 +86,82 @@
protected Document handleCall(Document request) throws
PerfSONARException {
logger.info("RequestHandler: Service received a request");
logger.debug("RequestHandler: Calling on parser to parse the
request");
- //convert input Document into Message - requestMessage
+
Message requestMessage = convertMessage(request);
-
- if (requestMessage==null) {
- //something went wrong with parsing, throw exception
- logger.error("RequestHandler: Message object constructed
as null from request");
-
- throw new PerfSONARException(
- "error.common.parse_error",
- "RequestHandler: Server could not construct a
message object from " +
- "the request due to unknown error. Please check
request and try again"
- );
+ checkMessage(requestMessage);
+
+ logger.debug("RequestHandler: Message object constructed from
request. Request is of type: " + requestMessage.getType());
+ /* Check if it isn't just an InitService message */
+ if
(INIT_SERVICE_MESSAGE_TYPE.equalsIgnoreCase(requestMessage.getType())) {
+ return handleInitServiceMessage(requestMessage);

}

+ assertAuthentication(requestMessage);
return handleRequestMessage(requestMessage);
- }
-
+ }
/**
- * Converts a Document to a Message
- * @param request
- * @return a converted requestMessage or null on failure
- * @throws PerfSONARException
+ * Called when any error occurred, response with result/error code
+ * @param exception the error
+ * @return Document containing error information.
*/
- protected Message convertMessage(Document request) throws
PerfSONARException {
- Message requestMessage = null;
- try {
- if(saxParserConfig == null) {
- saxParserConfig =
attemptSaxParserConfigLookup();
- }
- logger.debug("Using file: "+saxParserConfig+" as
SAX_PARSER_CONFIG");
- requestMessage = XMLUtils.convertToMessage(request,
saxParserConfig);
- } catch (Exception e) {
- throw new PerfSONARException(
- "error.common.parse_error",
- "Parse/validation error, Cannot convert request to
Message.",
- e
+ protected Document handleError(PerfSONARException exception) {
+
+
+ //create common result code with ErrorResponse
+ Message responseMessage =
ResultCodesUtil.createResultCodeMetadata(null, exception);
+ responseMessage.setType("ErrorResponse");
+
+ //convert it into Document
+ Document responseDocument = null;
+ try {
+ responseDocument =
XMLUtils.convertMessageToDOM(responseMessage);
+ } catch (PerfSONARException e) {
+ //Critical error, cannot convert message to DOM;
+ // - parsing error of Error Response, shouldn't happen
+ logger.fatal(
+ "RequestHandler: Return null response - can
neither create " +
+ "response message nor error code message!"
);
- }
- return requestMessage;
+ }
+ logger.info("RequestHandler: Service sent a response with
error information");
+ return responseDocument;
}
-
- protected Document handleRequestMessage(Message requestMessage)
throws PerfSONARException {
- logger.debug(
- "RequestHandler: Message object constructed from
request. Request is of type: " + requestMessage.getType()
- );
-
- /* Check if it isn't just an InitService message */
- if
(INIT_SERVICE_MESSAGE_TYPE.equalsIgnoreCase(requestMessage.getType())) {
- //if so, response that service was set up correctly
- throw new PerfSONARException(
+ /**
+ * handles a Init-Service Message.
+ * TODO this should probably return a normal document instead of it
being an exception
+ * @return document to return
+ * @throws PerfSONARException
+ */
+ protected Document handleInitServiceMessage(Message requestMessage)
throws PerfSONARException {
+ //if so, response that service was set up correctly
+ throw new PerfSONARException(
"service.common.success",
"Service initialized correctly"
- );
- }
-
- // Check if it's needed authentication for this type of message
- String checkAuthNParam=null;
- try {
-
checkAuthNParam=configuration.getProperty(AuthNComponent.CHECK_AUTHN_PARAM);
- } catch (PerfSONARException e) {
- checkAuthNParam=null;
- }
- if
(checkAuthNParam!=null&&checkAuthNParam.equals(AuthNComponent.YES_CHECK_AUTHN))
{
- logger.debug(
- "RequestHandler: " +
- "Authenticating the message");
- if (authnComponent == null) {
- authnComponent =
(AuthNComponent)componentManager.getComponent(ComponentNames.AUTHN);
- }
- authnComponent.requestAuthN(requestMessage.getType());
- }
- else {
- logger.debug(
- "RequestHandler: " +
- "Automated authentication not
required");
- }
+ );
+ }

- // Call on the MessageHandlerFactory to get the appropriate
+ protected Document handleRequestMessage(Message requestMessage)
throws PerfSONARException {
+ // Call on the MessageHandlerFactory to get the appropriate
// message handler for this type of message.
MessageHandler messageHandler =
MessageHandlerFactory.getMessageHandler(requestMessage.getType());

- logger.debug(
- "RequestHandler: Calling on MessageHandler
["+messageHandler.getClass()+"] to satisfy request"
- );
+ logger.debug("RequestHandler: Calling on MessageHandler
["+messageHandler.getClass()+"] to satisfy request");

- // Call on the mh to "execute" the message and return
- // a response message.
+ // Call on the messageHandler to "execute" the message and
return a response message.
// run proper message handler, which will run ServiceEngine
- //*****************************************************
-
+ //****************************************************
+
Message responseMessage =
messageHandler.execute(requestMessage);

//*****************************************************

// convert response Message into Document
- Document responseDocument = XMLUtils.convertMessageToDOM(
responseMessage );
+ Document responseDocument =
XMLUtils.convertMessageToDOM(responseMessage);

- //if everything went fine, return response document to Axis
logger.info("RequestHandler: Service sent a successful
response");
return responseDocument;
}
-
+
protected void checkAuxiliaryComponents() throws PerfSONARException {
if (configuration == null) throw new PerfSONARException(
"error.common.no_configuration",
@@ -231,6 +172,63 @@
"Cannot find logger component"
);
}
+ /**
+ * Checks if something went wrong with parsing
+ * @param requestMessage
+ * @throws PerfSONARException if the requestMessage is invalid
+ */
+ protected void checkMessage(Message requestMessage) throws
PerfSONARException {
+ if (requestMessage==null) {
+ logger.error("RequestHandler: Message object constructed
as null from request");
+ throw new PerfSONARException(
+ "error.common.parse_error",
+ "RequestHandler: Server could not construct a
message object from " +
+ "the request due to unknown error. Please check
request and try again"
+ );
+ }
+ }
+
+ protected void assertAuthentication(Message requestMessage) throws
PerfSONARException {
+ // Check if it's needed authentication for this type of message
+ String checkAuthNParam=null;
+ try {
+
checkAuthNParam=configuration.getProperty(AuthNComponent.CHECK_AUTHN_PARAM);
+ } catch (PerfSONARException e) {
+ checkAuthNParam=null;
+ }
+ if
(checkAuthNParam!=null&&checkAuthNParam.equals(AuthNComponent.YES_CHECK_AUTHN))
{
+ logger.debug("RequestHandler: Authenticating the
message");
+ if (authnComponent == null) {
+ authnComponent =
(AuthNComponent)componentManager.getComponent(ComponentNames.AUTHN);
+ }
+ authnComponent.requestAuthN(requestMessage.getType());
+ } else {
+ logger.debug("RequestHandler: Automated
authentication not required");
+ }
+ }
+ /**
+ * Converts a Document to a Message
+ * @param request
+ * @return a converted requestMessage or null on failure
+ * @throws PerfSONARException
+ */
+ protected Message convertMessage(Document request) throws
PerfSONARException {
+ Message requestMessage = null;
+ try {
+ if(saxParserConfig == null) {
+ saxParserConfig =
attemptSaxParserConfigLookup();
+ }
+ logger.debug("Using file: "+saxParserConfig+" as
SAX_PARSER_CONFIG");
+ requestMessage = XMLUtils.convertToMessage(request,
saxParserConfig);
+ } catch (Exception e) {
+ throw new PerfSONARException(
+ "error.common.parse_error",
+ "Parse/validation error, Cannot convert request to
Message.",
+ e
+ );
+ }
+ return requestMessage;
+ }

private String attemptSaxParserConfigLookup() throws
PerfSONARException {
String config;
@@ -253,4 +251,4 @@
);
}

-} //RequestHandler
+}

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfiguration.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfiguration.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfiguration.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,8 +5,8 @@
package org.perfsonar.service.measurementArchive.eventTypeConfig;


-import java.util.Map;
import java.util.HashMap;
+import java.util.Map;

/**
* Container of EventType objects which are specified
@@ -17,53 +17,29 @@
* @author romradz
*/
public class EventTypeConfiguration {
-
-
-
+
// -------------------------------------- class fields

+ private Map<String,EventType> eventTypeMap = null;

-
- private Map eventTypeMap = null;
-
-
-
// -------------------------------------- constructors

-
-
public EventTypeConfiguration() {
-
- eventTypeMap = new HashMap();
-
+ eventTypeMap = new HashMap<String,EventType>();
}

-
-
//-------------------------------------- public methods

-
-
public void setEventType(EventType eventType) {
-
eventTypeMap.put(eventType.getName(), eventType);
-
}

-
public EventType getEventType(String name) {
-
return ((EventType)eventTypeMap.get(name));
-
}

-
- public Map getEventTypeMap() {
-
+ public Map<String,EventType> getEventTypeMap() {
return eventTypeMap;
-
}

-
-
} //EventTypeConfiguration

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig/EventTypeConfigurationComponent.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,20 +5,18 @@
package org.perfsonar.service.measurementArchive.eventTypeConfig;


+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.commons.digester.Digester;
+import org.apache.commons.digester.xmlrules.DigesterLoader;
import org.perfsonar.base.auxiliary.AuxiliaryComponent;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
-
import org.perfsonar.base.exceptions.PerfSONARException;

-import org.apache.commons.digester.Digester;
-import org.apache.commons.digester.xmlrules.DigesterLoader;
-
-import java.net.URL;
-import java.io.InputStream;
-import java.io.IOException;
-
import com.ibatis.common.resources.Resources;



Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/MetadataConfigurationStorageManager.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -13,7 +13,6 @@
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.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
@@ -123,7 +122,7 @@


// if query is an empty string then the method returns empty message
- if (query.trim() == "")
+ if (query.trim().equals(""))
throw new PerfSONARException(
"error.ma.query",
"MetadataConfigurationStorageManager.fetch: "
@@ -182,7 +181,7 @@
+ "</nmwg:message>";

String[] tagNames = {"metadata", "data"};
- Map elements =
+ Map<String, Element> elements =
transformations.transformResults(xmlResult, tagNames);

if (elements == null)

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/SimpleMetadataConfigurationStorageManager.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,39 +5,17 @@
package org.perfsonar.service.measurementArchive.metadataConfig;


-import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
-import org.perfsonar.base.auxiliary.ComponentNames;
-import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
-import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
-
-import org.perfsonar.base.exceptions.PerfSONARException;
-
-import org.perfsonar.service.base.storage.NMWGStorageManager;
-
-import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
-import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
-
-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 org.ggf.ns.nmwg.base.v2_0.Parameter;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
import java.io.File;
-import java.io.OutputStreamWriter;
-import java.io.OutputStream;
import java.io.IOException;
-import java.util.Map;
+import java.io.OutputStream;
import java.util.Collection;
+import java.util.Map;
import java.util.Properties;

+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.stream.StreamSource;
+
import net.sf.saxon.Configuration;
-import net.sf.saxon.om.NodeInfo;
import net.sf.saxon.om.DocumentInfo;
import net.sf.saxon.om.SequenceIterator;
import net.sf.saxon.query.DynamicQueryContext;
@@ -46,9 +24,20 @@
import net.sf.saxon.query.XQueryExpression;
import net.sf.saxon.trans.XPathException;

+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.Parameter;
+import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
+import org.perfsonar.base.auxiliary.ComponentNames;
+import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
+import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
+import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.service.base.storage.NMWGStorageManager;



+
/**
* This class contains methods to manage metadata configuration data.
*
@@ -188,7 +177,7 @@


String[] tagNames = {"metadata", "data"};
- Map elements =
+ Map<String, Element> elements =
transformations.transformResults(output, tagNames);

if (elements == null)
@@ -261,23 +250,15 @@


public DocumentInfo getMetaConfigDoc(StaticQueryContext staticContext)
- throws Exception {
+ throws Exception {

- //logger.debug(
- // "SimpleMetadataConfigurationStorageManager.getDocumentInfo: "
- // + "metaConfigDoc is " + metaConfigDoc);
-
- if (metaConfigDoc != null)
+ if (metaConfigDoc != null) {
return metaConfigDoc;
+ }

- metaConfigDoc =
- staticContext.buildDocument(
- new StreamSource(
- new File(this.xmlFile)));
-
-
+ metaConfigDoc = staticContext.buildDocument(new StreamSource(new
File(this.xmlFile)));
+
logger.debug("SimpleMetadataConfigurationStorageManager.getMetaConfigDoc:
metaConfigDoc is " + metaConfigDoc);
return metaConfigDoc;
-
}



Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/Transformations.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -10,13 +10,12 @@
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.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import
org.perfsonar.base.auxiliary.components.configuration.ConfigurationComponent;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
-import org.perfsonar.base.util.XMLUtils;
import org.perfsonar.base.exceptions.PerfSONARException;
+import org.perfsonar.base.util.XMLUtils;
import
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.MetadataQueryGenerator;
import
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator.MetadataQueryGeneratorFactory;


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/DiscardsQueryGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/DiscardsQueryGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/DiscardsQueryGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -9,7 +9,6 @@
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.characteristic.discards.v2_0.Subject;
import org.ggf.ns.nmwg.topology.v2_0.Interface;
-
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/ErrorsQueryGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/ErrorsQueryGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/ErrorsQueryGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -9,7 +9,6 @@
import org.ggf.ns.nmwg.base.v2_0.Metadata;
import org.ggf.ns.nmwg.characteristic.errors.v2_0.Subject;
import org.ggf.ns.nmwg.topology.v2_0.Interface;
-
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;

Deleted:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/FlowQueryGenerator.java

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -10,7 +10,6 @@
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.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/L2PathStatusQueryGeneratorTMP.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -10,7 +10,6 @@
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.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -5,11 +5,10 @@
package
org.perfsonar.service.measurementArchive.metadataConfig.queryGenerator;


+import org.ggf.ns.nmwg.base.v2_0.Message;
import org.perfsonar.base.exceptions.PerfSONARException;

-import org.ggf.ns.nmwg.base.v2_0.Message;

-
/**
* Transforms nmwg message into xquery/xpath.
*

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/MetadataQueryGeneratorFactory.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -9,9 +9,7 @@
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
-
import org.perfsonar.base.exceptions.PerfSONARException;
-
import org.perfsonar.service.measurementArchive.eventTypeConfig.EventType;
import
org.perfsonar.service.measurementArchive.eventTypeConfig.EventTypeConfigurationComponent;


Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/UtilizationQueryGenerator.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -9,7 +9,6 @@
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.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
2008-04-16 01:05:00 UTC (rev 3681)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/register/LSRegistrationComponent.java
2008-04-16 01:54:22 UTC (rev 3682)
@@ -4,9 +4,7 @@
*/
package org.perfsonar.service.measurementArchive.register;

-
import org.ggf.ns.nmwg.base.v2_0.Message;
-
import org.perfsonar.base.auxiliary.AuxiliaryComponent;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
import org.perfsonar.base.auxiliary.ComponentNames;
@@ -14,267 +12,173 @@
import org.perfsonar.base.auxiliary.components.logger.LoggerComponent;
import org.perfsonar.base.auxiliary.components.simplescheduler.Scheduler;
import
org.perfsonar.base.auxiliary.components.simplescheduler.SchedulerAction;
-
import org.perfsonar.base.exceptions.PerfSONARException;
-
import org.perfsonar.service.base.registration.GenericServiceLSRegistrator;
-import
org.perfsonar.service.base.registration.InformationXMLFileServiceContent;
import
org.perfsonar.service.base.registration.InformationExistDbXmlrpcServiceContent;
+import
org.perfsonar.service.base.registration.InformationXMLFileServiceContent;
import org.perfsonar.service.base.registration.PropertiesServiceDescription;
import org.perfsonar.service.base.registration.ServiceLSRegistrator;

-
/**
* Action for simple Scheduler that registers with the LS
*
* @author Maciej Glowiak (main author)
* @author romradz (contributor)
- *
+ * @deprecated use
{@link
org.perfsonar.service.base.registration.LSRegistrationComponent}
*/
-public class LSRegistrationComponent
- implements SchedulerAction, AuxiliaryComponent {
+public class LSRegistrationComponent implements SchedulerAction,
AuxiliaryComponent {

-
-
// ----------------------------------------------------- constants

+ private static final int DEFAULT_RUN_INTERVAL = 10000;
+ private static final int MINIMAL_RUN_INTERVAL = 100;
+ private static final String MA_CONFIG_FILE = "service.ma.conf_file";
+ private static final String MA_CONFIG_STORE =
"service.ma.conf_file.store_type"; // "xmldb" or "file"

-
- private static final int DEFAULT_RUN_INTERVAL = 10000;
-
- private static final int MINIMAL_RUN_INTERVAL = 100;
-
- private static final String MA_CONFIG_FILE = "service.ma.conf_file";
-
- private static final String
MA_CONFIG_STORE="service.ma.conf_file.store_type"; //"xmldb" or "file"
-
-
-
// -------------------------------------------- class fields

+ private Message responseMessage = null;
+ private String componentName = "ma-registrator";
+ private LoggerComponent logger = null;
+ private ConfigurationComponent configuration = null;
+ private Scheduler scheduler = null;

-
- private Message responseMessage = null;
-
- private String componentName = "ma-registrator";
-
- private LoggerComponent logger = null;
-
- private ConfigurationComponent configuration = null;
-
- private Scheduler scheduler = null;
-
-
-
// ---------------------------------- constructors

-
-
public LSRegistrationComponent() throws PerfSONARException {
-
try {
-
- this.logger = (LoggerComponent)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(ComponentNames.LOGGER);
-
+ this.logger = (LoggerComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.LOGGER);
} catch (PerfSONARException e) {
-
throw new PerfSONARException(
- "error.common.no_logger",
- "LSRegistrationComponent.initComponent: "
- + "Cannot get logger component");
-
+ "error.common.no_logger",
+ "LSRegistrationComponent.initComponent: Cannot get logger
component"
+ );
}

-
try {
-
- this.configuration = (ConfigurationComponent)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(ComponentNames.CONFIG);
-
+ this.configuration = (ConfigurationComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.CONFIG);
} catch (PerfSONARException e) {
-
throw new PerfSONARException(
- "error.common.no_configuration",
- "LSRegistrationComponent.initComponent: "
- + "Cannot get config component");
-
+ "error.common.no_configuration",
+ "LSRegistrationComponent.initComponent: Cannot get config
component"
+ );
}
-
}

-
-
// ---------------------------------- public methods

+ /**
+ * Scheduler action
+ */
+ public void runAction() {
+ try {
+ String lsURL =
configuration.getProperty("service.r.ls_url");
+ logger.debug("LSRegistrationComponent.runAction:
register to LS: " + lsURL);

+ String metadataConfigStore = "";
+ try {
+ metadataConfigStore =
configuration.getProperty(LSRegistrationComponent.MA_CONFIG_STORE);
+ } catch (PerfSONARException ex) {
+
logger.debug("LSRegistrationComponent.runAction: Can't get property
"+LSRegistrationComponent.MA_CONFIG_STORE);
+ }

- /**
- * Scheduler action
- */
- public void runAction() {
+ ServiceLSRegistrator registrator = null;

- try {
+ if (metadataConfigStore.equals("file")) {
+ String maConfigFile =
configuration.getProperty(LSRegistrationComponent.MA_CONFIG_FILE);

- String lsURL = configuration.getProperty(
- "service.r.ls_url");
- logger.debug("LSRegistrationComponent.runAction: "
- + "register to LS: " + lsURL);
+
logger.debug("LSRegistrationComponent.runAction: metadata config file to
register to LS: "+ maConfigFile);

+ registrator = new GenericServiceLSRegistrator(
+ new
PropertiesServiceDescription(),
+ new
InformationXMLFileServiceContent(maConfigFile)
+ );
+ } else {
+ registrator = new GenericServiceLSRegistrator(
+ new
PropertiesServiceDescription(),
+ new
InformationExistDbXmlrpcServiceContent()
+ );

- String metadataConfigStore = "";
- try {
- metadataConfigStore =
-
configuration.getProperty(LSRegistrationComponent.MA_CONFIG_STORE);
- } catch (PerfSONARException ex) {}
+
logger.debug("LSRegistrationComponent.runAction: metadata configuration taken
from xml database");
+ }

- ServiceLSRegistrator registrator = null;
+ registrator.initRegistrator();

- if (metadataConfigStore.equals("file")) {
+ responseMessage = registrator.register(lsURL);
+
+ /* TODO: do something with message... ? */

- String maRRDConfigFile =
-
configuration.getProperty(LSRegistrationComponent.MA_CONFIG_FILE);
+ } catch (PerfSONARException e) {
+ logger.error("LSRegistrationComponent.runAction:
Error while registration: " + e.getMessage());
+ }
+ }

- logger.debug("LSRegistrationComponent.runAction: "
- + "metadata config file to register to LS: "
- + maRRDConfigFile);
+ public Message getResponseMessage() {
+ return responseMessage;
+ }

- registrator = new GenericServiceLSRegistrator(
- new PropertiesServiceDescription(),
- new
InformationXMLFileServiceContent(maRRDConfigFile));
-
- } else {
-
- registrator = new GenericServiceLSRegistrator(
- new PropertiesServiceDescription(),
- new InformationExistDbXmlrpcServiceContent());
-
- logger.debug("LSRegistrationComponent.runAction: "
- + "metadata configuration taken from xml database");
- }
-
-
-
- registrator.initRegistrator();
-
- responseMessage = registrator.register(lsURL);
-
- //TODO: xxx
- //do sth with message... ?
-
- } catch (PerfSONARException e) {
-
- logger.error("LSRegistrationComponent.runAction: "
- + "Error while registration: "
- + e.getMessage());
-
- }
-
- }
-
-
- public Message getResponseMessage() {
-
- return responseMessage;
-
- }
-
-
-
// ---------------------- component that loads action to scheduler

+ public void initComponent() throws PerfSONARException {
+ // Get configuration
+ // get interval - parameter "component.CName.interval"
+ int interval = LSRegistrationComponent.DEFAULT_RUN_INTERVAL;
+
+ try {
+ String intervalVal =
configuration.getProperty("component." + componentName + ".interval");
+ interval = Integer.parseInt(intervalVal);
+ } catch (RuntimeException e) {
+ // possibly not an integer - keep default interval
+ } catch (PerfSONARException e) {
+ // no property - keep default interval
+ }

- public void initComponent() throws PerfSONARException {
-
- //Get configuration
-
- //get interval - parameter "component.CName.interval"
- int interval = LSRegistrationComponent.DEFAULT_RUN_INTERVAL;
-
- try {
-
- String intervalVal = configuration.getProperty(
- "component." + componentName + ".interval");
- interval = Integer.parseInt(intervalVal);
-
- } catch (RuntimeException e) {
- //possibly not an integer - keep default interval
- } catch (PerfSONARException e) {
- //no property - keep default interval
- }
-
//if too small take default?
if (interval < LSRegistrationComponent.MINIMAL_RUN_INTERVAL) {
interval = LSRegistrationComponent.DEFAULT_RUN_INTERVAL;
}

- logger.debug("LSRegistrationComponent.initComponent: "
- + "LSCleanupLoader: parameter RUN_INTERVAL = " + interval);
+ logger.debug("LSRegistrationComponent.initComponent:
LSCleanupLoader: parameter RUN_INTERVAL = " + interval);

//get scheduler - parameter "component.CName.scheduler_component"
try {
+ String schedulerVal = configuration.getProperty("component." +
componentName + ".scheduler_component");

- String schedulerVal = configuration.getProperty(
- "component." + componentName + ".scheduler_component");
+ logger.debug("LSRegistrationComponent.initComponent:
LSCleanupLoader: parameter SCHEDULER = " + schedulerVal);

- logger.debug("LSRegistrationComponent.initComponent: "
- + "LSCleanupLoader: parameter SCHEDULER = " +
schedulerVal);
+ scheduler = (Scheduler)
AuxiliaryComponentManager.getInstance().getComponent(schedulerVal);

- scheduler = (Scheduler)
- AuxiliaryComponentManager.
- getInstance().
- getComponent(schedulerVal);
+ if (scheduler == null) {
+ throw new PerfSONARException(
+ "error.rrdma.no_scheduler",
+
"LSRegistrationComponent.initComponent: No scheduler component in
AuxiliaryComponentManager"
+ );
+ }
+ } catch (PerfSONARException e) {
+ throw new PerfSONARException(
+ "error.rrdma.no_scheduler",
+
"LSRegistrationComponent.initComponent:"
+ + "LSCleanupLoader:
no [component." + componentName
+ +
".scheduler_component] parameter. "+ e.getMessage()
+ );
+ }

- if (scheduler == null)
- throw new PerfSONARException("error.rrdma.no_scheduler",
- "LSRegistrationComponent.initComponent: "
- + "No scheduler component in
AuxiliaryComponentManager");
+ // add cleanup action to scheduler
+ scheduler.addSchedulerTask(interval, this);
+ }

- } catch (PerfSONARException e) {
+ public String getComponentName() {
+ return componentName;
+ }

- throw new PerfSONARException("error.rrdma.no_scheduler",
- "LSRegistrationComponent.initComponent:"
- + "LSCleanupLoader: no [component."
- + componentName + ".scheduler_component] parameter. "
- + e.getMessage());
+ public void setComponentName(String name) {
+ componentName = name;
+ }

- }
+ // ---------------------------------------------------------- test
main() method
+ // TODO remove?
+ public static void main(String[] args) throws Exception {
+ AuxiliaryComponentManager.getInstance();
+ }

- //add cleanup action to scheduler
- scheduler.addSchedulerTask(interval, this);
-
- }
-
-
- public String getComponentName() {
-
- return componentName;
-
- }
-
-
- public void setComponentName(String name) {
-
- componentName = name;
-
- }
-
-
-
- // ---------------------------------------------------------- test
main() method
-
-
-
- public static void main(String[] args) throws Exception {
-
- AuxiliaryComponentManager.getInstance();
-
- }
-
-
-
-} //LSRegistrationComponent
+} // LSRegistrationComponent
\ No newline at end of file



  • perfsonar: r3682 - in trunk/perfsonar_base: . ant doc src/main/java/org/perfsonar/base/auxiliary src/main/java/org/perfsonar/base/auxiliary/components src/main/java/org/perfsonar/base/auxiliary/components/authn src/main/java/org/perfsonar/base/auxiliary/components/context src/main/java/org/perfsonar/base/auxiliary/components/context/inMemory src/main/java/org/perfsonar/base/auxiliary/components/scheduler src/main/java/org/perfsonar/base/auxiliary/components/scheduler/actions src/main/java/org/perfsonar/base/util src/main/java/org/perfsonar/client/axis src/main/java/org/perfsonar/client/base/authn src/main/java/org/perfsonar/client/base/authn/edugain src/main/java/org/perfsonar/client/base/authn/saslca src/main/java/org/perfsonar/client/base/requests/lookupService src/main/java/org/perfsonar/client/testHarness src/main/java/org/perfsonar/service/base/authn src/main/java/org/perfsonar/service/base/authn/tokens src/main/java/org/perfsonar/service/base/container/listener s src/main/java/org/perfsonar/service/base/engine src/main/java/org/perfsonar/service/base/measurementExecutor src/main/java/org/perfsonar/service/base/messages src/main/java/org/perfsonar/service/base/registration src/main/java/org/perfsonar/service/base/storage src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc src/main/java/org/perfsonar/service/base/storage/xmlfile src/main/java/org/perfsonar/service/base/transport src/main/java/org/perfsonar/service/base/util src/main/java/org/perfsonar/service/base/web src/main/java/org/perfsonar/service/measurementArchive/eventTypeConfig src/main/java/org/perfsonar/service/measurementArchive/metadataConfig src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator src/main/java/org/perfsonar/service/measurementArchive/register, svnlog, 04/15/2008

Archive powered by MHonArc 2.6.16.

Top of Page