An interface should be easy to construct aggregated request processors. If you are saying
import org.apache.struts.mythical.RequestProcessorInterface;
class FooRequestProcessor implements RequestProcessorInterface { RequestProcessInterface tiles = new TilesRequestProcessor(); RequestProcessInterface jndi = new JndiRequestProcessor();
public Action doForward( ... ) { return tiles.doForward( ... ); }
public void processRole( ... ) { jndi.processRole(...); }
public void processRole( ... ) { jndi.processRole(...); }
public void processBoth( ... ) { // Invented method!! jndi.processBoth(...); tiles.processBoth(...); } }
That's exactly what I had in mind.
Yes. You can get away with interface. Obviously it is not the generic ideal solution, but you can aggregate the functionality of the request processor however you like. Sure coding is a pain.
Can you explain why it's not generic, ideal, and a pain to code? To me, it looks straightforward. Remember that this functionality is to support the *few* people that will need it. Most Struts apps will use the standard RequestProcessor or TilesRequestProcessor. Simple is better in edge cases :-).
If we want to configure each method of the processor in struts-config.xml we may as well design it as Servlet Filters.
Yes. It is also backwards compatible with 1.1RC1/CVS
Deja vu multiple inheritance C++/. Surely not?!
This is standard OO composition, not a mimic of multiple inheritance (yuck).
David
-- Peter Pilgrim, Struts/J2EE Consultant, RBoS FM, Risk IT Tel: +44 (0)207-375-4923
*********************************************************************** Visit our Internet site at http://www.rbsmarkets.com
This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorised to retain, read, copy or disseminate this message or any part of it. The Royal Bank of Scotland plc is registered in Scotland No 90312 Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Regulated by the Financial Services Authority ***********************************************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]