- From: Anselm Baird_Smith <abaird@www43.inria.fr>
- Date: Mon, 13 Jan 1997 09:01:53 +0100 (MET)
- To: mjoshi@kset.com
- Cc: Rolande Kendal <kendal@interlog.com>, www-jigsaw@www10.w3.org
Mahesh Joshi writes: > Hi, > > You put your code in the "ingoing" method of a filter you define. > Look at the way the Proxy filter does caching. > (look at the code in w3c.www.protocol.http.cache) > > you need to do the following: > 1) Design your own class that implements the PropRequestFilter > 2) Set this filter in the Proxy Properties page when you admin jigsaw > (or in the httpd.props file). You add it to the list of > w3c.www.protocol.http.filters setting. > 3) Put the the code below in the ingoing method of your class. > > Your code will get called before the request is processed. [cool to know that some people know about this :-)] > I have no clue as to how you would determine that an active Internet > connection exists. They are two possibilities: a) You want to take full control of wether or not the proxy is connected. It starts disconnected, when your filter runs, you connect it. b) You leave it to the cache filter (a better, but more difficult approach). Your filter should then get a pointer to the cache filter by using: w3c.www.protocol.http.HttpManager::getGlobalFilter and then you get/set the disconnected property [in fact, because Jigsaw uses observable properties, I am not sure you even need a call to getGlobalFilter...get the properties from the manager (at initialize time), and just set the "w3c.www.protocol.http.cache.connected" property, this should work by its own] Anselm.
Received on Monday, 13 January 1997 03:04:33 UTC