Return-Path: Delivered-To: apmail-incubator-geronimo-cvs-archive@www.apache.org Received: (qmail 78481 invoked from network); 30 Jan 2004 05:44:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Jan 2004 05:44:43 -0000 Received: (qmail 53635 invoked by uid 500); 30 Jan 2004 05:44:20 -0000 Delivered-To: apmail-incubator-geronimo-cvs-archive@incubator.apache.org Received: (qmail 53588 invoked by uid 500); 30 Jan 2004 05:44:20 -0000 Mailing-List: contact geronimo-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-cvs@incubator.apache.org Received: (qmail 53569 invoked from network); 30 Jan 2004 05:44:19 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 30 Jan 2004 05:44:19 -0000 Received: (qmail 78391 invoked by uid 1711); 30 Jan 2004 05:44:39 -0000 Date: 30 Jan 2004 05:44:39 -0000 Message-ID: <20040130054439.78390.qmail@minotaur.apache.org> From: dain@apache.org To: incubator-geronimo-cvs@apache.org Subject: cvs commit: incubator-geronimo/modules/remoting/src/java/org/apache/geronimo/remoting InterceptorRegistry.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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); } } - }