perfsonar-dev - perfsonar: r5198 - in trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient: . handlers helpers lsinfo
Subject: perfsonar development work
List archive
perfsonar: r5198 - in trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient: . handlers helpers lsinfo
Chronological Thread
- From:
- To:
- Subject: perfsonar: r5198 - in trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient: . handlers helpers lsinfo
- Date: Mon, 22 Jun 2009 04:49:14 -0400
Author: krzjed
Date: 2009-06-22 04:49:13 -0400 (Mon, 22 Jun 2009)
New Revision: 5198
Added:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/handlers/
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/handlers/NetworkInterfaceHandler.java
Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/Level1LsClientInterface.java
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLsClient.java
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Databases.java
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Namespaces.java
Log:
Added the possibility of use parsed data parallelly with the parsing
Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/Level1LsClientInterface.java
===================================================================
---
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/Level1LsClientInterface.java
2009-06-19 08:39:07 UTC (rev 5197)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/Level1LsClientInterface.java
2009-06-22 08:49:13 UTC (rev 5198)
@@ -11,11 +11,12 @@
import org.perfsonar.lsclient.data.ServiceMeasurementMetadata;
import org.perfsonar.lsclient.data.ServiceType;
import org.perfsonar.lsclient.data.TopologyElement;
+import org.perfsonar.lsclient.handlers.NetworkInterfaceHandler;
/**
* Specified java interface for the perfSONAR LS Level-1 api.
*
- * @author kjedrzejewski (PNSC)
+ * @author krzjed (PNSC)
* @author michael.bischoff (SURFnet)
* @version 1.0
* @since 1.0
@@ -161,10 +162,12 @@
// Set<ServiceMeasurementMetadata>
// getLSQueryContent(AuthorativeLookupservice hls, Service service);
/**
- * Finds interfaces measured by given measurement service
+ * Finds interfaces measured by given measurement service. If this
method
+ * result is stored only temporary, method processLSMeasuredInterfaces
+ * should be used instead, because it uses less memory.
*
* @param hls
- * Lookup Service that contains information thar are
searched for
+ * Lookup Service that contains information that are
searched for
* @param service
* service that measures interfaces that are searched for
* @return
{@link
List} of interfaces given service collect informations of
@@ -174,4 +177,21 @@
*/
List<NetworkInterface> getLSMeasuredInterfaces(LookupService hls,
Service service) throws LsQueryException;
+
+ /**
+ * Finds interfaces measured by given measurement service and
processes it
+ * using given handler.
+ *
+ * @param hls
+ * Lookup Service that contains information thar are
searched for
+ * @param service
+ * service that measures interfaces that are searched for
+ * @param handler
+ *
{@link
NetworkInterfaceHandler} containing instructions for
+ * processing found
{@link
NetworkInterface}s
+ * @throws LsQueryException
+ * when problems with connection or response parsing
occurs
+ */
+ void processLSMeasuredInterfaces(LookupService hls, Service service,
+ NetworkInterfaceHandler handler) throws
LsQueryException;
}
Added:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/handlers/NetworkInterfaceHandler.java
Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLsClient.java
===================================================================
---
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLsClient.java
2009-06-19 08:39:07 UTC (rev 5197)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLsClient.java
2009-06-22 08:49:13 UTC (rev 5198)
@@ -18,13 +18,14 @@
import org.perfsonar.lsclient.data.ServiceMeasurementMetadata;
import org.perfsonar.lsclient.data.ServiceType;
import org.perfsonar.lsclient.data.TopologyElement;
+import org.perfsonar.lsclient.handlers.NetworkInterfaceHandler;
/**
* Abstract class that makes use of delegates so levels can easily be swapped
* out
*
* @author michael.bischoff (SURFnet)
- * @author kjedrzejewski (PSNC)
+ * @author krzjed (PSNC)
*/
public abstract class AbstractLsClient implements LsClient {
@@ -169,4 +170,18 @@
Service service) throws LsQueryException {
return getLevel1().getLSMeasuredInterfaces(hls, service);
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level1LsClientInterface#processLSMeasuredInterfaces
+ * (org.perfsonar.lsclient.data.LookupService,
+ * org.perfsonar.lsclient.data.Service,
+ * org.perfsonar.lsclient.handlers.NetworkInterfaceHandler)
+ */
+ public void processLSMeasuredInterfaces(LookupService hls, Service
service,
+ NetworkInterfaceHandler handler) throws
LsQueryException {
+ getLevel1().processLSMeasuredInterfaces(hls, service,
handler);
+ }
}
Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Databases.java
===================================================================
---
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Databases.java
2009-06-19 08:39:07 UTC (rev 5197)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Databases.java
2009-06-22 08:49:13 UTC (rev 5198)
@@ -1,5 +1,14 @@
package org.perfsonar.lsclient.lsinfo;
+/**
+ * Constants for operations with database
+ *
+ * @author krzjed
+ *
+ */
public class Databases {
public final static String LSSTORE = "LSStore";
+
+ private Databases() {
+ };
}
Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Namespaces.java
===================================================================
---
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Namespaces.java
2009-06-19 08:39:07 UTC (rev 5197)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Namespaces.java
2009-06-22 08:49:13 UTC (rev 5198)
@@ -1,5 +1,11 @@
package org.perfsonar.lsclient.lsinfo;
+/**
+ * Namespaces names
+ *
+ * @author krzjed
+ *
+ */
public class Namespaces {
public static final String PERFSONAR =
"http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
public static final String NMWG = "http://ggf.org/ns/nmwg/base/2.0/";
- perfsonar: r5198 - in trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient: . handlers helpers lsinfo, svnlog, 06/22/2009
Archive powered by MHonArc 2.6.16.