Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r5195 - in trunk/perfsonar_java-lsclient-api: . src/main/java/org/perfsonar src/main/java/org/perfsonar/lsclient src/main/java/org/perfsonar/lsclient/data src/main/java/org/perfsonar/lsclient/helpers src/main/java/org/perfsonar/lsclient/lsinfo

Subject: perfsonar development work

List archive

perfsonar: r5195 - in trunk/perfsonar_java-lsclient-api: . src/main/java/org/perfsonar src/main/java/org/perfsonar/lsclient src/main/java/org/perfsonar/lsclient/data src/main/java/org/perfsonar/lsclient/helpers src/main/java/org/perfsonar/lsclient/lsinfo


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r5195 - in trunk/perfsonar_java-lsclient-api: . src/main/java/org/perfsonar src/main/java/org/perfsonar/lsclient src/main/java/org/perfsonar/lsclient/data src/main/java/org/perfsonar/lsclient/helpers src/main/java/org/perfsonar/lsclient/lsinfo
  • Date: Thu, 18 Jun 2009 10:41:55 -0400

Author: krzjed
Date: 2009-06-18 10:41:54 -0400 (Thu, 18 Jun 2009)
New Revision: 5195

Added:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/data/

trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/

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
Modified:
trunk/perfsonar_java-lsclient-api/pom.xml

trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/DiscoveryStep.java

trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/Level1LsClientInterface.java

trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/data/Service.java

trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLevel1.java

trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLevel2.java

trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLsClient.java
Log:
Querying for measured interfaces added

Modified: trunk/perfsonar_java-lsclient-api/pom.xml
===================================================================
--- trunk/perfsonar_java-lsclient-api/pom.xml 2009-06-18 08:24:12 UTC (rev
5194)
+++ trunk/perfsonar_java-lsclient-api/pom.xml 2009-06-18 14:41:54 UTC (rev
5195)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0";
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
<modelVersion>4.0.0</modelVersion>
<groupId>perfsonar</groupId>
@@ -24,7 +23,24 @@

<email></email>
<organization>SURFnet</organization>
</developer>
+ <developer>
+ <id>kjedrzejewski</id>
+ <name>Krzysztof Jedrzejewski</name>
+
<organizationUrl>http://www.man.poznan.pl</organizationUrl>
+ <timezone>1</timezone>
+
<email></email>
+ <organization>Poznan Supercomputing and Networing
Center</organization>
+ </developer>
</developers>
+ <contributors>
+ <contributor>
+ <name>Poznan Supercomputing and Networing
Center</name>
+ <url>http://www.man.poznan.pl</url>
+ <properties>
+ <Note>Further development (Geant3 SA2
T3)</Note>
+ </properties>
+ </contributor>
+ </contributors>



@@ -62,26 +78,26 @@
<scope>test</scope>
</dependency>
</dependencies>
-
- <repositories>
- <repository>
- <id>personar</id>
- <name>personar repository</name>
-
<url>http://anonsvn.internet2.edu/svn/perfsonar/trunk/jar-repository/</url>
- </repository>
- <repository>
- <id>personar_leg</id>
- <name>personar repository</name>
-
<url>http://anonsvn.internet2.edu/svn/perfsonar/trunk/jar-repository/</url>
- <layout>legacy</layout>
- </repository>
- <repository>
- <id>codehaus-release-repo</id>
- <name>Codehaus Release Repo</name>
- <url>http://repository.codehaus.org</url>
- </repository>
- </repositories>
-
+
+ <repositories>
+ <repository>
+ <id>personar</id>
+ <name>personar repository</name>
+
<url>http://anonsvn.internet2.edu/svn/perfsonar/trunk/jar-repository/</url>
+ </repository>
+ <repository>
+ <id>personar_leg</id>
+ <name>personar repository</name>
+
<url>http://anonsvn.internet2.edu/svn/perfsonar/trunk/jar-repository/</url>
+ <layout>legacy</layout>
+ </repository>
+ <repository>
+ <id>codehaus-release-repo</id>
+ <name>Codehaus Release Repo</name>
+ <url>http://repository.codehaus.org</url>
+ </repository>
+ </repositories>
+
<build>
<pluginManagement>
<plugins>

Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/DiscoveryStep.java
===================================================================
---
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/DiscoveryStep.java
2009-06-18 08:24:12 UTC (rev 5194)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/DiscoveryStep.java
2009-06-18 14:41:54 UTC (rev 5195)
@@ -2,7 +2,7 @@

import java.util.Set;

-import org.perfsonar.lsclient.data.AuthorativeLookupservice;
+import org.perfsonar.lsclient.data.AuthorativeLookupService;

/**
* Represents a step in the discovery process.
@@ -25,7 +25,7 @@
* @return a (possibly empty) set of Authoratative lookup services
* or null if this step failed.
*/
- Set<AuthorativeLookupservice> getServices();
+ Set<AuthorativeLookupService> getServices();

/**
* If this step has completely failed.

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-18 08:24:12 UTC (rev 5194)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/Level1LsClientInterface.java
2009-06-18 14:41:54 UTC (rev 5195)
@@ -1,10 +1,12 @@
package org.perfsonar.lsclient;

+import java.util.List;
import java.util.Set;

-import org.perfsonar.lsclient.data.AuthorativeLookupservice;
+import org.perfsonar.lsclient.data.AuthorativeLookupService;
import org.perfsonar.lsclient.data.EventType;
import org.perfsonar.lsclient.data.LookupService;
+import org.perfsonar.lsclient.data.NetworkInterface;
import org.perfsonar.lsclient.data.Service;
import org.perfsonar.lsclient.data.ServiceMeasurementMetadata;
import org.perfsonar.lsclient.data.ServiceType;
@@ -13,111 +15,163 @@
/**
* Specified java interface for the perfSONAR LS Level-1 api.
*
+ * @author kjedrzejewski (PNSC)
* @author michael.bischoff (SURFnet)
* @version 1.0
* @since 1.0
*/
-public interface Level1LsClientInterface {
+public interface Level1LsClientInterface {
/**
- * Allows one to redefine the set of root global services to be used.
- * In other words the set supplied here replaces the default set
supplied
- * by the implementation (this default set can be empty depending on
the
- * implementation) During discovery the set of root
GobalLookupServices is
- * used. The set functions as a Roots File - Similar to a root.hints
in
- * DNS(we simply require a point of entry by which we can discover
others).
- * see:
http://anonsvn.internet2.edu/svn/nmwg/trunk/nmwg/doc/dLS/gLS/phase_1_color.html#bootstrapping
+ * Allows one to redefine the set of root global services to be used.
In
+ * other words the set supplied here replaces the default set
supplied by
+ * the implementation (this default set can be empty depending on the
+ * implementation) During discovery the set of root
GobalLookupServices is
+ * used. The set functions as a Roots File - Similar to a root.hints
in
+ * DNS(we simply require a point of entry by which we can discover
others).
+ * see: http://anonsvn.internet2.edu/svn/nmwg/trunk/nmwg/doc/dLS/gLS/
+ * phase_1_color.html#bootstrapping
*
- * @param rootServices a non-empty set of GobalLookupServices that
will act as a Roots file
+ * @param rootServices
+ * a non-empty set of GobalLookupServices that will act as
a
+ * Roots file
*
- * @throws IllegalArgumentException if null or a empty set is
specified.
+ * @throws IllegalArgumentException
+ * if null or a empty set is specified.
*/
void setKnownLookupServices(Set<LookupService> rootServices);
+
/**
- * Given some parameters this method returns a set of LookupService's
- * that have one or more services registered to them that know
something
- * about the given parameters. More formally it should be interpreted
as
- * any(topologyElement) AND any(eventType) AND any(serviceType) where
any()
- * is true if one or more of the elements within the specified set
are
+ * Given some parameters this method returns a set of LookupService's
that
+ * have one or more services registered to them that know something
about
+ * the given parameters. More formally it should be interpreted as
+ * any(topologyElement) AND any(eventType) AND any(serviceType) where
any()
+ * is true if one or more of the elements within the specified set are
* present.
- *
- * @param elements a set of topologyElements of which one or more
should match
- * @param eventTypes a set of eventTypes of which one or more should
match
- * @param types a set of serviceTypes of which one or more should
match
- * @return a non-null Set of non-null (home)LookupServices that know
about any elements AND any eventTypes AND types
*
- * @throw
{@link
UnsupportedOperationException} if a
{@link
ServiceType} is non-null this is because
- * currently there isn't a way to determine the serviceType in the LS
at this point. Also it's use
- * during discovery is questionable.
+ * @param elements
+ * a set of topologyElements of which one or more should
match
+ * @param eventTypes
+ * a set of eventTypes of which one or more should match
+ * @param types
+ * a set of serviceTypes of which one or more should match
+ * @return a non-null Set of non-null (home)LookupServices that know
about
+ * any elements AND any eventTypes AND types
+ *
+ * @throw
{@link
UnsupportedOperationException} if a
{@link
ServiceType} is
+ * non-null this is because currently there isn't a way to
determine
+ * the serviceType in the LS at this point. Also it's use
during
+ * discovery is questionable.
*/
- Set<AuthorativeLookupservice> discover(Set<TopologyElement> elements,
Set<EventType> eventTypes, Set<ServiceType> types);
+ Set<AuthorativeLookupService> discover(Set<TopologyElement> elements,
+ Set<EventType> eventTypes, Set<ServiceType> types);
+
/**
- * starts a
{@link
DiscoveryProcess} allowing one to take more
- * fine-grained control over the discovery process.
- *
- * @param elements a set of topologyElements of which one or more
should match
- * @param eventTypes a set of eventTypes of which one or more should
match
- * @param types a set of serviceTypes of which one or more should
match
- * @return DiscoveryProcess Object representing the discovery process
see
{@link
DiscoveryProcess}
+ * starts a
{@link
DiscoveryProcess} allowing one to take more fine-grained
+ * control over the discovery process.
+ *
+ * @param elements
+ * a set of topologyElements of which one or more should
match
+ * @param eventTypes
+ * a set of eventTypes of which one or more should match
+ * @param types
+ * a set of serviceTypes of which one or more should match
+ * @return DiscoveryProcess Object representing the discovery process
see
+ *
{@link
DiscoveryProcess}
*/
- DiscoveryProcess startDiscovery(Set<TopologyElement> elements,
Set<EventType> eventTypes, Set<ServiceType> types);
+ DiscoveryProcess startDiscovery(Set<TopologyElement> elements,
+ Set<EventType> eventTypes, Set<ServiceType> types);
+
/**
- * Given some parameters this method returns a set of
{@link
Service}
- * that is retrieved from a home lookup service. It returns all
- *
{@link
Service} of services that knows something about the
- * specified parameters. More formally it should be interpreted as
- * any(topologyElement) AND any(eventType) AND any(serviceType) where
any()
- * is true if one or more of the elements within the specified set
are
+ * Given some parameters this method returns a set of
{@link
Service} that
+ * is retrieved from a home lookup service. It returns all
{@link
Service}
+ * of services that knows something about the specified parameters.
More
+ * formally it should be interpreted as any(topologyElement) AND
+ * any(eventType) AND any(serviceType) where any() is true if one or
more of
+ * the elements within the specified set are present.
+ *
+ * @param hls
+ * home lookup service
+ * @param elements
+ * a set of topologyElements of which one or more should
match
+ * @param eventTypes
+ * a set of eventTypes of which one or more should match
+ * @param types
+ * a set of serviceTypes of which one or more should match
+ * @return a non-null Set of (home)LookupServices that know about any
+ * elements AND any eventTypes AND types
+ *
+ * @throw
{@link
UnsupportedOperationException} if a
{@link
ServiceType} is
+ * non-null this is because currently there isn't a way to
determine
+ * the serviceType in the LS at this point. Also it's use
during
+ * discovery is questionable.
+ */
+ Set<Service> getLSQueryLocation(AuthorativeLookupService hls,
+ Set<TopologyElement> elements, Set<EventType>
eventTypes,
+ Set<ServiceType> types);
+
+ /**
+ * Given some parameters this method returns a set of
+ *
{@link
ServiceMeasurementMetadata} that is retrieved from a home lookup
+ * service. It returns all
{@link
Service} of services that knows something
+ * about the specified parameters. More formally it should be
interpreted as
+ * any(topologyElement) AND any(eventType) AND any(serviceType) where
any()
+ * is true if one or more of the elements within the specified set are
* present.
- *
- * @param hls home lookup service
- * @param elements a set of topologyElements of which one or more
should match
- * @param eventTypes a set of eventTypes of which one or more should
match
- * @param types a set of serviceTypes of which one or more should
match
- * @return a non-null Set of (home)LookupServices that know about any
elements AND any eventTypes AND types
*
- * @throw
{@link
UnsupportedOperationException} if a
{@link
ServiceType} is non-null this is because
- * currently there isn't a way to determine the serviceType in the LS
at this point. Also it's use
- * during discovery is questionable.
+ * @param hls
+ * home lookup service
+ * @param elements
+ * a set of topologyElements of which one or more should
match
+ * @param eventTypes
+ * a set of eventTypes of which one or more should match
+ * @param types
+ * a set of serviceTypes of which one or more should match
+ * @return a non-null Set of (home)LookupServices that know about any
+ * elements AND any eventTypes AND types
+ *
+ * @throws
{@link
UnsupportedOperationException} if a
{@link
ServiceType} is
+ * non-null this is because currently there isn't a way to
determine
+ * the serviceType in the LS at this point. Also it's use
during
+ * discovery is questionable.
*/
- Set<Service> getLSQueryLocation(AuthorativeLookupservice hls,
Set<TopologyElement> elements, Set<EventType> eventTypes, Set<ServiceType>
types);
- /**
- * Given some parameters this method returns a set of
- *
{@link
ServiceMeasurementMetadata} that is retrieved from a home lookup
- * service. It returns all
{@link
Service} of services that knows
- * something about the specified parameters. More formally it should
be
- * interpreted as any(topologyElement) AND any(eventType) AND
- * any(serviceType) where any() is true if one or more of the
elements
- * within the specified set are present.
- *
- * @param hls home lookup service
- * @param elements a set of topologyElements of which one or more
should match
- * @param eventTypes a set of eventTypes of which one or more should
match
- * @param types a set of serviceTypes of which one or more should
match
- * @return a non-null Set of (home)LookupServices that know about any
elements AND any eventTypes AND types
+ Set<ServiceMeasurementMetadata> getLSQueryContent(
+ AuthorativeLookupService hls, Set<TopologyElement>
elements,
+ Set<EventType> eventTypes, Set<ServiceType> types);
+
+ /**
+ * TODO evaluate Given a service this method returns a set of
+ *
{@link
ServiceMetadata} that is retrieved from a home lookup service.
*
- * @throw
{@link
UnsupportedOperationException} if a
{@link
ServiceType} is non-null this is because
- * currently there isn't a way to determine the serviceType in the LS
at this point. Also it's use
- * during discovery is questionable.
+ * @param hls
+ * home lookup service
+ * @param service
*/
- Set<ServiceMeasurementMetadata>
getLSQueryContent(AuthorativeLookupservice hls, Set<TopologyElement>
elements, Set<EventType> eventTypes, Set<ServiceType> types);
-
+ // Set<ServiceMetadata> getLSQueryLocation(AuthorativeLookupservice
hls,
+ // Service service);
/**
- * TODO evaluate
- * Given a service this method returns a set of
{@link
ServiceMetadata}
- * that is retrieved from a home lookup service.
- *
- * @param hls home lookup service
- * @param service
+ * TODO evaluate Given a service returns a set of
+ *
{@link
ServiceMeasurementMetadata} that is retrieved from a home lookup
+ * service.
+ *
+ * @param hls
+ * home lookup service
+ * @param servicegetLSMeasuredInterfaces
+ * (LookupService hls, Service service) throws
LsQueryException
*/
- //Set<ServiceMetadata> getLSQueryLocation(AuthorativeLookupservice
hls, Service service);
- /**
- * TODO evaluate
- * Given a service returns a set of
{@link
ServiceMeasurementMetadata} that
- * is retrieved from a home lookup service.
- *
- * @param hls home lookup service
- * @param service
+ // Set<ServiceMeasurementMetadata>
+ // getLSQueryContent(AuthorativeLookupservice hls, Service service);
+ /**
+ * Finds interfaces measured by given measurement service
+ *
+ * @param hls
+ * Lookup Service that contains information thar are
searched for
+ * @param service
+ * service that measures interfaces that are searched for
+ * @return
{@link
List} of interfaces given service collect informations of
+ *
+ * @throws LsQueryException
+ * when problems with connection or response parsing
occurs
*/
- //Set<ServiceMeasurementMetadata>
getLSQueryContent(AuthorativeLookupservice hls, Service service);
-
+ List<NetworkInterface> getLSMeasuredInterfaces(LookupService hls,
+ Service service) throws LsQueryException;
}

Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/data/Service.java
===================================================================
---
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/data/Service.java
2009-06-18 08:24:12 UTC (rev 5194)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/data/Service.java
2009-06-18 14:41:54 UTC (rev 5195)
@@ -7,7 +7,7 @@
* @author michael.bischoff
*/
public interface Service extends Comparable<Service> {
- AuthorativeLookupservice getAuthorativeLookupservice();
+ AuthorativeLookupService getAuthorativeLookupService();

URI getEndPoint();


Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLevel1.java
===================================================================
---
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLevel1.java
2009-06-18 08:24:12 UTC (rev 5194)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLevel1.java
2009-06-18 14:41:54 UTC (rev 5195)
@@ -7,7 +7,7 @@
import org.perfsonar.lsclient.DiscoveryStep;
import org.perfsonar.lsclient.Level0LsClientInterface;
import org.perfsonar.lsclient.Level1LsClientInterface;
-import org.perfsonar.lsclient.data.AuthorativeLookupservice;
+import org.perfsonar.lsclient.data.AuthorativeLookupService;
import org.perfsonar.lsclient.data.EventType;
import org.perfsonar.lsclient.data.ServiceType;
import org.perfsonar.lsclient.data.TopologyElement;
@@ -34,8 +34,8 @@
/* (non-Javadoc)
* @see
org.perfsonar.lsclient.Level1LsClientInterface#discover(java.util.Set,
java.util.Set, java.util.Set)
*/
- public Set<AuthorativeLookupservice> discover(Set<TopologyElement>
elements, Set<EventType> eventTypes, Set<ServiceType> type) {
- Set<AuthorativeLookupservice> result = new
HashSet<AuthorativeLookupservice>(50);
+ public Set<AuthorativeLookupService> discover(Set<TopologyElement>
elements, Set<EventType> eventTypes, Set<ServiceType> type) {
+ Set<AuthorativeLookupService> result = new
HashSet<AuthorativeLookupService>(50);
DiscoveryProcess process = startDiscovery(elements,
eventTypes, type);
for(DiscoveryStep step : process) {
if(!step.hasFailed())
result.addAll(step.getServices());

Modified:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLevel2.java
===================================================================
---
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLevel2.java
2009-06-18 08:24:12 UTC (rev 5194)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLevel2.java
2009-06-18 14:41:54 UTC (rev 5195)
@@ -6,7 +6,7 @@
import org.perfsonar.lsclient.Level0LsClientInterface;
import org.perfsonar.lsclient.Level1LsClientInterface;
import org.perfsonar.lsclient.Level2LsClientInterface;
-import org.perfsonar.lsclient.data.AuthorativeLookupservice;
+import org.perfsonar.lsclient.data.AuthorativeLookupService;
import org.perfsonar.lsclient.data.EventType;
import org.perfsonar.lsclient.data.ServiceMeasurementMetadata;
import org.perfsonar.lsclient.data.Service;
@@ -34,9 +34,9 @@
* @see
org.perfsonar.lsclient.Level2LsClientInterface#getContent(java.util.Set,
java.util.Set, java.util.Set)
*/
public Set<ServiceMeasurementMetadata>
getContent(Set<TopologyElement> elements, Set<EventType> eventTypes,
Set<ServiceType> type) {
- Set<AuthorativeLookupservice> homeLookupServices =
level1.discover(elements, eventTypes, type);
+ Set<AuthorativeLookupService> homeLookupServices =
level1.discover(elements, eventTypes, type);
Set<ServiceMeasurementMetadata> result = new
HashSet<ServiceMeasurementMetadata>(homeLookupServices.size()*4);
- for(AuthorativeLookupservice homeLookupService :
homeLookupServices) {
+ for(AuthorativeLookupService homeLookupService :
homeLookupServices) {

result.addAll(level1.getLSQueryContent(homeLookupService, elements,
eventTypes, type));
}
return result;
@@ -46,9 +46,9 @@
* @see
org.perfsonar.lsclient.Level2LsClientInterface#getLocation(java.util.Set,
java.util.Set, java.util.Set)
*/
public Set<Service> getLocation(Set<TopologyElement> elements,
Set<EventType> eventTypes, Set<ServiceType> type) {
- Set<AuthorativeLookupservice> authorativeLSes =
level1.discover(elements, eventTypes, type);
+ Set<AuthorativeLookupService> authorativeLSes =
level1.discover(elements, eventTypes, type);
Set<Service> result = new
HashSet<Service>(authorativeLSes.size()*4);
- for(AuthorativeLookupservice authorativeLS : authorativeLSes)
{
+ for(AuthorativeLookupService authorativeLS : authorativeLSes)
{

result.addAll(level1.getLSQueryLocation(authorativeLS, elements, eventTypes,
type));
}
return result;

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-18 08:24:12 UTC (rev 5194)
+++
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/helpers/AbstractLsClient.java
2009-06-18 14:41:54 UTC (rev 5195)
@@ -1,6 +1,7 @@
package org.perfsonar.lsclient.helpers;

import java.io.InputStream;
+import java.util.List;
import java.util.Set;

import org.perfsonar.lsclient.DiscoveryProcess;
@@ -9,89 +10,163 @@
import org.perfsonar.lsclient.Level2LsClientInterface;
import org.perfsonar.lsclient.LsClient;
import org.perfsonar.lsclient.LsQueryException;
-import org.perfsonar.lsclient.data.AuthorativeLookupservice;
+import org.perfsonar.lsclient.data.AuthorativeLookupService;
import org.perfsonar.lsclient.data.EventType;
import org.perfsonar.lsclient.data.LookupService;
+import org.perfsonar.lsclient.data.NetworkInterface;
+import org.perfsonar.lsclient.data.Service;
import org.perfsonar.lsclient.data.ServiceMeasurementMetadata;
-import org.perfsonar.lsclient.data.Service;
import org.perfsonar.lsclient.data.ServiceType;
import org.perfsonar.lsclient.data.TopologyElement;

/**
- * Abstract class that makes use of delegates so levels can
- * easily be swapped out
+ * Abstract class that makes use of delegates so levels can easily be swapped
+ * out
*
* @author michael.bischoff (SURFnet)
+ * @author kjedrzejewski (PSNC)
*/
public abstract class AbstractLsClient implements LsClient {

- public AbstractLsClient() { /* no arg constructor */ }
-
+ public AbstractLsClient() { /* no arg constructor */
+ }
+
abstract protected Level0LsClientInterface getLevel0();
+
abstract protected Level1LsClientInterface getLevel1();
+
abstract protected Level2LsClientInterface getLevel2();
-
+
// -- Level 0 --

- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level0LsClientInterface#getRawQueryResult(org.perfsonar.lsclient.data.LookupService,
java.lang.String)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level0LsClientInterface#getRawQueryResult(org.
+ * perfsonar.lsclient.data.LookupService, java.lang.String)
*/
- public InputStream getRawQueryResult(LookupService lookupService,
String xquery) throws LsQueryException, IllegalArgumentException {
+ public InputStream getRawQueryResult(LookupService lookupService,
+ String xquery) throws LsQueryException,
IllegalArgumentException {
return getLevel0().getRawQueryResult(lookupService, xquery);
}
-
- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level0LsClientInterface#getRawQueryResult(org.perfsonar.lsclient.data.LookupService,
java.lang.String)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level0LsClientInterface#getRawQueryResult(org.
+ * perfsonar.lsclient.data.LookupService, java.lang.String)
*/
- public InputStream getRawDiscoveryResponse(LookupService
lookupService, String summaryDescription) throws LsQueryException {
- return getLevel0().getRawDiscoveryResponse(lookupService,
summaryDescription);
+ public InputStream getRawDiscoveryResponse(LookupService
lookupService,
+ String summaryDescription) throws LsQueryException {
+ return getLevel0().getRawDiscoveryResponse(lookupService,
+ summaryDescription);
}

// -- Level 1 --
-
- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level1LsClientInterface#discover(java.util.Set,
java.util.Set, java.util.Set)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level1LsClientInterface#discover(java.util.Set,
+ * java.util.Set, java.util.Set)
*/
- public Set<AuthorativeLookupservice> discover(Set<TopologyElement>
elements, Set<EventType> eventTypes, Set<ServiceType> type) {
+ public Set<AuthorativeLookupService> discover(
+ Set<TopologyElement> elements, Set<EventType>
eventTypes,
+ Set<ServiceType> type) {
return getLevel1().discover(elements, eventTypes, type);
}
- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level1LsClientInterface#getLSQueryContent(org.perfsonar.lsclient.data.HomeLookupService,
java.util.Set, java.util.Set, java.util.Set)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level1LsClientInterface#getLSQueryContent(org.
+ * perfsonar.lsclient.data.HomeLookupService, java.util.Set,
java.util.Set,
+ * java.util.Set)
*/
- public Set<ServiceMeasurementMetadata>
getLSQueryContent(AuthorativeLookupservice aLs, Set<TopologyElement>
elements, Set<EventType> eventTypes, Set<ServiceType> type) {
+ public Set<ServiceMeasurementMetadata> getLSQueryContent(
+ AuthorativeLookupService aLs, Set<TopologyElement>
elements,
+ Set<EventType> eventTypes, Set<ServiceType> type) {
return getLevel1().getLSQueryContent(aLs, elements,
eventTypes, type);
}
- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level1LsClientInterface#getLSQueryLocation(org.perfsonar.lsclient.data.HomeLookupService,
java.util.Set, java.util.Set, java.util.Set)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level1LsClientInterface#getLSQueryLocation(org
+ * .perfsonar.lsclient.data.HomeLookupService, java.util.Set,
java.util.Set,
+ * java.util.Set)
*/
- public Set<Service> getLSQueryLocation(AuthorativeLookupservice aLs,
Set<TopologyElement> elements, Set<EventType> eventTypes, Set<ServiceType>
type) {
+ public Set<Service> getLSQueryLocation(AuthorativeLookupService aLs,
+ Set<TopologyElement> elements, Set<EventType>
eventTypes,
+ Set<ServiceType> type) {
return getLevel1().getLSQueryLocation(aLs, elements,
eventTypes, type);
}
- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level1LsClientInterface#setKnownGlobalLookupServices(java.util.Set)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level1LsClientInterface#setKnownGlobalLookupServices
+ * (java.util.Set)
*/
public void setKnownLookupServices(Set<LookupService> rootServices) {
getLevel1().setKnownLookupServices(rootServices);
}
- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level1LsClientInterface#startDiscovery(java.util.Set,
java.util.Set, java.util.Set)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level1LsClientInterface#startDiscovery(java.util
+ * .Set, java.util.Set, java.util.Set)
*/
- public DiscoveryProcess startDiscovery(Set<TopologyElement> elements,
Set<EventType> eventTypes, Set<ServiceType> types) {
+ public DiscoveryProcess startDiscovery(Set<TopologyElement> elements,
+ Set<EventType> eventTypes, Set<ServiceType> types) {
return getLevel1().startDiscovery(elements, eventTypes,
types);
}
-
+
// -- Level 2 --
-
- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level2LsClientInterface#getContent(java.util.Set,
java.util.Set, java.util.Set)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level2LsClientInterface#getContent(java.util.Set,
+ * java.util.Set, java.util.Set)
*/
- public Set<ServiceMeasurementMetadata>
getContent(Set<TopologyElement> elements, Set<EventType> eventTypes,
Set<ServiceType> type) {
+ public Set<ServiceMeasurementMetadata> getContent(
+ Set<TopologyElement> elements, Set<EventType>
eventTypes,
+ Set<ServiceType> type) {
return getLevel2().getContent(elements, eventTypes, type);
}
- /* (non-Javadoc)
- * @see
org.perfsonar.lsclient.Level2LsClientInterface#getLocation(java.util.Set,
java.util.Set, java.util.Set)
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level2LsClientInterface#getLocation(java.util.Set,
+ * java.util.Set, java.util.Set)
*/
- public Set<Service> getLocation(Set<TopologyElement> elements,
Set<EventType> eventTypes, Set<ServiceType> type) {
+ public Set<Service> getLocation(Set<TopologyElement> elements,
+ Set<EventType> eventTypes, Set<ServiceType> type) {
return getLevel2().getLocation(elements, eventTypes, type);
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
org.perfsonar.lsclient.Level1LsClientInterface#getLSMeasuredInterfaces(
+ * org.perfsonar.lsclient.data.AuthorativeLookupservice,
+ * org.perfsonar.lsclient.data.Service)
+ */
+ public List<NetworkInterface> getLSMeasuredInterfaces(LookupService
hls,
+ Service service) throws LsQueryException {
+ return getLevel1().getLSMeasuredInterfaces(hls, service);
+ }
}

Added:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Databases.java

Added:
trunk/perfsonar_java-lsclient-api/src/main/java/org/perfsonar/lsclient/lsinfo/Namespaces.java




Archive powered by MHonArc 2.6.16.

Top of Page