1 / 11

Framework Presentation

Framework Presentation. Project Participants: Karun Biyani Manish Mehta Pradeep Vincent. CSE870 Advanced Software Engineering, Spring 2001 Instructor: Dr. B. Cheng. Overview . Proxy Domain Description Framework Overview Sample Application Highlights Demonstration

paloma
Télécharger la présentation

Framework Presentation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Overview • Proxy Domain Description • Framework Overview • Sample Application Highlights • Demonstration • Discussion

  3. Proxy Domain • Http Filtering Proxy • Proxy resides between client and server • Does intermediate action • Proxy uses: caching, filtering, etc. • Filtering: domain filtering, background filtering, ad filtering, block filtering, etc.

  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. 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. 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

  5. Framework Application

  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. 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. Proxy Demonstration

  10. Summary and Discussion • Framework Implementation • Fault Tolerance • Handling malformed URLs • Response Failure • Thinking Ahead - Timing Failure • Design Pattern • Iterator Pattern • Adapter Pattern

  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

More Related