Re: seda for dummy questions: events

Quartz <[email protected]> Fri, 1 Aug 2003 15:20:24 -0700 (PDT)
Newsgroups gmane.comp.java.seda.user
Message-ID <[email protected]>
(I will answer some of my own questions for benefit of archive)

> 1-true or false:
> To receive StageInitializedSignal, one piece of code must register a sink to the signal manager.
> This signal is not sent by default, only EventHandlerIF.init() is ensured. true/false?

true
in init(), use
config.getManager().getSignalMgr().register(new StagesInitializedSignal(),
config.getStage().getSink());



> 2-How/where do I fire a signal?
You can't right now, but if the SignalMgrIf api is updated to reflect the implementation's "public
void trigger(SignalIf)", then you would use it.



> 3-Is the signal type detection based on the classname, class object (object.getClass()),
> equals(..),  or other?

Signal's getClass() object is used (as by the Hastable keys contract, that .equals() and
.hashcode(), that means ==)




> 4-How do I create new signals, (if needed according to the above)(meaning: declaring their
> existence so that others can be registered/denied to it)?

implement SignalIf marker interface and hope SignalMgrIf.trigger(SignalIf) get's added to the api 
soon, or don't try...





__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-------------------------------------------------------
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