struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Interface question
Date Sun, 28 Jan 2007 16:00:17 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin,

Martin Gainty wrote:
> package fu.bar.*;

Well, that certainly won't compile. I'll assume you meant "package fu.bar;".

> package fu.bar;
> class HttpSource {
> RequestHandler reqHandler;
> };
>
> public class JDOMHttpSource extends HttpSource {
> public JDOMHttpSource(RequestHandler req , int method) {
>  };
> }; //class JDOMHttpSource

What wouldn't work about this? Perhaps I'm missing the point.

> could one instantiate a JDOMHttpSource class and have any capability
> of referencing a valid requestHandler (without implementing the
> interface in referenced or base class)?

That depends upon what the interface is for HttpSource... you didn't
include any method signatures.

If your JDOMHttpConstructor really does nothing (for instance, it does
not call an HttpSource constructor and pass the RequestHandler, or call
super.setRequestHandler, or directly set super.reqHandler), then you
will certainly not have a reference to the request handler passed-into
the JDOMHttpSource.

I'm still a little unclear as to what you want to accomplish... or what
the exact question is.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFvMiR9CaO5/Lv0PARAn9/AJ9uRJU7yb1Js2nTEQadMU3gBlbgtwCgwzyh
ZJr8ycG+w4AH8KXshmNpJ3w=
=EYKO
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message