perfsonar-dev - perfsonar: r3761 - in trunk/surfnet_java-flowsa-ma: . src/main/java/org/perfsonar/service/measurementArchive/flowsa
Subject: perfsonar development work
List archive
perfsonar: r3761 - in trunk/surfnet_java-flowsa-ma: . src/main/java/org/perfsonar/service/measurementArchive/flowsa
Chronological Thread
- From:
- To:
- Subject: perfsonar: r3761 - in trunk/surfnet_java-flowsa-ma: . src/main/java/org/perfsonar/service/measurementArchive/flowsa
- Date: Tue, 22 Apr 2008 05:36:55 -0400
Author: michael.bischoff
Date: 2008-04-22 05:36:55 -0400 (Tue, 22 Apr 2008)
New Revision: 3761
Modified:
trunk/surfnet_java-flowsa-ma/pom.xml
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/LSRegistrationControll.java
Log:
pom version base update
ls stuff
Modified: trunk/surfnet_java-flowsa-ma/pom.xml
===================================================================
--- trunk/surfnet_java-flowsa-ma/pom.xml 2008-04-22 09:28:26 UTC (rev
3760)
+++ trunk/surfnet_java-flowsa-ma/pom.xml 2008-04-22 09:36:55 UTC (rev
3761)
@@ -134,7 +134,7 @@
<dependency>
<groupId>perfsonar</groupId>
<artifactId>perfsonar-base</artifactId>
- <version>1.0.20080303</version>
+ <version>1.0.20080416</version>
</dependency>
<dependency>
<groupId>perfsonar</groupId>
Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
2008-04-22 09:28:26 UTC (rev 3760)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/FlowsaMAServiceEngine.java
2008-04-22 09:36:55 UTC (rev 3761)
@@ -106,7 +106,7 @@
this.ls = new LSRegistrationControll();
logger.debug("FlowsaMAServiceEngine.<Constructor> Successfully
created LSRegistrationControll.");
- if(ls.IsLsConfigured(configuration) &&
!ls.hasRegistrationBeenStarted()) {
+ if(ls.IsConfigured(configuration) && !ls.hasStarted()) {
ls.start(nfcapd.getExporters());
logger.debug("FlowsaMAServiceEngine.<Constructor> Started
LSRegistrationControll.");
}
@@ -579,19 +579,6 @@
}
}
/**
- * tests if the ls registration is configured
- * @param configuration
- * @return true if the ls registration is configured
- */
- private boolean IsLsConfigured(ConfigurationComponent configuration) {
- try {
- String lsUrl =
configuration.getProperty("service.r.ls_url");
- return !lsUrl.trim().equals("");
- } catch (PerfSONARException e) {
- return false;
- }
- }
- /**
* gets the configuration component
* @return
* @throws PerfSONARException
Modified:
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/LSRegistrationControll.java
===================================================================
---
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/LSRegistrationControll.java
2008-04-22 09:28:26 UTC (rev 3760)
+++
trunk/surfnet_java-flowsa-ma/src/main/java/org/perfsonar/service/measurementArchive/flowsa/LSRegistrationControll.java
2008-04-22 09:36:55 UTC (rev 3761)
@@ -20,12 +20,22 @@
*/
public class LSRegistrationControll {
+ /**
+ * starts registration
+ * @param exporters
+ * @throws PerfSONARException
+ */
public void start(Set<Exporter> exporters) throws PerfSONARException {
update(exporters);
AuxiliaryComponent registrator =
AuxiliaryComponentManager.getInstance().loadComponent("registrator",
"org.perfsonar.service.base.registration.LSRegistrationComponent");
registrator.initComponent();
}
+ /**
+ * updates with new data
+ * @param exporters
+ * @throws PerfSONARException
+ */
public void update(Set<Exporter> exporters) throws PerfSONARException
{
PerfsonarContextComponent context =
(PerfsonarContextComponent)
AuxiliaryComponentManager.getInstance().getComponent(ComponentNames.CONTEXT);
StringBuilder builder = new StringBuilder();
@@ -49,14 +59,28 @@
context.put(REGISTRATION_DATA, new String[] {
builder.toString() });
}
- public boolean IsLsConfigured(ConfigurationComponent configuration) {
- // TODO Auto-generated method stub
- return false;
+ /**
+ * tests if the ls registration is configured
+ * @param configuration
+ * @return true if the ls registration is configured
+ */
+ public boolean IsConfigured(ConfigurationComponent configuration) {
+ try {
+ String lsUrl =
configuration.getProperty("service.r.ls_url");
+ return !lsUrl.trim().equals("");
+ } catch (PerfSONARException e) {
+ return false;
+ }
}
- public boolean hasRegistrationBeenStarted() throws PerfSONARException
{
-
if(AuxiliaryComponentManager.getInstance().getComponent("")!=null) return
true;
- return false;
+
+ /**
+ * Checks if registration has started
+ * @return true if it has started
+ * @throws PerfSONARException
+ */
+ public boolean hasStarted() throws PerfSONARException {
+ return
AuxiliaryComponentManager.getInstance().getComponent("")!=null;
}
}
- perfsonar: r3761 - in trunk/surfnet_java-flowsa-ma: . src/main/java/org/perfsonar/service/measurementArchive/flowsa, svnlog, 04/22/2008
Archive powered by MHonArc 2.6.16.