RE: Methods to EventForwardingFactory

"Christian Cryder" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hmmm...interesting idea. Anyone have any objections?

Christian
----------------------------------------------
Christian Cryder
Internet Architect, ATMReports.com
Project Chair, BarracudaMVC - http://barracudamvc.org
----------------------------------------------
"Coffee? I could quit anytime, just not today"


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Srinivas Yermal
> Sent: Tuesday, September 30, 2003 1:17 PM
> To: [email protected]
> Subject: [Barracuda] Methods to EventForwardingFactory
>
>
> Could we add these methods to EventForwardingFactory (may be to
> EventRedirectFactory as well) so that it could be used in assembler
> without having to define it in the Gateway? Or is there any other method
> to do it?
>
>     public EventForwardingFactory() {
>         if (logger.isInfoEnabled()) logger.info("Creating new
> EventForwardingFactory [forward event not set]");
>     }
>
>     public void setForwardEvent(String eventClass) {
>         if (null == eventClass) return;
>         try {
>             Class c = Class.forName(eventClass);
>             fevent = (BaseEvent)c.newInstance();
>         } catch (ClassNotFoundException nfe) {
>             logger.error("Event class " + eventClass + " not found", nfe);
>         } catch (InstantiationException ie) {
>             logger.error("Error instantiating " + eventClass, ie);
>         } catch (IllegalAccessException iae) {
>             logger.error("Error instantiating " + eventClass, iae);
>         } catch (ClassCastException ce) {
>             logger.error("The class " + eventClass + " should be a
> BaseEvent", ce);
>         }
>     }
>
> Thanks,
> Srini.
>
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.