dain 2004/01/29 21:44:39
Modified: modules/remoting/src/java/org/apache/geronimo/remoting
InterceptorRegistry.java
Log:
A bit of cleanup
Revision Changes Path
1.3 +8 -14
incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/InterceptorRegistry.java
Index: InterceptorRegistry.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting/InterceptorRegistry.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- InterceptorRegistry.java 23 Nov 2003 10:56:35 -0000 1.2
+++ InterceptorRegistry.java 30 Jan 2004 05:44:39 -0000 1.3
@@ -63,25 +63,20 @@
* @version $Revision$ $Date$
*/
public class InterceptorRegistry {
+ public static final InterceptorRegistry instance = new
InterceptorRegistry();
- static final public InterceptorRegistry instance = new
InterceptorRegistry();
+ private long nextID = System.currentTimeMillis();
+ private HashMap map = new HashMap();
private InterceptorRegistry() {
-
- }
-
- long nextID = System.currentTimeMillis();
- private synchronized long getNextID() {
- return nextID++;
}
- HashMap map = new HashMap();
- public Long register(Interceptor o) {
- Long id = new Long(getNextID());
+ public Long register(Interceptor interceptor) {
synchronized (map) {
- map.put(id, o);
+ Long id = new Long(nextID++);
+ map.put(id, interceptor);
+ return id;
}
- return id;
}
public Interceptor unregister(Long id) {
@@ -95,5 +90,4 @@
return (Interceptor) map.get(id);
}
}
-
}