You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by Steve Viens <sv...@attbi.com> on 2003/08/01 07:16:07 UTC
RE: [juddi-Developers] Handlers
Anou, the reason just came back to me...
The idea was to reduce the number of Handler objects created. jUDDI only
really needs one shared instance of each handler since a handler doesn't
maintain state - and that instance is created and stored in the shared
HandlerMaker instance.
My thought was to attempt to enforce the 'correct' way to obtain a
Handler implementation was via the HandlerMaker instance. By making each
Handler implementation's constructor 'protected' we're ensured that a
developer couldn't do this:
Handler h = new org.juddi.handler.FindServiceHandler();
Instead, every handler should be added to the HandlerMaker 'handler
registry' (i.e. HashMap) and that the 'correct' way to obtain a handler
was through the HandlerMaker.lookup(String) method. For instance, you
could obtain the 'FindService' handler by making any of these calls:
Handler h = HandlerMaker.lookup("find_service");
Handler h =
HandlerMaker.lookup(org.juddi.handler.FindService.TAG_NAME);
Handler h =
HandlerMaker.lookup("org.juddi.datatype.request.FindService");
Handler h =
HandlerMaker.lookup(org.juddi.datatype.request.FindService.class.getName
());
Steve
-----Original Message-----
From: juddi-developers-admin@lists.sourceforge.net
[mailto:juddi-developers-admin@lists.sourceforge.net] On Behalf Of Steve
Viens
Sent: Wednesday, July 30, 2003 8:44 PM
To: juddi-developers@lists.sourceforge.net
Subject: RE: [juddi-Developers] Handlers
Nope
I may have had some fleeting reason for it but that's long gone now ...
Do what you have to do!
Steve
-----Original Message-----
From: juddi-developers-admin@lists.sourceforge.net
[mailto:juddi-developers-admin@lists.sourceforge.net] On Behalf Of Anou
Manavalan
Sent: Wednesday, July 30, 2003 7:17 PM
To: juddi-developers@lists.sourceforge.net
Subject: [juddi-Developers] Handlers
Steve,
Any reason why the Handler constructors are made protected in this
release ?
regards,
-Anou
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01
/01
_______________________________________________
juddi-developers mailing list juddi-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/juddi-developers
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01
/01
_______________________________________________
juddi-developers mailing list juddi-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/juddi-developers