Update of /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/data
In directory usw-pr-cvs1:/tmp/cvs-serv28552
Modified Files:
ProfilerData.java
Log Message:
Listeners added to the profiler data.
Index: ProfilerData.java
===================================================================
RCS file: /cvsroot/javaprofiler/module/net/sourceforge/javaprofiler/module/data/ProfilerData.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ProfilerData.java 26 Feb 2002 00:51:21 -0000 1.3
--- ProfilerData.java 16 May 2002 12:05:32 -0000 1.4
***************
*** 41,44 ****
--- 41,46 ----
/** List of Snapshots. */
private List snapshots;
+ /** List of connection listeners. */
+ private List listeners;
/** Sigleton instance of this class. */
private static ProfilerData data;
***************
*** 53,56 ****
--- 55,59 ----
sessions=new LinkedList();
snapshots=new LinkedList();
+ listeners=new LinkedList();
current=-1;
}
***************
*** 165,168 ****
--- 168,200 ----
return new LinkedList(snapshots);
}
+
+ /**
+ * Adds listener to the list of connection listeners.
+ *
+ * @param listener added listener.
+ */
+ public void addConListener(ConListener listener) {
+ listeners.add(listener);
+ refreshSessions();
+ }
+
+ /**
+ * Removes listener from the list of connection listeners.
+ *
+ * @param listener removed listener.
+ */
+ public void removeConListener(ConListener listener) {
+ listeners.remove(listener);
+ refreshSessions();
+ }
+
+ /**
+ * Returns <code>List</code> of connection listeners.
+ *
+ * @return <code>List</code> of <code>ConListener</code> objects.
+ */
+ public List listeners() {
+ return new LinkedList(listeners);
+ }
}
***************
*** 170,173 ****
--- 202,208 ----
/*
* $Log$
+ * Revision 1.4 2002/05/16 12:05:32 stolis
+ * Listeners added to the profiler data.
+ *
* Revision 1.3 2002/02/26 00:51:21 stolis
* RefreshSessions method made public.
|