beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlin Rogers <carlin.rog...@gmail.com>
Subject Re: Move the NetUI generic Factory in to the utils or core package?
Date Fri, 24 Jun 2005 20:11:42 GMT
Yes, thanks Rich.

Also I was wondering if anyone felt strongly about where I 
move the Factory and FactoryConfig class. How about the
org.apache.beehive.netui.core package?

Carlin


On 6/24/05, Rich Feit <richfeit@gmail.com> wrote:
> I think you're right about all this -- seems like what needs to happen
> is that there should be a method like this:
>     public static Factory getFactory(ServletContext servletContext,
> Class factoryType, FactoryConfig config)
> 
> which would be called by the current XmlBean-based getFactory().
> 
> Sound good?
> 
> Rich
> 
> Carlin Rogers wrote:
> 
> >Sure, good idea. So the ServletContainerAdapter interface would
> >have a new method getFactory( Class factoryClass  ) where
> >Factory.class.isAssignableFrom( factoryClass ) must be true?
> >
> >In my case, URLTemplatesFactory would need to extend Factory
> >and would implement the init() method where I'd use the
> >static method Factory.getFactory(). I noted that the Factory
> >class implementation takes a PageflowFactory object
> >(which extends an xmlbeans XmlObject) as an argument to
> >the static getFactory() method containing a String
> >for the class name of the factory... and then uses
> >DiscoveryUtils to get a class loader. Not sure this jibes
> >with what you were asking for.
> >
> >For a generic Factory from the container adapter, I'm not sure
> >we'd always have an XmlObject to pass in. I'm now a little
> >confused as to how best to use the Factory class. Rich,
> >do you have more thoughts on this?
> >
> >Thanks,
> >Carlin
> >
> >On 6/24/05, Rich Feit <richfeit@gmail.com> wrote:
> >
> >
> >>Hi Carlin,
> >>
> >>This makes sense to me.  As to getting a Factory from the
> >>ServletContainerAdapter, would it be possible to have the method
> >>signature take a base Class instead of String?  Seems like we can avoid
> >>finding a classloader and loading the class each time, and in most cases
> >>we'd be passing a statically-known Class.
> >>
> >>Rich
> >>
> >>Carlin Rogers wrote:
> >>
> >>
> >>
> >>>All,
> >>>
> >>>I'm implementing a way to get a URLTemplateFactory from the
> >>>ServletContainerAdapter. However, I'm not sure a specific
> >>>method like this follows with the other methods that a
> >>>ServletContainerAdapter implementation provides.
> >>>
> >>>One thought would be I'd like to have a generic way to get
> >>>a Factory from the the ServletContainerAdapter given a
> >>>class name.
> >>>
> >>>We already do this using class names from the config file.
> >>>The generic Factory class is in the pageflow package.
> >>>It would be great to move this to the utils or core package
> >>>of NetUI. Then I could also add this to the ServletContainerAdapter.
> >>>I would also move the FactoryConfig class as well as we
> >>>already have other Config support in utils.
> >>>
> >>>I don't think Factory or FactoryConfig are used by or
> >>>exposed to beehive users. It should be a safe move to make.
> >>>
> >>>Opinions or concerns? Or other ideas for providing a generic
> >>>way to create a Factory from a container specific implementation?
> >>>
> >>>Thanks,
> >>>Carlin
> >>>
> >>>
> >>>
> >>>
> >>>
> >
> >
> >
>

Mime
View raw message