From: Alexander M. <al...@gm...> - 2003-05-08 00:26:22
|
> Sounds good. Let me know when you have the interface worked out and I > will have a go with writing a cache module - probably something simple > to start with. So far this is the code for initialising a module. We cannot use static methods for certain reasons but singletons. Class cl=Class.forName(.......); // Check whether specified class was derived from insomnia.Module if (Module.class.isAssignableFrom(cl)==false) .......; ModuleManager.addModule((Module)cl.newInstance()); > Also it's clearly not as simple as just having the same request call > being passed into each module in turn - as some modules such as gzip or > cache would really need to be processing the output of another module > like the cgi-processor Yes, each module shall modify the output stream accordingly to its work (if it has to process the request of course), but things like the order and overall module combination seem to be needed to be solved. > (unless they intend to resubmit the request to > another module internally - which doesn't sound ideal). No of course not, a module shall not directly interact with others. Alexander |