Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Framework Presentation Project Participants: Karun Biyani Manish Mehta Pradeep Vincent CSE870 Advanced Software Engineering, Spring 2001 Instructor:

Similar presentations


Presentation on theme: "1 Framework Presentation Project Participants: Karun Biyani Manish Mehta Pradeep Vincent CSE870 Advanced Software Engineering, Spring 2001 Instructor:"— Presentation transcript:

1 1 Framework Presentation Project Participants: Karun Biyani Manish Mehta Pradeep Vincent CSE870 Advanced Software Engineering, Spring 2001 Instructor: Dr. B. Cheng

2 30 April, 2001 2 Overview Proxy Domain Description Framework Overview Sample Application Highlights Demonstration Discussion

3 30 April, 2001 3 Proxy Domain Http Filtering Proxy 1. Proxy resides between client and server 2. Does intermediate action 3. Proxy uses: caching, filtering, etc. 4. Filtering: domain filtering, background filtering, ad filtering, block filtering, etc.

4 30 April, 2001 4 Framework Packages Error – Contains Exception Handling Routines Html – Contains Html Parser and Html Block. Html Block is used to store the parsed Html page. Http – Contains Files for Handling Http Request and Http Response. Net – Contains Net Listener. It reads from and writes to the socket. Util – Contains files for generating Log File and Debug Routines Proxy – Contains Proxy Server and Http Proxy Handler Filter – Contains Filter classes that will do filtering on Request or Response. All new filter applications have to create a new filter class which will inherit the FilterHandler class.

5 Framework Application

6 30 April, 2001 6 Application Highlights Three Filtering Application AdFilter BlockFilter BackgroundFilter To instantiate the framework, the new filter class implements the FilterHandler interface and then instantiate the new filter class in Http1_0ProxyHandler

7 30 April, 2001 7 Code public class Http1_0ProxyHandler implements ISocketHandler { public static final String HTTP_URI_STRING = "http://"; private Socket m_sckOut = null; private NetObjRef tRefNextProxy = null; private boolean m_bDebug = false; private FilterHandler filter = new BackgroundFilter(); private static final boolean FLAG_REQ_FILTER = false; private static final boolean FLAG_RESP_FILTER = !FLAG_REQ_FILTER; private static final boolean DO_FILTER = true; public Http1_0ProxyHandler(FilterHandler applfilter) { filter = applfilter; }

8 import COM.reitshamer.http.*; import COM.reitshamer.html.*; public class AdFilter implements FilterHandler { public HttpResponse filter (HttpRequest req, HttpResponse res, boolean mayfilter) { if ( mayfilter ) { HTMLBlock block; if ( res != null ) HttpObjectList objList = res.getObjectList(); else return null; for ( int i=0; i < objList.size(); i++ ) { if ( objList.isHTMLBlock(i) ) { block = (HTMLBlock)objList.geti(i); dofiltering ( block ); } return null; }

9 30 April, 2001 9 Proxy Demonstration

10 30 April, 2001 10 Summary and Discussion Framework Implementation Fault Tolerance Handling malformed URLs Response Failure Thinking Ahead - Timing Failure Design Pattern Iterator Pattern Adapter Pattern

11 30 April, 2001 11 Summary and Discussion (contd.) Proxy Understanding How Http Request and Http Response are generated and Handled Http Request and Response Headers How different filtering can be implemented. Working in Team


Download ppt "1 Framework Presentation Project Participants: Karun Biyani Manish Mehta Pradeep Vincent CSE870 Advanced Software Engineering, Spring 2001 Instructor:"

Similar presentations


Ads by Google