You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by do...@apache.org on 2008/11/14 11:15:25 UTC

svn commit: r713966 - /felix/sandbox/donsez/monitoradmin/src/main/java/org/apache/felix/sandbox/monitor/MonitorAdminImpl.java

Author: donsez
Date: Fri Nov 14 02:15:24 2008
New Revision: 713966

URL: http://svn.apache.org/viewvc?rev=713966&view=rev
Log:
remove unuseful interfaces (ServiceFactory) in the main class

Modified:
    felix/sandbox/donsez/monitoradmin/src/main/java/org/apache/felix/sandbox/monitor/MonitorAdminImpl.java

Modified: felix/sandbox/donsez/monitoradmin/src/main/java/org/apache/felix/sandbox/monitor/MonitorAdminImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/donsez/monitoradmin/src/main/java/org/apache/felix/sandbox/monitor/MonitorAdminImpl.java?rev=713966&r1=713965&r2=713966&view=diff
==============================================================================
--- felix/sandbox/donsez/monitoradmin/src/main/java/org/apache/felix/sandbox/monitor/MonitorAdminImpl.java (original)
+++ felix/sandbox/donsez/monitoradmin/src/main/java/org/apache/felix/sandbox/monitor/MonitorAdminImpl.java Fri Nov 14 02:15:24 2008
@@ -52,7 +52,7 @@
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 
-public class MonitorAdminImpl implements BundleActivator, ServiceFactory, org.apache.felix.sandbox.monitor.Constants {
+public class MonitorAdminImpl implements BundleActivator, org.apache.felix.sandbox.monitor.Constants {
 
 	class MonitoringJobImpl implements MonitoringJob, MonitorListener {
 
@@ -229,8 +229,8 @@
 				throw new IllegalArgumentException("null statusVariable");
 			String topic = TOPIC;
 			Dictionary properties = new Hashtable();
-			properties.put("mon.monitorable.pid", monitorableId);
-			properties.put("mon.statusvariable.name", statusVariable.getID());
+			properties.put(MON_MONITORABLE_PID, monitorableId);
+			properties.put(MON_STATUSVARIABLE_NAME, statusVariable.getID());
 
 			String value = null;
 			switch (statusVariable.getType()) { // TODO float->double, int->long
@@ -294,7 +294,7 @@
 		}
 
 		/**
-		 * ? Returns a StatusVariable addressed by its full path. The entity
+		 * Returns a StatusVariable addressed by its full path. The entity
 		 * which queries a StatusVariable needs to hold MonitorPermission for
 		 * the given target with the read action present.
 		 * 
@@ -394,7 +394,7 @@
 		}
 
 		/**
-		 * ? Returns the list of StatusVariable names published by a
+		 * Returns the list of StatusVariable names published by a
 		 * Monitorable instance. Only those status variables are listed where
 		 * the following two conditions are met: • the specified Monitorable
 		 * holds a MonitorPermission for the status variable with the publish
@@ -426,7 +426,7 @@
 		}
 
 		/**
-		 * ? Switches event sending on or off for the specified
+		 * Switches event sending on or off for the specified
 		 * StatusVariables. When the MonitorAdmin is notified about a
 		 * StatusVariable being updated it sends an event unless this feature is
 		 * switched off. Note that events within a monitoring job can not be
@@ -474,7 +474,7 @@
 		}
 
 		/**
-		 * ? Issues a request to reset a given StatusVariable. Depending on the
+		 * Issues a request to reset a given StatusVariable. Depending on the
 		 * semantics of the StatusVariable this call may or may not succeed: it
 		 * makes sense to reset a counter to its starting value, but e.g. a
 		 * StatusVariable of type String might not have a meaningful default
@@ -559,7 +559,7 @@
 		}
 
 		/**
-		 * ? Starts a time based MonitoringJob with the parameters provided.
+		 * Starts a time based MonitoringJob with the parameters provided.
 		 * Monitoring events will be sent according to the specified schedule.
 		 * All specified StatusVariables must exist when the job is started. The
 		 * initiator string is used in the mon.listener.id field of all events
@@ -665,7 +665,7 @@
 			return monitoringJob;
 		}
 
-		/*
+		/**
 		 * Returns the list of currently running MonitoringJobs. Jobs are only
 		 * visible to callers that have the necessary permissions: to receive a
 		 * Monitoring Job in the returned list, the caller must hold all
@@ -869,7 +869,7 @@
 	/**
 	 * path -> list of MonitoringJobImpl
 	 */
-	private Map subscriptions = new HashMap();
+	private Map/*<String,MonitoringJobImpl>*/ subscriptions = new HashMap();
 	
 
 	public void start(BundleContext bundleContext) throws Exception {
@@ -905,13 +905,4 @@
 		// TODO
 
 	}
-
-	public Object getService(Bundle bundle, ServiceRegistration serviceRegistration) {
-		// TODO check permission here
-		return this;
-	}
-
-	public void ungetService(Bundle bundle, ServiceRegistration serviceRegistration, Object servant) {
-	}
-
 }