WO2001020485A2 - Methods and apparatus for storing, retrieving and manipulating hypertext data - Google Patents

Methods and apparatus for storing, retrieving and manipulating hypertext data Download PDF

Info

Publication number
WO2001020485A2
WO2001020485A2 PCT/US2000/025358 US0025358W WO0120485A2 WO 2001020485 A2 WO2001020485 A2 WO 2001020485A2 US 0025358 W US0025358 W US 0025358W WO 0120485 A2 WO0120485 A2 WO 0120485A2
Authority
WO
WIPO (PCT)
Prior art keywords
awt
java
event
new
void
Prior art date
Application number
PCT/US2000/025358
Other languages
French (fr)
Other versions
WO2001020485A3 (en
Inventor
Clinton Brenton Battersby
Original Assignee
Wwwhoosh, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wwwhoosh, Inc. filed Critical Wwwhoosh, Inc.
Priority to AU75836/00A priority Critical patent/AU7583600A/en
Publication of WO2001020485A2 publication Critical patent/WO2001020485A2/en
Publication of WO2001020485A3 publication Critical patent/WO2001020485A3/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/53Network services using third party service providers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/564Enhancement of application control based on intercepted application data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/289Intermediate processing functionally located close to the data consumer application, e.g. in same machine, in same home or in same sub-network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]

Definitions

  • This invention relates to hypertext communication systems and more particularly to methods and apparatus for speeding the transmission of data objects which incorporate other data objects by reference.
  • the present invention may be used to advantage to more rapidly transmit the information needed for displaying web pages expressed in Hypertext Markup Language (HTML) by means of the Hypertext Transfer Protocol (HTTP).
  • HTML Hypertext Markup Language
  • HTTP Hypertext Transfer Protocol
  • the principles of the invention may also be employed for displaying or processing other forms of information, such as data expressed in SGML and XML which, like HTML, employ data objects which incorporate information found in separate resources which are specified by an suitable identifier, such as an Internet URL, and retrieved using the a suitable request-response network communications protocol, such as the conventional HTTP / TCP-IP transmission mechanism used by the Internet World Wide Web facility.
  • HTML and XML HTML in its preferred forms, as been defined in specifications which have continued to evolve to meet needs of users and developers.
  • HTML 2.0 was developed under the aegis of the Internet Engineering Task Force (IETF) to codify common practice in late 1994 and is described in RFC 1866 (November, 1995).
  • IETF Internet Engineering Task Force
  • HTML 4.0 the latest version of which is available at the URL http://www.w3.org/TR/html40, extends HTML with mechanisms for style sheets, scripting, frames, embedding objects, and other enhancements.
  • HTML's multimedia features allow authors to include images, applets (programs that are automatically downloaded and run on the user' s machine), video clips, and other HTML documents in their pages.
  • applets programs that are automatically downloaded and run on the user' s machine
  • video clips and other HTML documents in their pages.
  • HTML text i.e, to display all of the referenced text and images, as well as to play referenced sound and/or video files
  • HTML browser program to scan the HTML text, identify the references to included resources that need to be fetched, and issue a sequence of separate requests using the Hypertext Transfer Protocol (HTTP) to obtain a current copy of each additional item ofreferenced data.
  • HTTP Hypertext Transfer Protocol
  • the Extensible Markup Language is a subset of SGML which was designed to enable generic SGML to be served, received, and processed on the Web in the way that was previously possible with HTML.
  • An XML document as specified in the World Wide Web Consortium' s Recommendation entitled "Extensible Markup Language (XML) 1.0" (February, 1998), may consist of one or many storage units called entities; all of which have content and which are typically identified by name. Each XML document has one entity called the document entity, which serves as the starting point for the XML processor and may contain the whole document.
  • the XML specification permits an XML document to refer to one or more external entities by an appropriate identifier (URI) so that the content of the external entity referred to may be incorporated into the XML document.
  • URI identifier
  • the validation or processing of an XML document may require multiple HTTP request/response exchanges to assemble the entire document.
  • HTTP Hypertext Transfer Protocol
  • IETF Internet Engineering Task Force
  • RRC Request for Comment
  • HTTP 1.1 has incorporated a number of enhancements to improve browser to web server and browser to web cache performance.
  • the standard has historically and will continue to evolve at a necessarily slow pace to accommodate the millions of devices using the protocols to guarantee a smooth integration of the new capabilities.
  • HTML pages and XML documents often reference one or more external entities which are separate physical storage objects and which much be fetched via the communications network in order to render or process the entire page or document. Because these external objects are frequently re-used by client applications, caching may be used to advantage.
  • web browsers send multiple HTTP GET requests with the "If Modified- Since" extension to validate the current contents of the cache (local storage space holding recently fetched files for immediate recall).
  • the server responds with a "304" response directing the client application to use the local copy in the cache. If the content is not the same, the server returns a fresh copy of the data.
  • the following text illustrates the verbose exchange required to retrieve a single external storage object using HTTP.
  • If-Modified-Since: Thu, 08 Jun 1998 20:24:56 GMT; length 741
  • HTTP/1.0 304 Use local copy Server Netscape-Enterprise/3.5. IC Date: Tue, 06 Apr 1999 14:12:24 GMT Link:
  • the present invention speeds the transmission and processing of data objects which incorporate other data objects by reference. More specifically, the present invention improves the performance of web servers, web caches and web browsers by repackaging existing HTML web page content for more efficient transport over the Internet using existing HTTP and TCP/IP facilities.
  • means are employed on the server-side of the HTTP link for packaging coherency information for a given data object, such as an HTML web page or an XML document, together with coherency information describing the state of entities referenced in that page or document, so that the combined coherency information is sent to the client as a single object in a single HTTP request-response exchange.
  • the received object is interpreted to avoid the needless transmission of further HTTP requests when valid copies ofreferenced entities already exist in the local cache.
  • means are employed on the server side for packaging the content of a given data object, such as an HTML web page or an XML document, together with content obtained from external resources referenced in that page or document, allowing the combined content to be transferred as a single object to the client.
  • a given data object such as an HTML web page or an XML document
  • the single received object is decomposed into its constituent parts which are may be rendered or processed without the need for further network transfers.
  • the client-side of an HTTP link may advantageously employ conventional web browsers, XML processors or other existing programs which are used in combination with an auxiliary program (e.g.
  • client side applications such as web browsers, may be modified to incorporate the functionality needed to directly request and handle the more concise combined objects contemplated by the invention.
  • means are employed at the server for processing data objects which incorporate other data objects by reference to create combined data objects for transmission to requesting clients.
  • a server-side program may be employed to process HTML web pages to create new combined data objects which include referenced data and which are requested by client side programs capable of processing those combined objects.
  • Each such combined object provides the coherency data and content required to render an entire web page. Because these combined documents need be created only once, they can be built and stored asynchronous with the client requests and do not require significant server-side CPU resources.
  • the principles of the invention may be applied to improve the performance of Dynamic HTML (DHTML) web pages, including both Active Server Pages (ASP) and pages generated by Common Gateway Interface (CGI) programs.
  • the invention may be used to implement a "delta cache" in which only the changed portions of modified programs or files need be sent from te server to the client, and for managing cache coherency by the use of unambiguous entity references.
  • the principles of the present invention may be applied to advantage to eliminate unnecessary network request-response exchanges when valid copies of information included by reference in a given web page or XML document is already present in the local cache at the client.
  • a web browser user clicks on a link to the URL "foo.htm” the browser issues an HTTP GET request for "foo.htm”.
  • the client side program intercepts the request and instead issues a request to the web server for a combined object named "oc_foo.htm.”
  • the object named "oc_foo.htm” may be produced by a server side program which combines foo.htm and other data objects which are to be included by reference in the rendered version offoo.htm.
  • the combined object "oc_foo.htm” contains coherency data for foo.htm and for the other objects referenced by foo.htm.
  • the client program receives coherency information on all of the included objects in a single message exchange, eliminating the need for further exchanges to determine whether valid copies of the referenced objects are already present in the cache.
  • object packing is employed to efficiently transport data objects between the ICDS client and the ICDS server.
  • each object required to render a web page must be individually requested by the browser and sent separately to the client by the web server; and each request is burdened by the overhead of the verbose HTTP protocol and latency of the Internet.
  • server-side routines may be executed to pre-processes the
  • HTML web page combining the web page HTML with the content of data objects referenced by HTML tags, to form a combined object (e.g; a single file having its own URL) which includes a directory of offsets to the individual files objects contained within the combined object.
  • the referenced objects included in the combined file may comprise image, applet or other HTML files specified in ⁇ OBJECT>, ⁇ IMG> , ⁇ APPLET>, ⁇ FRAME> or ⁇ IFRAME> tags.
  • the number of HTTP requests transmitted to the server is reduced, reducing the burden on the client, the server and on the network, and the cumulative delay caused by Internet latency is reduced since the number of Internet exchanges needed to display a given web page is reduced, regardless of whether or not that valid copies of that page and its referenced objects are present in the local cache.
  • HTTP 1.1 which permits the transfer of designated file ranges may be used to advantage.
  • the HTTP 1.1 protocol allows multiple designated ranges to be requested and transferred in a single request.
  • Additional logic on the client-side and the server-side may be employed to optimize web page content delivery based on the current connection speed between the web browser and web server. For example, different classes of clients may issue requests for objects specifically optimized for those devices. For example, an object ID value may be transferred with the request which has one the values listed below:
  • Web content may accordingly be pre-processed by the server-side routines which bind the constituent parts of web pages and referenced objects into combined objects that are optimized for particular client devices and which can be requested by these devices based on their connection speed and other criteria.
  • the optimization of the transport process is transparent to the web page designers who may focus on the graphical content of the web site independent of the delivery speed over a wide range of connection speeds
  • the same technique can be used for adding additional capabilities including automatic language translation based on the clients requested language preference.
  • DHTML server-side Dynamic HTML
  • Common applications for DHTML include customizing web pages to include current information (date/news/events) often driven by a database back-end.
  • DHTML is also commonly used to provide HTML page responses for search engines and e-commerce order processing.
  • a transparent mechanism may be employed to separate the static from the dynamic elements such that only the dynamic elements need be retrieved.
  • Active Server Pages extends HTML to include tags that are redirected by the web server to an ASP process to convert the ASP requests into the desired HTML code. The browser only sees the resultant HTML code, not the ASP calls.
  • Active Server Pages may be pre-processed to separate the active from the static elements on those pages. As a consequence, the server does not does not require an active process running on the web server to obtain the advantages of the invention. An example of the approach used is detailed below:
  • OC client intercepts original request and instead requests OC somefilel.ASP from the web server OC somefilel.asp contains coherency data for all objects including OC_Static_somefilel.asp )
  • OC client merges dynamic content returned from the server with static content from local cache to produce the dynamic HTML page to the browser. (Also marked as uncacheable to the browsers cache as it would have been in the original request.)
  • client side program responds to the original browser request for somefilel .asp and passes back the header information received from the server for OC Dynamic somefilel. asp
  • ASP Active Server Pages
  • CGI Common Gateway Interface
  • HTML implemented-using CGI HTML implemented-using CGI.
  • an active process running on the web server is employed to intercept the HTML stream. This process parses the outgoing HTML stream and optimizes the information for transport over the Internet.
  • all of the objects referenced by the CGI generated HTML page can be checked for coherency with a single request and all of the data objects referenced by the CGI-generated HTML page can also be transferred in response to a single request. There is no compromise of coherency, and the need for multiple coherency checks and data - transfers of the static elements referenced on the CGI-generated pages is eliminated. Implementation of a "Delta Cache"
  • client-side HTML code execution is that the client can do local processing and be more insulated from the web server/internet.
  • the problem is that, as the programs transmitted for execution on the client get larger, even small changes to the program file require the entire file to be resent to the client.
  • delta caching routines proceed as follows:
  • Browser requests foo.htm from web server 2.
  • a client routine requests OC_foo.htm from web server
  • the file oc_foo.htm contains coherency data for foo.htm and the objects referenced by foo.htm including the availability of delta objects.
  • a client routine determines that foo.htm or some other object referenced on the page and available in the client cache has changed 5.
  • a client routine requests a combined object with delta changes
  • a client routine returns whole object with the delta changes to the browser
  • a global object store may be employed to solve one of the fundamental problems inherent in the manner in which information is currently distributed over the Internet.
  • Theis problem stems from the ambiguous references which may be used by HTML to identify external entities which are to be included with the page. These ambiguous references require the browser to send additional requests to the server to determine if each file in the browser cache is the same as the file on the server. It should be noted that ambiguous references are a common problem that plagues web caches, wasting bandwidth by requiring continuous checking for newer version of each file on the web server.
  • ambiguous file references are converted into non- ambiguous references by including the file coherency information as an integral part of the file name. Take for example a web page that references two graphics file bannerl .gif and banner2.gif.
  • the file directory information shown above is automatically processed to rename the files as GOS_S980804122217_bannerl .gif and GOS_990515090713_banner2.gif respectively, all HTML references to these files are changed to use the new names, the files are tagged as expiring 100 years from the processing date. As a consequence, if the web browser or web cache locates the file, it is by definition coherent and no further checks are required. Marking the file as expiring in 100 years makes use of a built in capability of HTTP that has long been underutilized.
  • the accompanying Appendix contains source language listings of Java programs which implement some of the features of the invention as described above and which have been developed using the Visual Cafe Java development environment supplied by Symantec Corporation of Cupertino, CA.
  • the Java class listings for the client side application are presented first, followed by the classes for the server side application, and concluding with common classes shared by both.
  • setBounds (2, 0,298, 188) ; label4. setText ("Patents pending") ; borderPanell .add (label4) ; label .setBounds (20, 65, 156, 24) ; label3.setText ("All Rights Reserved”); borderPanell. add (label3) ; label3. setBounds (20, 45, 156,24); label2.setText ("Copyright (C) 1999 MTI”); borderPanell. add(label2) , label2. setBounds (21,30,156,20) ; label ⁇ . setText ( "Customer . " ) ; borderPanell .add (label5) ; label5.
  • setBounds (20,103,78,24) ; label6. setText ("Version: 2") ; borderPanell. add (label6) ; label6. setBounds (20, 125, 77, 19); label7. setText ("Build: "); borderPanell . add ( label7 ) ; label7. setBounds (20, 145, 48, 18); borderPanell. add (textFieldl) ; textFieldl. setBounds (96,105,173,20) ; buildlabel. setText ("0") ; borderPanell .add (buildlabel) ; buildlabel. setBounds (71, 145, 88, 15) ; buttonl.
  • Insets insets getlnsets(); setSize (insets . left + insets. right + d. width, insets. top + insets.bottom + d. height)
  • Point p components [I] .getLocation () ; p. translate (insets . left, insets.top) ; components [I] . setLocat ⁇ on(p) ; ⁇
  • Image logo getToolkit () .getlmage ( "Javalogo. pg") ; g.drawl age (logo, 15, 35, 65, 65, (ImageObserver) this) ;
  • SymWindow extends java .awt .event .WindowAdapter ⁇ public void WmdowClosing ( ava. wt. event .WindowEvent event) ⁇
  • Runtime rt Runtime. getRuntime () ; try ⁇ rt .exec ( "C: WProgram FilesWlnternet Explorer ⁇ Mexplore.exe http: //www. wwwhoosh. com”) ;
  • label3_text "All Rights Reserved” ⁇ , "label2_text”, “Copyright (C) 1999 MTI” ⁇ , “labell_text”, “WWWhoosh Proxy” ⁇ , “label5_text”, “Customer: “ ⁇ , “label6_text”, “Version: 001” ⁇ , 11 label7 text”, “Build: “ ⁇ ,
  • Point p components [i] .getLocation () ; p translate (getlnsets (). left, getlnsets () .top) ;
  • SymAction implements java.awt .event.ActionListener ⁇ public void actionPerformed (java.awt .event .ActionEvent event) ⁇
  • public class CommandHelpDialog extends Dialog ⁇ public CommandHelpDialog (Frame parent, boolean modal) ⁇ super (parent, modal);
  • setText Passthrough: forward all requests unmodified, no check cache” add (labell) ; labell. setFont (new Font ("Dialog”, Font. PLAIN, 12)); labell. setBounds (12, 42, 420, 36) ; label2. setText ("Debug trace: turns HTTP logging on/off”); add(label2) ; label2. setFont (new Font ("Dialog", Font. PLAIN, 12)); label2. setBounds (12, 72, 420, 36) ; label3. setText (“Loopback: responds to ALL requests with ⁇ "304 Not ModifiedV” add(label3) ; label3. setFon (new Font ("Dialog", Font. PLAIN, 12)); label3. setBounds (12,12,420,36) ; setTitle ("WWWhoosh commands");
  • SymWindow aSymWindow new SymWindow ( ) ; this .addW dowListener (aSymWindow) ;
  • SymAction lSymAction new SymAction (); okButton. addActionListener (lSymAction) ;
  • Point p components [i] . getLocat ⁇ on() ; p. translate (insets. left, insets .top) ; components [i] . setLocation(p) ;
  • SymWindow extends java.aw . event .WmdowAdapter ⁇ public void windowClosing (java . awt . event .WindowEvent event)
  • CommandHelpD ⁇ alog_WmdowClos ⁇ ng (event) ; ⁇ ⁇ void CommandHelpD ⁇ alog_W ⁇ ndowClosmg ( ava.awt. event . WindowEvent event) ⁇
  • CommandHelpD ⁇ alog_W ⁇ ndowClos ⁇ ng_Interact ⁇ onl (event)
  • void CommandHelpD ⁇ alog_W ⁇ ndowClos ⁇ ng_Interact ⁇ onl (java.awt .event .WindowEvent event) ⁇ try ⁇ th s .dispose () ;
  • _proxy parent; // This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual cafe may be unable to back // parse your Java file into its visual environment.
  • setBounds (215,271, 64,20) ; button3. setLabel ( "Apply” ) ; add(button3) ; button3. setFont (new Font ("Dialog", Font. PLAIN, 12)); button3. setBounds (279,271, 64,20) ; try ⁇ borderPanell. setBevelStyle (Symantec. ltools. awt. BorderPanel. BEVEL RAISED) ⁇ catch (java. beans PropertyVetoException e) ⁇ ⁇ try ⁇ borderPanell . setLabel (" Internet Connection "); ) catch (java. beans . PropertyVetoException e) ⁇ ⁇ try ⁇ borderPanell setAlignStyle (Symantec.
  • setText ( "127.0.0.1”); borderPanell . add (addressText) ; addressText. setBounds (102, 45, 112, 20) ; borderPanell. add (portText) ; portText. setBounds (264, 45, 52, 20) ; label2. setText (" Address:”); borderPanell. add (label2) ; label2. setFont (new Font ("Dialog", Font. PLAIN, 12)); label2. setBounds (47, 41,56,24) ; label3. setText ( "Port : “ ) ; borderPanell. add (label3) ; label3. setBounds (227, 5, 36, 20) ; try ⁇
  • Insets msets getlnsets (); setSize (msets. left + msets. right + d. idth, sets. top + insets. ottom + d. height)
  • Point p components [I] .getLocation () ; p.translate ( sets . left, msets .top) ; components [l] . setLocatio (p) ; ⁇
  • SymWindow extends java.awt .event . indowAdapter ( public void windowClosed(java. awt. event .WindowEvent event)
  • ConnectionDialog_WindowClosing (event) ; ⁇ ⁇ void ConnectionDialog_WindowClosing (java.awt. event .WindowEvent event) ⁇
  • ConnectionDialog_WindowClosing_Interactionl (event) ; ⁇ void ConnectionDialog_WindowClosing_Interactionl (java.awt. event .WindowEvent event) ⁇ try ⁇ this. dispose () ;
  • SymComponent extends java. awt. event.
  • ComponentAdapter public void ComponentShown (java.awt .event .ComponentEvent event) ⁇
  • ConnectionDialog_ComponentShown (event) ; ⁇ ⁇ void ConnectionDialog_ComponentShown (j ava . awt . event . ComponentEvent event) ⁇
  • ConnectionDialog_WindowOpened (java . awt . event . WindowEvent event) ⁇ listenportText . setText (new Intege (Debug. listenPort) .toStringf) ) ; proxycheck. setState (Debug.useProxy) ;
  • setBounds 113, 114, 64,20
  • button2. setLabel (“Cancel") ; add(button2) ; button2. setFont (new Font ("Dialog”, Font. PLAIN, 12)); button2. setBounds (178, 114, 64,20); button3. setLabel ( "Apply” ) ; add(button3) ; button3. setFont (new Font ("Dialog", Font. PLAIN, 12)); button3.setBounds(242,114, 64,20) ; try ⁇ borderPanell . setBevelStyle ( Symantec. itools . awt . BorderPanel . BEVEL_RAISED) ⁇ catch (java.beans .
  • Insets insets getlnsets () ; setSize ( sets. left + sets. right + d.width, msets. top + sets. ottom + d. eight)
  • Point p components [l] . getLocation () ; p. translate (insets. left, insets. top) ; components [I] . setLocation (p) ; ⁇
  • Rectangle bounds getParent (). getBounds () ,
  • Rectangle abounds getBounds (); setLocation (bounds .x + (bounds .width - abounds. idth) / 2, bounds . y + (bounds.height - abounds .height) /2) ; ⁇ super. setVisible (b) ; ⁇
  • SymWindow extends java.awt .event .WindowAdapter ⁇ public void windowClosed( java.awt .event .WindowEvent event) ⁇
  • statsthreadCheckbox setState ( Debug. connKeepAlive ); forceGetCheckbox. setState ( Debug. forceHTMLbaseGET );
  • Insets msets getlnsets () ; setSize ( sets . left + sets. right + d. width, insets. top + msets .bottom + d. height)
  • class SymAction implements java.awt .event .
  • ActionListener public void actionPerformed (java. awt. event .ActionEvent event) ⁇
  • buttonl_ActionPerformed_Interactionl (event) ; ⁇ void buttonl_ActionPerformed_Interactionl (java. awt .event .ActionEvent event) ⁇ try ⁇
  • timingcheck add (timingcheck) ; timingcheck. setFont (new Font ("Dialog”, Font. PLAIN, 12)); timingcheck. setBounds (5, 108, 308, 20) ; headerscheck. setLabel ("Print HTTP Headers”); borderPanell . add (headerscheck) ; headerscheck. setFont (new Font ("Dialog", Font. PLAIN, 12)); headerscheck. setBounds (5, 68, 318, 20); logiccheck. setLabel ("Trace Cache Logic FLow") ; borderPanell. ad (logiccheck) ; logiccheck. setFont (new Font ("Dialog", Font. PLAIN, 12)), logiccheck. setBounds (5,88, 272,20) ; getscheck.
  • setLabel "HTTP Request and Response Status Lines" ; borderPanell . dd (getscheck) ; getscheck. setFont (new Font ("Dialog", Font. PLAIN, 12)); getscheck. setBounds (5,28, 312,20) ; fullpathCheckbox. setLabel ("Display Full Pathnames”) ; borderPanell . add (fullpathCheckbox) ; fullpathCheckbox. setFont (new Font ("Dialog", Font. PLAIN, 12)); fullpathCheckbox. setBounds (5, 48, 186, 20); checkboxl . setLabel ( "Show Exceptions”) ; borderPanell. dd (checkboxl) ; checkboxl.
  • setFont new Font ("Dialog", Font. PLAIN, 12)
  • checkboxl setBounds (5, 8, 316, 20)
  • buttonl setLabel ( "OK")
  • add buttonl
  • buttonl setFont (new Font ( "Dialog", Font. PLAIN, 12));
  • Insets sets getlnsets (); setSize ( sets . left + msets. ight + d. width, sets. top + sets. bottom + d. height)
  • Point p components [I] .getLocation () ; p. translate ( sets . left, msets. top) ; components [I] . setLocation (p) ; ⁇
  • Rectangle bounds getParent () .getBounds ()
  • Rectangle abounds getBounds () ; setLocation (bounds. + (bounds .width - abounds. width) / 2, bounds . y + (bounds .height - abounds .height) /2) ,
  • SymWindow extends ava.awt. event .WindowAdapter ⁇ public void WindowClosed (java.awt . event .WindowEvent event) ⁇
  • SymComponent extends java. awt . event.
  • ComponentAdapter public void ComponentShown ( ava . awt . event .
  • LogLevelD ⁇ alog_WmdowOpened (java . awt . event . indowEvent event) ⁇ getscheck. setState ( Debug. LogGETs) ; logiccheck. setState ( Debug. LogCache) ; headerscheck. setState ( Debug. LogHeaders) ; timingcheck. setState ( Debug. ogTiming) ; fullpathCheckbox. setState (Debug. COMPRESS) ; ⁇ void button2_Act ⁇ onPerforme (java.awt . event.ActionEvent event) ⁇ try ⁇ this .dispose ( ) ; ⁇ catch (Exception e) ⁇
  • COMPRESS fullpathCheckbox. getState () ;
  • buttons2_label "Cancel” ⁇ , ["button3_label”, “Apply” ⁇ ,
  • _ocdr ocdr
  • BorderPanel import Symantec. itools .awt . ImageButton;******************* * *** *** PROXY GUI *** * ** ** * * * * ** *** ****** * * **** ** **/
  • borderPanellO add (borderPanel2 ) ; borderPanel2.setBackground (java. awt. Color. black) ; borderPanel2.setBounds(142,4,136, 140) ; labelll . setText ( "Bytes Saved” ) ; borderPanel2.add(labelll) ; labelll .setForeground)java. awt .Color .green) ; labelll. setFont (new Font ("Dialog", Font. PLAIN, 14)); labelll. setBounds (2, 7, 96,24) ; BwPctLabel. setText ("0 %"); borderPanel2.add(BwPctLabel) ;
  • BwPctLabel setForeground (java.awt .Color. green) ; BwPctLabel. setFont (new Font ("Dialog", Font. PLAIN, 20)); BwPctLabel. setBounds (2,32, 112,24) ; labell2. setText ("Packets Saved") ; borderPanel2.add(labell2) ; label1 . setForeground (java. awt. Color. green) ; labell2. setFont (new Font ("Dialog", Font. PLAIN, 14)); labell2. setBounds (2, 68,99,21) ; ReqPctLabel. setText ("0 %”); borderPanel . add (ReqPctLabel ) ;
  • ReqPctLabel setForeground (java.awt .Color .green) ; ReqPctLabel. setFont (new Font ("Dialog", Font. PLAIN, 20)); ReqPctLabel. setBounds (2, 92, 112,24) ; try ⁇ borderPanel5. setBevelStyle (Symantec . itools . awt . BorderPanel . BEVEL_NONE) ; catch (java. beans. PropertyVetoException e) ⁇ ⁇ borderPanel5. setLayout (null ) ; borderPanellO. add (borderPanel5) ;
  • setBounds (-1, 32, 112, 24) ; labell4.setText ("Load Time "); borderPanel5.add(labell4) ; labell4. setForeground ( ava.awt. Color. green) ; labell .setFont (new Font ("Dialog", Font. PLAIN, 14)); labell4. setBounds (0,7, 108, 24) , try ⁇ borderPanel7. setBevelStyle (Symantec. ltools .awt . BorderPanel .BEVEL_RAISED) ; ⁇ catch (java.beans .
  • setBackgroun new java.awt .Color (128, 0, 64)
  • borderPanel ⁇ setBounds (6, 80,124, 40)
  • setBevelStyle S ymantec. itools. awt. BorderPanel. BEVEL_RAISED
  • ConnectionMenuIte SetLabel ("Connection Options") ;
  • addActionListener (lSymAction) ; button ⁇ . addActionListener (lSymAction) ; ConnectionMenuItem. addActionListener (lSymAction) ; button7.addActionListener (lSymAction) ; button8.addActionListener (lSymAction) ; button9.addActionListener (lSymAction) ; menulteml . addActionListener (lSymAction) ; menultem2. addActionListener (lSymAction) ; menultem4. addActionListener (lSymAction) ; // ⁇ try ⁇
  • FileOutputStream bid new FileOutputStream( "ClientBuild. java") ;
  • ProxyGUI ySvr new ProxyGUI () ; mySvr .setVisible (true) ; ySv . imt ( ) ;
  • Framel_WmdowClosmg (event) ; ⁇ ⁇ void Framel_W ⁇ ndowClosmg (java.awt .event .WindowEvent event) ⁇
  • class SymAction implements ava. awt. event .ActionListener ⁇ public void actionPerformed ( java . awt. event. ActionEvent event) ⁇
  • buttons3. setBackground (new Color (102, 153, 153) ) ; Debug. PASSTHRU false; ⁇ ⁇ void buttonl_ActionPerformed (java.awt . event .ActionEvent event) ⁇
  • buttonl_ActionPerformed_Interactionl (event) ; ⁇ void button2_ActionPerformed (java.awt . event .ActionEvent event) ⁇ if (Counters .getLoopbac 0 ) ⁇ Counters . setLoopback( false) ; button2. setBackground (Color. lightGray) ; ⁇ else ⁇
  • BwPctLabel setText ("0 "); loadTimeLabel. setText ( "0 s” ); ReqPctLabel. setText ("0 %”); ⁇ void aboutM ⁇ nuItem_Act ⁇ onPerformed_Interact ⁇ onl (java. awt .event .ActionEvent event) ⁇ try ⁇
  • button9_ActionPerformed Interactionl (event) ; ⁇ void button9_ActionPerformed_Interactionl (java. awt. event.ActionEvent event)
  • buttons6_label “File out: OFF” ⁇ , “button7_label” , “WWWhoosh2: ON” ⁇ , “button8_label” , “Reset Caches” ⁇ , “button9 label” , “Statistics” ⁇ , “ProxyGUI_t ⁇ tle”, “WWWhoosh Proxy” ⁇ , “menul_label”, “File” ⁇ , “newMenuItem_label”, “New” ⁇ , “openMenuItem_label”, “Open...
  • setBounds (7,6, 239, 95) ; labell setTextC'Do you really want to exit?"); labell . setAlignment (java . awt . Label . CENTER) ; borderPanell. add (labell) ; labell. setBounds (22, 6, 168, 23) ; noButton setLabel (" No ") ; add(noButton) ; noButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); noButton. setBounds (170, 101, 64,20) ; yesButton. setLabel (" Yes ") ; add(yesButton) ; yesButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); yesButton. setBounds (104, 101, 64,20) ; setTitle ("Exit WWWhoosh Client"); // ⁇
  • SymWindow extends ava. awt. event .WindowAdapter ⁇ public void windowClosing (java. awt. event. indowEvent event) ⁇
  • setBounds (7, 12, 359, 143) ; RTmsLabel . setText ( "000” ) ; borderPanell. add (RTmsLabel) ; RTmsLabel. setBounds (300,20, 72, 16) ; labell . setText ( "HTTP Requests : " ) , borderPanell. dd (labell) ;
  • setBounds (130, 19,72,16) ; getsOutLabel . setText ( "000” ) ; borderPanell .add (getsOutLabel) ; getsOutLabel. setBounds (130, 34, 72, 16) ; label3. setText ("GET ms:”); borderPanell .add (label3) ; label3. setFont (new Font ("Dialog", Font. PLAIN, 12)); label3. setBounds (213, 20, 84, 16) ; bytesSentLabel. setText ("000") ; borderPanell .add (bytesSentLabel) ; bytesSentLabel.
  • setBounds 300,35,72,16 ; bytesRxLabel. setText ("000") ; borderPanell . add (bytesRxLabel ) ; bytesRxLabel. setBounds (130, 64, 72, 16) ; label . setText ( "Bytes Sent : " ) ; borderPanell. add (label4) ; label4. setFont (new Font ("Dialog", Font. PLAIN, 12)); label . setBounds (213,35, 84, 16) ; label5. setText ("Bytes Received: ”) ; borderPanell . add (label5 ) ; label5. setFont (new Font ("Dialog", Font.
  • ACKLabel setBounds (130,49,72,16); eventElapsedLabel. setText ("000") ; borderPanell . add (eventElapsedLabel) ; eventElapsedLabel. setBounds (130, 80, 74, 15) ; label ⁇ . setText ("WWWhoosh-2 read: ”) ; borderPanell . add (label 6 ) ; label6. setBounds (213,64,83,17) ;
  • SymWindow aSymWindow new SymWindow ( ) ; this . addWindowListener (aSymWindow) ;
  • SymAction lSymAction new SymAction () ; buttonl . addActionListener (lSymAction) ; button2. addActionListener (lSymAction) ;
  • Insets insets getlnsets 0 ; setSize ( sets. left + msets. right + d. width, sets. top + insets. bottom + d. height)
  • RTmsLabel (new Long (Counters .GET s 0 ) ). toString 0 ); ⁇ class SymWindow extends java . awt . event .WindowAdapter ⁇ public void windowClosing (java . awt . event .WindowEvent event) ⁇
  • StatsFrame_W ⁇ ndowClosmg (event) ; ⁇ ⁇ void StatsFrame_W ⁇ ndowClosmg (java.awt .event .WindowEvent event) ⁇ setVisible (false) ; // hide the Frame ⁇ class SymAction implements java.awt .event .ActionListener ⁇ public void actionPerformed (java . awt .event .ActionEvent event) ⁇
  • buttonl_Act ⁇ onPerformed_Interact ⁇ onl (event) ; ⁇ void buttonl_ActlonPerformed_Interact ⁇ onl ( java . awt . event . ActionEvent event)
  • setFont new Font ("Dialog”, Font. PLAIN, 12)); labell. setBounds (12, 40, 420,36) ; label2. setText ("304s back: counts GET requests satisfied via proxy "); add(label2) ; label2. setFont (new Font ("Dialog”, Font. PLAIN, 12)); label2. setBounds ( 12, 68, 20, 36) ; label3. setText ("GETs in: counts HTTP GET requests from browser”); add(label3) ; label3. setFont (new Font ("Dialog”, Font. PLAIN, 12)); label3.setBounds(12,12, 420,36) ; setTitle ("ICCS statistics");
  • SymWindow aSymWindow new SymWindow ( ) ; this . addWindowListene (aSymWindow) ;
  • SymAction lSymAction new SymAction () ; okButton. addActionListener (lSymAction) ;
  • Insets insets getlnsetsO; setSize (insets . left + insets. right + d. width, insets. top + insets .bottom + d. height),
  • Point p components [i] . getLocation () ; p. translate (insets. left, insets .top) ; components [i] . setLocation (p) ; ⁇
  • SymWindow extends java.awt .event .WindowAdapter
  • StatsHelpDialog_WindowClosing (event) ; ⁇ ⁇ void StatsHelpDialog_WindowClosing (java.awt. event .WindowEvent event) ⁇
  • StatsHelpDialog_WindowClosing_Interactionl (event) ; ⁇ void StatsHelpDialog_WindowClosing_Interact ⁇ onl (java. awt . event. indowEvent event) ⁇ try ⁇ this. dispose 0 ;
  • setFont new Font ("Dialog”, Font. PLAIN, 12)); labell. setBounds (12,40, 420,36) ; label2. setText ("304s back: counts GET requests satisfied via proxy "); add(label2) ; label2 setFont (new Font ("Dialog”, Font. PLAIN, 12)); label2. setBounds (12, 68, 420,36) ; label3 setText ("GETs in: counts HTTP GET requests from browser") ; add(label3) ; label3. setFont (new Font ("Dialog", Font. PLAIN, 12)); label3. setBounds (12, 12, 420, 36) ; setTitle ("ICCS statistics");
  • SymWindow aSymW dow new SymWindow ( ) ; this.addWindowListener (aSymW dow) ;
  • Insets msets getlnsetsO, setSize (insets. left + msets. right + d. idth, sets . top + sets .bottom + d. height)
  • Point p components [l] .getLocation () , p. translate (msets. left, insets. top) , components [I] . setLocation (p) , ⁇
  • StatsHelpDialog_WindowClosing (event) ; ⁇ ⁇ void StatsHelpDialog_Wind ⁇ wClosin (java.awt. event .WindowEvent event) ⁇
  • StatsHelpDialog_WindowClosing_Interactionl (event) ; ⁇ void StatsHelpDialog_WindowClosing_Interactionl (java. awt . event .WindowEvent event) ⁇ try ⁇ this. dispose () ;
  • setText ("Patents Pending") ; borderPanell .add (label4) ; label4.setBounds (26, 78, 156, 24) ; label3. setText ("All Rights Reserved”); borderPanell. add (label3) ; label3. setBounds (26, 60,156,24) ; label2. setTex (“Copyright (C) 1999 MTI”); borderPanell . add ( label2 ) , • label2. setBounds (26, 36, 156, 24) ; label5. setText ("Customer:”) ; borderPanell. add (label5) ; label5. setBounds (26, 116,78,20); label6.
  • SymWindow aSymWmdow new SymWindow ( ) ; this.addWmdowListener (aSymWindow) ;
  • SymAction lSymAction new SymAction () ; okButton. addActionListener (lSymAction) ; buttonl . addActionListener (lSymAction) ;
  • Insets insets getlnsetsO; setSize (insets. left + sets. right + d. width, insets. top + insets .bottom + d.height)
  • SymWindow extends java.awt . event .WindowAdapter ⁇ public void windowClosing (java.awt . event .WindowEvent event) ⁇
  • AboutServerDialog_WindowClosing_Interactionl (event) ; ⁇ void AboutServerDialog_WindowClosmg_Interactionl (java . awt . event .WindowEvent event) ⁇ try ⁇ this .dispose ( ) ;
  • the Config class is responsible for governing the runtime operation of the Optimizer

Abstract

A system for increasing the speed of transmission and processing of hypertext data objects, such as HTML web pages and XML documents, that incorporate external data objects by reference, by repackaging existing HTML and XML content and coherency information for more efficient transport over the Internet using existing HTTP and TCP/IP facilities. At the server side of an HTTP link, the content of a hypertext data object is repackaged and renamed as a compound data object which includes data and/or coherency information for imbedded data objects whose URLs are specified in the hypertext object. On the client side, the received compound object is interpreted to avoid the needless transmission of further HTTP requests when valid copies of referenced entities already exist in the local cache, and to obtain the content of the hypertext data object as well as the content of one or more referenced objects in a single request-response interchange. The Appendix contains a Java code implementation of some of the features disclosed.

Description

PCT Patent Specification
Title: Methods and Apparatus for
Storing, Retrieving and Manipulating Hypertext Data
Applicant: WWWhoosh, Inc. 160 Old Maple Street Stoughton, MA 02072 U.S.A.
Inventor: Clinton Brenton Battersby 64 Laurelwood Dr. Stoughton, MA 02072 U.S.A.
Technical Field
This invention relates to hypertext communication systems and more particularly to methods and apparatus for speeding the transmission of data objects which incorporate other data objects by reference.
Background Art
The present invention may be used to advantage to more rapidly transmit the information needed for displaying web pages expressed in Hypertext Markup Language (HTML) by means of the Hypertext Transfer Protocol (HTTP). The principles of the invention may also be employed for displaying or processing other forms of information, such as data expressed in SGML and XML which, like HTML, employ data objects which incorporate information found in separate resources which are specified by an suitable identifier, such as an Internet URL, and retrieved using the a suitable request-response network communications protocol, such as the conventional HTTP / TCP-IP transmission mechanism used by the Internet World Wide Web facility.
HTML and XML HTML, in its preferred forms, as been defined in specifications which have continued to evolve to meet needs of users and developers. HTML 2.0 was developed under the aegis of the Internet Engineering Task Force (IETF) to codify common practice in late 1994 and is described in RFC 1866 (November, 1995). The efforts of the World Wide Web Consortium's HTML Working Group to codify common practice in 1996 resulted in HTML 3.2 (January 1997). HTML 4.0, the latest version of which is available at the URL http://www.w3.org/TR/html40, extends HTML with mechanisms for style sheets, scripting, frames, embedding objects, and other enhancements. HTML's multimedia features allow authors to include images, applets (programs that are automatically downloaded and run on the user' s machine), video clips, and other HTML documents in their pages. Commonly, in order to completely render a web page (i.e, to display all of the referenced text and images, as well as to play referenced sound and/or video files), it is necessary for the web browser program to scan the HTML text, identify the references to included resources that need to be fetched, and issue a sequence of separate requests using the Hypertext Transfer Protocol (HTTP) to obtain a current copy of each additional item ofreferenced data. The Extensible Markup Language (XML) is a subset of SGML which was designed to enable generic SGML to be served, received, and processed on the Web in the way that was previously possible with HTML. An XML document, as specified in the World Wide Web Consortium' s Recommendation entitled "Extensible Markup Language (XML) 1.0" (February, 1998), may consist of one or many storage units called entities; all of which have content and which are typically identified by name. Each XML document has one entity called the document entity, which serves as the starting point for the XML processor and may contain the whole document. The XML specification permits an XML document to refer to one or more external entities by an appropriate identifier (URI) so that the content of the external entity referred to may be incorporated into the XML document. Thus, like an HTML web page, the validation or processing of an XML document may require multiple HTTP request/response exchanges to assemble the entire document.
HTTP and Caching
Versions 1.0 and 1.1 of the Hypertext Transfer Protocol (HTTP) are defined and described by theTnternet Engineering Task Force (IETF) Request for Comment (RFC) 1945 by T. Berners-Lee, R. Fielding and H. Frystyk entitled "Hypertext Transfer Protocol ~ HTTP/1.0", May, 1996 and in RFC 2068 by R. Fielding, J. Gettys, J. C. Mogul, H. Frystyk and T. Berners-Lee entitled "Hypertext Transfer Protocol ~ HTTP/1.1 ", January, 1997. Significant work has been done at the IETF as the HTTP protocol has evolved over the last 5 years from V1.0 to Vl.l recently adopted as the new standard. HTTP 1.1 has incorporated a number of enhancements to improve browser to web server and browser to web cache performance. The standard has historically and will continue to evolve at a necessarily slow pace to accommodate the millions of devices using the protocols to guarantee a smooth integration of the new capabilities. As noted above, HTML pages and XML documents often reference one or more external entities which are separate physical storage objects and which much be fetched via the communications network in order to render or process the entire page or document. Because these external objects are frequently re-used by client applications, caching may be used to advantage. Historically, web browsers send multiple HTTP GET requests with the "If Modified- Since" extension to validate the current contents of the cache (local storage space holding recently fetched files for immediate recall). If the object in the local cache is still valid, the server responds with a "304" response directing the client application to use the local copy in the cache. If the content is not the same, the server returns a fresh copy of the data. The following text illustrates the verbose exchange required to retrieve a single external storage object using HTTP.
<Request>
GET http: //www. ups . com/images/nav/global/ua_upslogo_globalnav. gif
HTTP/1.1 Accept: */*
Referer: http://www.ups.com/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
If-Modified-Since: Thu, 08 Jun 1998 20:24:56 GMT; length=741 User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
Host: www.ups.com
Proxy-Connection: Keep-Alive
Pragma: No-Cache
Extension : Security/Remote-Passphrase <Response>
HTTP/1.0 304 Use local copy Server: Netscape-Enterprise/3.5. IC Date: Tue, 06 Apr 1999 14:12:24 GMT Link:
<http: //www. ups . com/images/nav/global/ua_upslogo_globalnav. gif" PageServices>; rel="PageServices" Connection: close
This lengthy exchange must be repeated for each object on the HTML page, even when those external files are already available on the local cache.
Description of the Best Mode
The present invention speeds the transmission and processing of data objects which incorporate other data objects by reference. More specifically, the present invention improves the performance of web servers, web caches and web browsers by repackaging existing HTML web page content for more efficient transport over the Internet using existing HTTP and TCP/IP facilities.
As contemplated by a first aspect of the present invention, means are employed on the server-side of the HTTP link for packaging coherency information for a given data object, such as an HTML web page or an XML document, together with coherency information describing the state of entities referenced in that page or document, so that the combined coherency information is sent to the client as a single object in a single HTTP request-response exchange. On the client side, the received object is interpreted to avoid the needless transmission of further HTTP requests when valid copies ofreferenced entities already exist in the local cache.
In accordance with another feature of the invention, means are employed on the server side for packaging the content of a given data object, such as an HTML web page or an XML document, together with content obtained from external resources referenced in that page or document, allowing the combined content to be transferred as a single object to the client. On the client side, the single received object is decomposed into its constituent parts which are may be rendered or processed without the need for further network transfers. As contemplated by the invention, the client-side of an HTTP link may advantageously employ conventional web browsers, XML processors or other existing programs which are used in combination with an auxiliary program (e.g. a plug-in, helper, or proxy program) which acts as a transport layer between the HTTP interface and the application program, capturing and converting outbound HTTP requests from the application program into requests for more concise objects, and for intercepting the incoming concise objects which are supplied by the server and translating them into the multiple data objects originally requested by the application program. Alternatively, client side applications, such as web browsers, may be modified to incorporate the functionality needed to directly request and handle the more concise combined objects contemplated by the invention.
In accordance with another aspect of the invention, means are employed at the server for processing data objects which incorporate other data objects by reference to create combined data objects for transmission to requesting clients. For example, a server-side program may be employed to process HTML web pages to create new combined data objects which include referenced data and which are requested by client side programs capable of processing those combined objects. Each such combined object provides the coherency data and content required to render an entire web page. Because these combined documents need be created only once, they can be built and stored asynchronous with the client requests and do not require significant server-side CPU resources. In accordance with still further features of the invention, described in more detail below, the principles of the invention may be applied to improve the performance of Dynamic HTML (DHTML) web pages, including both Active Server Pages (ASP) and pages generated by Common Gateway Interface (CGI) programs. In addition, the invention may be used to implement a "delta cache" in which only the changed portions of modified programs or files need be sent from te server to the client, and for managing cache coherency by the use of unambiguous entity references.
These and other objects, features and advantages of the invention may be more fully understood through a consideration of the following detailed description.
Detailed Description
Minimizing Cache Coherency Traffic
The principles of the present invention may be applied to advantage to eliminate unnecessary network request-response exchanges when valid copies of information included by reference in a given web page or XML document is already present in the local cache at the client. By way of example, if a web browser user clicks on a link to the URL "foo.htm", the browser issues an HTTP GET request for "foo.htm". Before the request is sent to the server, however, the client side program intercepts the request and instead issues a request to the web server for a combined object named "oc_foo.htm." The object named "oc_foo.htm" may be produced by a server side program which combines foo.htm and other data objects which are to be included by reference in the rendered version offoo.htm. The combined object "oc_foo.htm" contains coherency data for foo.htm and for the other objects referenced by foo.htm. As a consequence, the client program receives coherency information on all of the included objects in a single message exchange, eliminating the need for further exchanges to determine whether valid copies of the referenced objects are already present in the cache.
Increasing Efficiency by Combining Content According to a further feature of the invention, object packing is employed to efficiently transport data objects between the ICDS client and the ICDS server. Under conventional practice, each object required to render a web page must be individually requested by the browser and sent separately to the client by the web server; and each request is burdened by the overhead of the verbose HTTP protocol and latency of the Internet. As contemplated by the invention, server-side routines may be executed to pre-processes the
HTML web page, combining the web page HTML with the content of data objects referenced by HTML tags, to form a combined object (e.g; a single file having its own URL) which includes a directory of offsets to the individual files objects contained within the combined object. The referenced objects included in the combined file may comprise image, applet or other HTML files specified in <OBJECT>, <IMG> , <APPLET>, <FRAME> or <IFRAME> tags.
There are a number of benefits in the combined packaging of content and coherency information as contemplated by the invention: the number of HTTP requests transmitted to the server is reduced, reducing the burden on the client, the server and on the network, and the cumulative delay caused by Internet latency is reduced since the number of Internet exchanges needed to display a given web page is reduced, regardless of whether or not that valid copies of that page and its referenced objects are present in the local cache.
If the browser already has some or many of the objects in the local cache, it would be a waste of time and bandwidth to transfer the entire combined object to get the required objects. In accordance with another feature of the invention, a feature of HTTP 1.1 which permits the transfer of designated file ranges may be used to advantage. The HTTP 1.1 protocol allows multiple designated ranges to be requested and transferred in a single request. As a consequence, when a combined coherency check indicates that the local cache can satisfy some, but not all of the individual object requests, the objects which are still needed can be compiled into a compound request for objects not in the local cache.
It should also be noted that the combined objects created in accordance with this invention may be transmitted in a sequence of blocks sized to optimize network performance. Optimization
Additional logic on the client-side and the server-side may be employed to optimize web page content delivery based on the current connection speed between the web browser and web server. For example, different classes of clients may issue requests for objects specifically optimized for those devices. For example, an object ID value may be transferred with the request which has one the values listed below:
OCD_ - ICDS-2 Meta Object (No optimization)
OCD14_ - Optimized for 14.4 connections
OCD28_ - Optimized for 28.8 connections OCD56_ - Optimized for 56K connections
OCDTl_ - Optimized for high speed Tl connections
OCDTV_ - Optimized for Web TV Delivery
OCDPDA_ - Optimized for PDA / Cell browsing
Web content may accordingly be pre-processed by the server-side routines which bind the constituent parts of web pages and referenced objects into combined objects that are optimized for particular client devices and which can be requested by these devices based on their connection speed and other criteria. The optimization of the transport process is transparent to the web page designers who may focus on the graphical content of the web site independent of the delivery speed over a wide range of connection speeds The same technique can be used for adding additional capabilities including automatic language translation based on the clients requested language preference.
Dynamic Web Content
There are a number of technologies collectively called server-side Dynamic HTML (DHTML) that provide facilities for dynamic rather than static responses to a browser request. Common applications for DHTML include customizing web pages to include current information (date/news/events) often driven by a database back-end. DHTML is also commonly used to provide HTML page responses for search engines and e-commerce order processing.
In many applications only a small percentage of the DHTML generated by the server changes but the entire page must be retransmitted. (By definition, Dynamic HTML pages are not given modified dates and cannot be cached.) As contemplated by a further feature of the invention, a transparent mechanism may be employed to separate the static from the dynamic elements such that only the dynamic elements need be retrieved.
Active Server Pages (ASP) One popular type of Dynamic HTML, introduced by Microsoft, takes the form of
Active Server Pages (ASP). ASP extends HTML to include tags that are redirected by the web server to an ASP process to convert the ASP requests into the desired HTML code. The browser only sees the resultant HTML code, not the ASP calls. As contemplated by the invention, Active Server Pages may be pre-processed to separate the active from the static elements on those pages. As a consequence, the server does not does not require an active process running on the web server to obtain the advantages of the invention. An example of the approach used is detailed below:
On the ASP server side: 1. A server program processes a static distribution of somefilel .ASP Create
OC somefilel.asp including the last modified date of any other objects used to render the page.
2. Create OC_Static_somefile 1.asp with #lnclude_001 , #Include_002 tags to replace the ASP calls.
Static Html Static Html <!-- #Include_001~> 30 Static HTML Static HTML <!-- #Include_002-> Static HTML Static HTML
3. Create OC Dynamic somefilel .asp file with identifying tags and the ASP calls
<!-- #Include_001 Start-> ASP CODE ASP CODE 10 ASP CODE
<!-- #Include_001 End->
<!-- #Include_002 Start-> ASP CODE 15 ASP CODE ASP CODE <!-- #Include_002 End->
On the client side:
1. Browser requests somefilel .asp (No modified date because it was uncacheable)
2. OC client intercepts original request and instead requests OC somefilel.ASP from the web server OC somefilel.asp contains coherency data for all objects including OC_Static_somefilel.asp )
3. If OC Static somefile 1.asp not in cache or not current, get
OC_Static_somefilel .asp
4. Request OC Dynamic somefilel .asp from server (Never in local cache)
5. OC client merges dynamic content returned from the server with static content from local cache to produce the dynamic HTML page to the browser. (Also marked as uncacheable to the browsers cache as it would have been in the original request.)
6. Note that the client side program responds to the original browser request for somefilel .asp and passes back the header information received from the server for OC Dynamic somefilel. asp
The use of the invention in connection with Active Server Pages (ASP) reduces the majority of the bytes necessary to refresh an ASP page because only the dynamic portions are actually transmitted between the server and the browser. There is no compromise of coherency. The redundant transfer of the static elements on ASP pages is eliminated, and no active process is required on the web server.
CGI Based Dynamic HTML An earlier and still popular method for creating dynamic HTML pages is to use the
Common Gateway Interface (CGI). CGI provides a standard way to execute programs on the web server to generate dynamic HTML code. CGI is very different from ASP because 1) the web server does not have access to the CGI application source code and 2) there are no standards for the actual code being run using the CGI interface. Nonetheless, the present invention can be used to advantage in connection with dynamic
HTML implemented-using CGI. To do so, an active process running on the web server is employed to intercept the HTML stream. This process parses the outgoing HTML stream and optimizes the information for transport over the Internet. By using the invention in connection with CGI processing, all of the objects referenced by the CGI generated HTML page can be checked for coherency with a single request and all of the data objects referenced by the CGI-generated HTML page can also be transferred in response to a single request. There is no compromise of coherency, and the need for multiple coherency checks and data - transfers of the static elements referenced on the CGI-generated pages is eliminated. Implementation of a "Delta Cache"
Problems that can occur when more functionality is pushed down to the browser using client-side dynamic HTML. The advantage of client-side HTML code execution is that the client can do local processing and be more insulated from the web server/internet. The problem is that, as the programs transmitted for execution on the client get larger, even small changes to the program file require the entire file to be resent to the client.
As contemplated by the invention, this problem may be addressed by allowing the client to request the changes to a file instead of the entire file. On the server side, routines are provided which enable the server to identify those objects which may benefit significantly from using a delta cache, and "delta object" are only generated when a significant benefit (say, greater than a 70% saving) may be expected. On the client side, delta caching routines proceed as follows:
1. Browser requests foo.htm from web server 2. A client routine requests OC_foo.htm from web server
3. The file oc_foo.htm, contains coherency data for foo.htm and the objects referenced by foo.htm including the availability of delta objects.
4. A client routine determines that foo.htm or some other object referenced on the page and available in the client cache has changed 5. A client routine requests a combined object with delta changes
6. A client routine returns whole object with the delta changes to the browser
7. And the process is repeated for the other objects.
A Global Object Store
As contemplated by still another feature of the invention, a global object store may be employed to solve one of the fundamental problems inherent in the manner in which information is currently distributed over the Internet. Theis problem stems from the ambiguous references which may be used by HTML to identify external entities which are to be included with the page. These ambiguous references require the browser to send additional requests to the server to determine if each file in the browser cache is the same as the file on the server. It should be noted that ambiguous references are a common problem that plagues web caches, wasting bandwidth by requiring continuous checking for newer version of each file on the web server.
Although the use of the coherency checking mechanism described above keeps redundant requests for coherency from propagating over the Internet, a further feature of the invention may be employed to reduce the processing overhead-itself. In accordance with this aspect of the invention, ambiguous file references are converted into non- ambiguous references by including the file coherency information as an integral part of the file name. Take for example a web page that references two graphics file bannerl .gif and banner2.gif.
bannerl.gif 04/08/98 12:22:17
20 banner2.gif 05/15/99 09:07:13
To eliminate the ambiguous file reference problem, -the file directory information shown above is automatically processed to rename the files as GOS_S980804122217_bannerl .gif and GOS_990515090713_banner2.gif respectively, all HTML references to these files are changed to use the new names, the files are tagged as expiring 100 years from the processing date. As a consequence, if the web browser or web cache locates the file, it is by definition coherent and no further checks are required. Marking the file as expiring in 100 years makes use of a built in capability of HTTP that has long been underutilized.
Accompanying Source Code
The accompanying Appendix contains source language listings of Java programs which implement some of the features of the invention as described above and which have been developed using the Visual Cafe Java development environment supplied by Symantec Corporation of Cupertino, CA. In the Appendix, the Java class listings for the client side application are presented first, followed by the classes for the server side application, and concluding with common classes shared by both.
Conclusion
It is to be understood that the methods which have been described are merely illustrative applications of the principles of the invention. Numerous modifications may be made without departing from the true spirit and scope of the invention.
/*
Java Source Language Listings
Copyright 1999 by Clinton Brenton Battersby
*/ /*
A basic extension of the 3ava. awt .Dialog class */ import java.awt.*, import java . awt . image. ImageObserver; import Symantec. ltools. awt BorderPanel; public class AboutClientDialog extends Dialog { public AboutClientDialog (Frame parent, boolean modal) { super (parent, modal) ;
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{(INIT_CONTROLS setLayout (null) ; setBackground ( j ava . awt . Color . lightGray) ; setFont (new Font ("Dialog", Font. PLAIN, 12)); setSιze(299,216) ; setVisible (false) ; try { borderPanell . setBevelΞtyle (Symantec . Itools . awt . BorderPanel . BEVEL_RAISED) ; } catch ( java.beans . PropertyVetoException e) { } borderPanell .setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (2, 0,298, 188) ; label4. setText ("Patents pending") ; borderPanell .add (label4) ; label .setBounds (20, 65, 156, 24) ; label3.setText ("All Rights Reserved"); borderPanell. add (label3) ; label3. setBounds (20, 45, 156,24); label2.setText ("Copyright (C) 1999 MTI"); borderPanell. add(label2) , label2. setBounds (21,30,156,20) ; labelδ . setText ( "Customer . " ) ; borderPanell .add (label5) ; label5. setBounds (20,103,78,24) ; label6. setText ("Version: 2") ; borderPanell. add (label6) ; label6. setBounds (20, 125, 77, 19); label7. setText ("Build: "); borderPanell . add ( label7 ) ; label7. setBounds (20, 145, 48, 18); borderPanell. add (textFieldl) ; textFieldl. setBounds (96,105,173,20) ; buildlabel. setText ("0") ; borderPanell .add (buildlabel) ; buildlabel. setBounds (71, 145, 88, 15) ; buttonl. setLabel ("WWWhooshi Client Accelerator"); borderPanell. add (buttonl) ; buttonl. setBounds (13,8,185, 19) ; okButton . setLabel ( "OK" ) ; add(okButton) ; okButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); okButton. setBounds (227,189, 64,20) ; setTιtle( "About W hoosh Client");
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 1 of 156 buildlabel. setText ( new Intege (ClientBuild. NUMBER) .toString () //{ (REGISTER_LISTENERS
Sym mdow aΞymWindow = new Sym indow ( ) ; this.addW ndowListener (aSymWmdow) ; SymAction lSymAction = new SymAction () ; okButton. addActionListener (lSymAction) ; buttonl . addActionListener (lSymAction) , //}}
} public AboutClientDialog (Frame parent, String title, boolean modal) { this (parent, modal); setTitle (title) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSizeO; super . addNotify ( ) ;
// Only do this once. if (fComponentsAdjusted) return;
// Adjust components according to the insets
Insets insets = getlnsets(); setSize (insets . left + insets. right + d. width, insets. top + insets.bottom + d. height)
Component components [] = getComponents ( ) ; for (mt ι = 0; I < components . length; ι++)
{
Point p = components [I] .getLocation () ; p. translate (insets . left, insets.top) ; components [I] . setLocatιon(p) ; }
// Used for addNotify check. fComponentsAdjusted = true; \ public void paint (Graphics g) {
Image logo = getToolkit () .getlmage ( "Javalogo. pg") ; g.drawl age (logo, 15, 35, 65, 65, (ImageObserver) this) ;
} public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent () .getBounds ( ) ; Rectangle abounds = getBounds ( ) ; setLocation (bounds .x + (bounds. idth - abounds. idth) / 2, bounds . y + (bounds .height - abounds .height) 12 } ; } super. setVisible (b) ;
}
// { { DECLARE_CONTROLS
Symantec. ltools .awt. BorderPanel borderPanell = new Symantec. ltools. awt. BorderPanel j ava. awt . Label label4 = new java. awt .Label () java. awt. Label label3 = new java. awt .Label () java. awt .Label label2 = new java. awt .Label () , java. awt .Label label5 = new java. wt. Label ()
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 2 of 156 java. awt. abel label6 = new ava. awt. Label 0 ; java. awt .Label label7 = new java. awt. Label 0 ; ava. awt. TextField textFieldl = new java.awt .TextFieldO ; java. awt. Label buildlabel = new java. awt. Label 0 ; java. awt. Button buttonl = new java .awt. Button ( ) ; java. awt. Button okButton = new java awt .Butto () ;
//))
// Used for addNotify check, boolean fComponentsAd usted = false, class SymAction implements java .awt . even .ActionListener { public void actionPerformed (java.awt .event.ActionEvent event) {
Object object = event .getSource () ; if (object == okButton) okButton_ActιonPerformed (event) ; else if (object == buttonl) buttonl_ActιonPerformed (event) ; } } void okButton_ActιonPerformed ( java.awt. event .ActionEvent event) {
// to do: code goes here. okButton_ActιonPerformed_Interactιonl (event) ; } void okButton_ActιonPerformed_Interactιonl (java. awt .event .ActionEvent event) ( try { this . dispose ( ) ;
} catch (Exception e) (
) ) class SymWindow extends java .awt .event .WindowAdapter { public void WmdowClosing ( ava. wt. event .WindowEvent event) {
Object object = event. getSource () ; if (object == AboutClientDialog. this)
AboutClιentDιalog_WmdowClosιng (event) ; } ) void AboutClientD alog_WmdowClosing ( ava . awt . event . indowEvent event ) {
// to do: code goes here.
AboutClιentDιalog_WmdowClosιng_Interactιonl (event) ; } void AboutClιentDιalog_WmdowClosιng_Interactιonl ( ava. awt .event. indowEvent event) ( try { this .dispose ( ) ;
} catch (Exception e) {
} ) static java . util . ResourceBundle aboutClientDialogBundle = j ava . util . ResourceBundle . getBundle ( "AboutClientDialogBundle" ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 3 of 156 void buttόnl_ActionPerformed (java.awt . event .ActionEvent event) {
Runtime rt = Runtime. getRuntime () ; try { rt .exec ( "C: WProgram FilesWlnternet Explorer\Mexplore.exe http: //www. wwwhoosh. com") ;
) catch ( java . io . IOException ioe )
U
} }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 4 of 156 public class AboutClientDialogBundle extends java.util. ListResourceBundle
( public Object!] [] getContents () return contents;
} static final Object [] [] contents = {
//Changing tags in the following block will //break the parsing of the related file //{{Start Automatic Code Generation Block ("borderPanell_label", ""},
"okButton_label", "OK"), {"label4 text", "Patents pending"},
"label3_text", "All Rights Reserved" } , "label2_text", "Copyright (C) 1999 MTI"}, "labell_text", "WWWhoosh Proxy"}, "label5_text", "Customer: " } , "label6_text", "Version: 001"}, 11label7 text", "Build: "},
"textFieldl text" ''}, buildlabel_text", "0"}, ."AboutClientDialog^title", "About WWWhoosh Client": //}}End Automatic Code Generation Block
};
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 5 of 156 import java . awt . * , import java . awt . event . * ; import COM reitshamer .util . Debug; import Symantec. ltools. awt .BorderPanel;
public class ClearDialog extends Dialog { public ClearDialog (Frame parent, boolean modal)
{ super (parent, modal);
//Keep a local reference to the invoking frame frame = parent;
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{ { INIT_CONTROLS setLayout (null) ; setBackground (java.awt. Color. lightGray) ; setΞιze(214,133) ; setVisible (false) ; try { borderPanell . setBevelStyle (Symantec . ltools . awt . BorderPanel . BEVEL_RAISED) ; } catch ( ava. beans . PropertyVetoException e) { } borderPanell . setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (9, 7,200, 95) ; labell. setText ("Clear Log to Continue''"); labell.setAlignment ( ava. awt .Label. CENTER) ; borderPanell .add (labell) ; labell. setBounds (-1, 27, 180, 23) ; okButton . setLabel ( "OK" ) ; add(okButton) ; okButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); okButton. setBounds (136, 104, 64,20) ; setTitle ("Screen Log Full") ; //}}
//{ {REGISTER_LISTENERS
SymWindow aSymW dow = new SymW dow ( ) ; this.addWmdowListener (aSymWmdow) ; SymAction lSymAction = new SymAction (); okButton. addActionListener (lSymAction) ; //)} } public void addNotify () {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSizeO; super. addNotify () ; if (fComponentsAdjusted) return;
// Adjust components according to the insets setSize (getlnsets ( ) . left + getlnsets ( ) . right + d. width, getlnsets ( ) top + getlnsets ( ) .bottom + d. height) ;
Component components [] = getComponents ( ) ; for (int ι = 0; I < components . length; ι++) {
Point p = components [i] .getLocation () ; p translate (getlnsets (). left, getlnsets () .top) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 6 of 156 components [i] . setLocatιon(p) } fComponentsAdjusted = true;
} public ClearDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } i * *
* Shows or hides the component depending on the boolean flag b.
* Θparam b if true, show the component; otherwise, hide the component.
* Θsee java.awt . ComponentiisVisible */ public void setVisible (boolean b) { if (b) (
Rectangle bounds = getParent () .getBounds () ; Rectangle abounds = getBounds () ; setLocation (bounds. x + (bounds .width - abounds .width) / 2, bounds. y + (bounds .height - abounds. height) /2) ; Toolkit . getDe aultToolkit ( ) . beep ( ) ; super. setVisible (b) ;
}
// Used for addNotify check, boolean fComponentsAdjusted = false; // Invoking frame Frame frame = null;
// { { DECLARE_CONTROLS
Symantec. itools .awt. BorderPanel borderPanell = new Symantec. ltools .awt.BorderPanel I java.awt. abel labell = new java.awt . abel () ; java . awt . Button okButton = new java.awt . Button () ;
//>> class SymAction implements java.awt .event.ActionListener { public void actionPerformed (java.awt .event .ActionEvent event) {
Object object = event. getSource () ; if (object == okButton) okButton_ActionPerformed (event) ; } } void okButton_ActionPerformed (java.aw . event .ActionEvent event) {
// to do: code goes here. okButton_ActionPerformed_Interactionl (event) ; } void okButton_ActιonPerformed_Interactionl (java. awt.event.ActionEvent event) { try {
Debug . textout . setText ( "" ) ; this .dispose ( ) ; } catch (Exception e) { } }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 7 of 156 class SymW dow extends java. awt. event. W dowAdapter { public void WmdowClosing (java. awt. event. indowEvent event) {
Object object = event .getSource () ; if (object == ClearDialog. this)
ClearDιalog_WιndowClosmg (event) ; } } void ClearDιalog_WmdowClosmg (java. awt . event . indowEvent event) {
// to do: code goes here.
ClearDιalog_WmdowClosιng_Interactιonl (event) ;
) void ClearDιalog_WιndowClosmg_Interactιonl ( ava.awt . event .WindowEvent event) { try { this. dispose () ;
} catch (Exception e) {
1 } s tat i c j ava . u t i l . Re s ou rc eBund l e c l ea rDia logBundl e j ava . util . ResourceBundle . getBundle ( "ClearDialogBundle" ) ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 8 of 156 public class ClearDialogBundle extends java.util . ListResourceBundle public Object [][] getcontents () { return contents; } static final Object!] [] contents =
{
//Changing tags in the following block will //break the parsing of the related file //{{Start Automatic Code Generation Block {"okButton_label", "OK"},
{"labell_text", "Clear Log to Continue?"}, {"ClearDialog_title", "Screen Log Full"}, //}}End Automatic Code Generation Block
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 9 of !56 public class ClientBuild {public static int NUMBER=143 ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 10 of 156 public class ClearDialogBundle extends java. util .ListResourceBundle { public Object!] [] getContents ( )
{ return contents;
> static final Object!] [] contents =
{
//Changing tags in the following block will //break the parsing of the related file //{{Start Automatic Code Generation Block {"okButton_label", "OK"},
{"labell_text", "Clear Log to Continue?"}, { "ClearDialog_title", "Screen Log Full"}, //}}End Automatic Code Generation Block
> ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 11 of 156 import java . awt .
public class CommandHelpDialog extends Dialog { public CommandHelpDialog (Frame parent, boolean modal) { super (parent, modal);
// This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
//{{INIT_CONTROLS setLayout (null) ; setBackground (java. awt . Color .white) ; setFont (new Font ("Dialog", Font. PLAIN, 14)); setSize(446,203) ; setVisible (false) ; okButton . setLabel ( "OK" ) ; add (okButton) ; okButton. setBackground (java.awt. Color. lightGray) ; okButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); okButton. setBounds (200,164, 60,20) ; labell. setText ("Passthrough: forward all requests unmodified, no check cache" add (labell) ; labell. setFont (new Font ("Dialog", Font. PLAIN, 12)); labell. setBounds (12, 42, 420, 36) ; label2. setText ("Debug trace: turns HTTP logging on/off"); add(label2) ; label2. setFont (new Font ("Dialog", Font. PLAIN, 12)); label2. setBounds (12, 72, 420, 36) ; label3. setText ("Loopback: responds to ALL requests with \"304 Not ModifiedV" add(label3) ; label3. setFon (new Font ("Dialog", Font. PLAIN, 12)); label3. setBounds (12,12,420,36) ; setTitle ("WWWhoosh commands");
//}}
//{ {REGISTERJLISTENERS
SymWindow aSymWindow = new SymWindow ( ) ; this .addW dowListener (aSymWindow) ;
SymAction lSymAction = new SymAction (); okButton. addActionListener (lSymAction) ;
//}}
} public CommandHelpDialog (Frame parent, String title, boolean modal) { this (parent, modal); setTitle (title) ;
} public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSize(); super. addNotify () ;
// Only do this once, if (fComponentsAdjusted) return;
// Adjust components according to the insets
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 12 of 156 Insets insets = getlnsets (); setSize (msets. left + msets. right + d. idth, insets. top + insets .bottom + d. eight)
Component components!] = getComponents ( ) ; for (int i = 0; i < components . length; i++)
{
Point p = components [i] . getLocatιon() ; p. translate (insets. left, insets .top) ; components [i] . setLocation(p) ;
}
// Used for addNotify check. fComponentsAdjusted = true;
} public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent () .getBounds {) ; Rectangle abounds = getBounds (); setLocation (bounds .x + (bounds .width - abounds .width) / 2, bounds. y + (bounds .height - abounds. eight ) /2) ; } super. setVisible (b) ;
// { { DECLARE_C0NTROLS java.awt .Button okButton = new java.awt .Button () ; java.awt .Label labell = new j ava . awt . Label () , java.awt . Label label2 = new java.awt .Label () , java.awt . Label label3 = new java.awt . Label ()
//}}
// Used for addNotify check, boolean fComponentsAdjusted = false; class SymAction implements java. awt .event. ActionListener { public void actionPer ormed (java. awt .event. ActionEvent event) {
Object object = event. getSource () ; if (object == okButton) okButton_ActionPerformed (event) ; } void okButton_ActionPerformed (java.awt . event .ActionEvent event) {
// to do: code goes here. okButton ActionPerformed Interaction! (event) ;
void okButton_ActιonPerformed_Interactionl (java. awt. event. ActionEvent event) { try { this .dispose ( ) ;
} catch (Exception e) {
class SymWindow extends java.aw . event .WmdowAdapter { public void windowClosing (java . awt . event .WindowEvent event)
{
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 13 of 156 Object object = event .getSource () ; if (object == CommandHelpDialog. his)
CommandHelpDιalog_WmdowClosιng (event) ; } } void CommandHelpDιalog_WιndowClosmg ( ava.awt. event . WindowEvent event) {
// to do: code goes here.
CommandHelpDιalog_WιndowClosιng_Interactιonl (event) , } void CommandHelpDιalog_WιndowClosιng_Interactιonl (java.awt .event .WindowEvent event) { try { th s .dispose () ;
} catch (Exception e) {
} } static j ava . util . ResourceBundle commandHelpDialogBundle j ava . util . ResourceBundle . getBundle ( "CommandHelpDialogBundle" ) ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 14 of 156 public class CommandHelpDialogBundle extends java. util . ListResourceBundle { public Object!] [] getContents ( )
{ return contents;
} static final Object!] [] contents = {
//Changing tags in the following block will
//break the parsing of the related file
//{{Start Automatic Code Generation Block
("okButton_label", "OK"},
( "labell_text", "Passthrough: forward all requests unmodified, no check cache"},
("label2_text", "Debug trace: turns HTTP logging on/off"},
("label3_text", "Loopback: responds to ALL requests with \"304 Not Modified\""} ,
{ "CommandHelpDialog_title", "WWWhoosh commands"},
//}}End Automatic Code Generation Block
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 15 of 156 import java . awt . * ; import Symantec . ltools . awt . BorderPanel ; import COM. reitshamer. util . *; public class ConnectionDialog extends Dialog { private ProxyGUI _proxy=null; public ConnectionDialog (ProxyGUI parent, boolean modal) { super (parent, modal) ;
_proxy=parent; // This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
//{ {INIT_C0NTR0LS setLayout (null) ; setBackground ( ava.awt. Color. lightGray) ; setFont (new Font ( "Dialog", Font. PLAIN, 14)); setSize (373,299) ; setVisible (false) ; button! . setLabel ( "OK" ) ; ad (buttonl) ; button! setFont (new Font ("Dialog", Font. PLAIN, 12)); buttonl setBounds (148,271, 64,20) ; button2. setLabel ("Cancel") ; add(button2) ; button2 setFont(new Font ("Dialog", Font. PLAIN, 12)); button2. setBounds (215,271, 64,20) ; button3. setLabel ( "Apply" ) ; add(button3) ; button3. setFont (new Font ("Dialog", Font. PLAIN, 12)); button3. setBounds (279,271, 64,20) ; try { borderPanell. setBevelStyle (Symantec. ltools. awt. BorderPanel. BEVEL RAISED) } catch (java. beans PropertyVetoException e) { } try { borderPanell . setLabel (" Internet Connection "); ) catch (java. beans . PropertyVetoException e) { } try { borderPanell setAlignStyle (Symantec. ltools. awt .BorderPanel. ALIGN_LEFT) ; ) catc (java. beans . PropertyVetoException e) { } borderPanell. setLayout (null) ; ad (borderPanell) ; borderPanell. setFont (new Font ("Dialog", Font. PLAIN, 12)); borderPanell. setBounds (4, 11, 342, 156) ; proxycheck. setLabel ("Connect using a proxy server "); borderPanell . ad (proxycheck) ; proxycheck setFont(new Font ("Dialog", Font. PLAIN, 12)); proxycheck. setBounds (11, 11,228,24) ; addressText . setText ( "127.0.0.1"); borderPanell . add (addressText) ; addressText. setBounds (102, 45, 112, 20) ; borderPanell. add (portText) ; portText. setBounds (264, 45, 52, 20) ; label2. setText (" Address:"); borderPanell. add (label2) ; label2. setFont (new Font ("Dialog", Font. PLAIN, 12)); label2. setBounds (47, 41,56,24) ; label3. setText ( "Port : " ) ; borderPanell. add (label3) ; label3. setBounds (227, 5, 36, 20) ; try {
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 16 of 156 borderPanel2. setBevelStyle (Symantec . ltools . awt . BorderPanel . BEVEL_RAISED)
} catch (java.beans. PropertyVetoException e) { } try { borderPanel2.setLabel (" Browser Connection ");
} catch (java.beans. PropertyVetoException e) { } try { borderPanel2. setAlignStyle (Symantec . ltools . awt . BorderPanel .ALIGN_LEFT) ;
} catch (java. eans. PropertyVetoException e) { } borderPanel2.setLayout (null) ; add(borderPanel2) ; borderPanel2. setFont (new Font ("Dialog", Font. PLAIN, 12)); borderPanel2. setBounds (10, 1 4, 338, 89) ; label . setText ("Listen for connections on port:"); borderPanel2.add(label4 ) ; label4. setBounds (8, 4, 172, 28) ; listenportText. setText ("123") ; borderPanel2.add (listenportText) ; listenportText. setBounds (210, 9, 52,20) ; setTitle ("WWWhoosh Connection Options");
//}}
//{ {REGISTER_LISTENERS
SymWindow aSymW dow = new SymWindow ( ) ; this.addWindowListener (aSymW dow) ; SymAction lSymAction = new SymAction ( ) ; buttonl . addActionListener (lSymAction) ; SymComponent aSymComponent = new SymComponent () ; this. addComponentListener (aSymComponent) ; button2. addActionListener (lSymAction) ; button3. addActionListener (lSymAction) ; Symltem lSymltem = new Symltem(); proxycheck. addltemListener (lSymltem) ; //}}
} public ConnectionDialog (ProxyGUI parent, String title, boolean modal) { this (parent, modal); setTitle (title) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSizeO; super . addNotif ( ) ;
// Only do this once. if (fComponentsAdjusted) return;
// Adjust components according to the insets
Insets msets = getlnsets (); setSize (msets. left + msets. right + d. idth, sets. top + insets. ottom + d. height)
Component components!] - getComponents ( ) ; for (mt ι = 0; I < components . length; ι++)
{
Point p = components [I] .getLocation () ; p.translate ( sets . left, msets .top) ; components [l] . setLocatio (p) ; }
// Used for addNotify check. fComponentsAdjusted = true;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 17 of 156 } public void setVisible (boolean b) { if (b) <
Rectangle bounds = getParent () .getBounds () ; Rectangle abounds = getBounds ( ) ; setLocation (bounds. + (bounds .width - abounds .width) / 2, bounds. y + (bounds .height - abounds .height) /2) ;
super . setVisible (b) ;
// { { DECLARE_CONTROLS java.awt .Button buttonl = new java. awt. Butto () , java. awt. Button button2 = new java. awt. Button () ava. awt. Button button3 = new java.awt. Button ()
Symantec. itools. awt .BorderPanel borderPanell = new Symantec. itools . awt .BorderPanel () ; java.awt. Checkbox proxycheck = new java.awt . Checkbo () ; java. wt. TextField addressText = new java. awt. TextField () ; java.awt .TextField portText = new java. awt .TextFieldO ; java.awt . Label label2 = new java.awt . Label () ; java. awt. Label label3 = new java.awt . Label () ;
Symantec. itools . awt .BorderPanel borderPanel2 = new Symantec. itools .awt .BorderPanel () ; java.awt . Label label4 = new java.awt . Label () ; java. awt. TextField listenportText = new java .awt. extField () ;
//}}
// Used for addNotify check, boolean fComponentsAdjusted = false; class SymAction implements java.awt .event .ActionListener
{ public void actionPerformed (java. awt. event .ActionEvent event) <
Object object = event .getSource 0 ; if (object == buttonl) buttonl_ActionPer ormed (event) ; else if (object == button2) button2_ActionPerformed (event) ; else if (object == button3) button3 ActionPerformed (event) ;
class SymWindow extends java.awt .event . indowAdapter ( public void windowClosed(java. awt. event .WindowEvent event)
{
Object object = event. getSource () ; if (object == ConnectionDialog. this)
ConnectionDialog_WindowClosed (event) ;
public void windowOpened (java.awt .event .WindowEvent event) {
Object object = event .getSource () ; if (object == ConnectionDialog. his)
ConnectionDialog_WindowOpened (event) ; } public void windowClosing (java.awt . event .WindowEvent event) {
Object object = event. getSource () ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 18 of 156 if (object == ConnectionDialog. this)
ConnectionDialog_WindowClosing (event) ; } } void ConnectionDialog_WindowClosing (java.awt. event .WindowEvent event) {
// to do: code goes here.
ConnectionDialog_WindowClosing_Interactionl (event) ; } void ConnectionDialog_WindowClosing_Interactionl (java.awt. event .WindowEvent event) { try { this. dispose () ;
} catch (Exception e) {
) } void buttonl_ActionPerformed (java.awt . event .ActionEvent event) {
Debug.useProxy=proxycheck.getState () ; if (proxycheck. getState ( ) && (portText .getText ( ) != "") ) {
Debug . outAddress= addressText . getText ( ) ;
Debug . outProxy= (new Integer (portText . getText ( ) ) ) . intValue ( ) ; } if (listenportText. getText () != "") { int newport = ( new Integer (listenportText .getText () ) ). intValue () ; if (Debug. listenPort != newport) {
Debug. listenPort = newport; try {_proxy. init ( ) ; } catch (Exception e) {} } } try { this . dispose () ; } catch (Exception e) { }
class SymComponent extends java. awt. event. ComponentAdapter { public void ComponentShown (java.awt .event .ComponentEvent event) {
Object object = event .getSource () ; if (object == ConnectionDialog. this)
ConnectionDialog_ComponentShown (event) ; } } void ConnectionDialog_ComponentShown (j ava . awt . event . ComponentEvent event) {
) void ConnectionDialog_WindowOpened (java . awt . event . WindowEvent event) { listenportText . setText (new Intege (Debug. listenPort) .toStringf) ) ; proxycheck. setState (Debug.useProxy) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 19 of 156 addressText . setText (Debug. outAddress ) ; portText. setText (new Integer (Debug. outProxy) . tostr g ( ) ); if (' Debug. useProxy) { portText . disable ( ) ; addressText . disable ( ) ; } } void button2_ActιonPerformed (java.awt . event .ActionEvent event)
try { this. dispose () ; } catch (Exception e)
} void button3_ActιonPerformed (java.awt. event .ActionEvent event) {
Debug. useProxy=proxycheck.getState () ; if (proxycheck. getState ( ) && (portText . getText () '= "" ) ) {
Debug . outAddress= addressText . getText ( ) ;
Debug. outProxy= (new Integer (portText . getText ( ) ) ) . intValue ( ) }
if (listenportText. getText () '■= "") { mt newport = ( new Integer (listenportText . getText () ) ) . intValue ( ) , if (Debug. listenPort '= newport) {
Debug. listenPort = newport; try {_proxy. nit ( ) ; } catch (Exception e) {} }
} void ConnectιonDιalog_WιndowClosed (java. awt .event .WindowEvent event) {
// to do: code goes here.
} class Symltem implements java. awt. event. ItemListener { public void ιtemStateChanged(java. awt .event. ItemEvent event) {
Object object = event. getSource () ; if (object == proxycheck) proxycheck_ItemStateChanged (event) ; } void proxycheck_ItemStateChanged( java .awt. event . ItemEvent event) { if (proxycheck. getState () )
{ portText . enable ( ) ; addressText .enable () ; } else
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 20 of 156 {portText . disable ( ) ; addressText . disable ( ) ; }
} static java . util . ResourceBundle ConnectionDialogBundle java .util .ResourceBundle. etBundle ( "ConnectionDialogBundle") ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 21 of 156 public class ConnectionDialogBundle extends java. util. ListResourceBundle { public Object!] [] getContents 0 { return contents; } static final Object!] [] contents = {
//Changing tags in the following block will //break the parsing of the related file //{{Start Automatic Code Generation Block
"labell_text", " Connection Options "},
"buttonl_label", "OK"},
"button2_label", "Cancel"},
"button3_label", "Apply"},
"borderPanell_label", ""},
"ρroxycheck_label", "Connect using a proxy server "},
"addressText_text", ""},
"ρortText_text", ""},
"label2_text", " Address:"},
"label3_text", "Port:"},
"listenportText_text", ""},
"label4_text", "Listen for connections on port:"},
"ConnectionDialog_title", "WWWhoosh Connection Options"}, //}}End Automatic Code Generation Block };
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 22 of 156 import java.awt.*; import Symantec . itools . awt . BorderPanel ; import COM. reitsharuer .util . *; import com. Symantec. ltools . swing. JButtonGroupPanel;
public class FeatureDialog extends Dialog { public FeatureDialog (Frame parent, boolean modal)
{ super (parent, modal),
// This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
//{ {INIT_CONTROLS setLayout (null) ; setBackground ( ava. awt . Color. lightGray) ; setFont (new Font ("Dialog", Font. PLAIN, 14)); setSιze(325,144) ; setVisible (false) ; labell. setText (" Functions ") , add (labell) ; labell. setFont (new Font ("Dialog", Font. PLAIN, 12)); labell.setBounds(24,12,92,28) , buttonl. setLabel ("OK") ; add (buttonl) ; buttonl. setFon (new Font ( "Dialog", Font. PLAIN, 12)); buttonl. setBounds (113, 114, 64,20) ; button2. setLabel ("Cancel") ; add(button2) ; button2. setFont (new Font ("Dialog", Font. PLAIN, 12)); button2. setBounds (178, 114, 64,20); button3. setLabel ( "Apply" ) ; add(button3) ; button3. setFont (new Font ("Dialog", Font. PLAIN, 12)); button3.setBounds(242,114, 64,20) ; try { borderPanell . setBevelStyle ( Symantec. itools . awt . BorderPanel . BEVEL_RAISED) } catch (java.beans . PropertyVetoException e) { } borderPanell. setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (12, 13, 306, 98) , statsthreadCheckbox. setLabel ("HTTP 1.1 Browser Connections"); borderPanell .add (statsthreadCheckbox) ; statsthreadCheckbox. setFont (new Font ("Dialog", Font. PLAIN, 12)); statsthreadCheckbox. setBounds (14, 21, 221, 18); forceGetCheckbox. setState (true) ; forceGetCheckbox. setLabel ("Force GET of HTML base") ; borderPanell . add ( forceGetCheckbox) ; forceGetCheckbox. setFont (new Font ("Dialog", Font. PLAIN, 12)),- forceGetCheckbox. setBounds (14, 45, 221, 18) , setTitle ("WWWhoosh Optional Functions"), //}}
//{ (REGISTER_LISTENERS
SymWindow aSymWmdow - new SymWindow () ; this . addW dowListener (aSymWindow) ; SymAction lSymAction = new SymAction () ; buttonl . addActionListener (lSymAction) ; SymComponent aSymComponent = new SymComponent ( ) , this . addComponentListener (aSymComponent) ; button2. addActionListener (lSymAction) ; button3. addActionListener (lSymAction) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 23 of 156 // } } } public FeatureDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSizeO; super . addNotify ( ) ;
// Only do this once, if (fComponentsAdjusted) return;
// Adjust components according to the msets
Insets insets = getlnsets () ; setSize ( sets. left + sets. right + d.width, msets. top + sets. ottom + d. eight)
Component components!] = getComponents ( ) ; for (int = 0; i < components . length; ι++)
{
Point p = components [l] . getLocation () ; p. translate (insets. left, insets. top) ; components [I] . setLocation (p) ; }
// Used for addNotify check. fComponentsAdjusted = true; } public void setVisible (boolean b) {
//force noresize setResizable (false) ; if (b) {
Rectangle bounds = getParent (). getBounds () ,
Rectangle abounds = getBounds (); setLocation (bounds .x + (bounds .width - abounds. idth) / 2, bounds . y + (bounds.height - abounds .height) /2) ; } super. setVisible (b) ; }
// { { DECLARE_CONTROLS java. awt .Label labell = new java. awt. Label () ; java. awt .Button buttonl = new ava. awt.Button () , java. awt. Button button2 = new java. awt .Button () ; java. awt .Button button3 = new java. awt .Button () ;
Symantec. itools. awt. BorderPanel borderPanell = new Symantec. itools. awt .BorderPanel () , java awt. Checkbox statsthreadCheckbox = new ava. awt. Checkbox () , java. awt. Checkbox forceGetCheckbox = new java.awt . Checkbox () ;
//}}
// Used for addNotify check, boolean fComponentsAdjusted = false; class SymAction implements java.awt . event .ActionListener
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 24 of 156 public void actionPerforme (java. awt .event .ActionEvent event)
I
Object object = event. getSource () ; if (object == buttonl) buttonl_ActιonPerformed (event) ; else if (object == button2) button2_ActιonPerformed (event) ; else if (object == button3) button3 ActionPerformed (event) ;
class SymWindow extends java.awt .event .WindowAdapter { public void windowClosed( java.awt .event .WindowEvent event) {
Object object = event. getSource () ; if (object == FeatureDialog. this)
FeatureDialog_WindowClosed (event) ; ) public void windowOpened ( java.awt .event .WindowEvent event) {
Object object = event. getSource () ; if (object == FeatureDialog. this)
FeatureDialog_WindowOpened (event) ;
public void windowClosing (java.awt . event .WindowEvent event) {
Object object = event. getSource () ; if (object == FeatureDialog. this)
FeatureDialog_WindowClosing (event) ; } void FeatureDialog_WindowClosing (java . awt . event . WindowEvent event) {
// to do: code goes here.
FeatureDialog_WindowClosιng_Interactionl (event) ;
void FeatureDialog_WindowClosing_Interactionl (java.awt . event .WindowEvent event) { try { this .dispose ( ) ;
} catch (Exception e) {
} } void buttonl_ActionPerformed (java. awt .event.ActionEvent event) {
Debug. connKeepAlive = statsthreadCheckbox. getState () ; Debug . forceHTMLbaseGET=forceGetCheckbox . getState ( ) ;
try { this .dispose ( ) ; } catch (Exception e) {
}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 25 of 156 class SymComponent extends java.awt .event .ComponentAdapter
{ public void ComponentShown (java.awt . event .ComponentEvent event)
{
Object object = event .getSource () ; if (object == FeatureDialog. this)
FeatureDιalog_ComponentShown (event) ; } } void FeatureDιalog_ComponentShown (java.awt . event .ComponentEvent event) {
} void FeatureDιalog_WmdowOpene (java . awt .event .WindowEvent event) ( statsthreadCheckbox. setState ( Debug. connKeepAlive ); forceGetCheckbox. setState ( Debug. forceHTMLbaseGET );
} void button2_ActιonPer ormed (java.awt. event .ActionEvent event) { try { this .dispose () ; } catch (Exception e) { }
} void button3_ActιonPerformed (java.awt . event .ActionEvent event) {
Debug. connKeepAlive = statsthreadCheckbox. getState () , Debug. forceHTMLbaseGET=forceGetCheckbox. getState ( ) ; } void FeatureDιalog_WmdowClosed(java. awt .event .WindowEvent event) {
// to do: code goes here.
} class Symltem implements java.awt .event . ItemListener { public void ιtemStateChanged(java.awt . event . ItemEvent event) { ) } sta t i c j ava . util . ResourceBundle f eatureDialogBundl e ava . ut ii . ResourceBundle . getBundle ( "FeatureDialogBundle" ) ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 26 of 156 public class FeatureDialogBundle extends java. util. ListResourceBundle { public Object!] [] getContents ( )
{ return contents;
} static final Object!] [] contents = {
//Changing tags m the following block will
//break the parsing of the related file
//{{Start Automatic Code Generation Block
{"labell_text", " Functions "},
("borderPanell_label", ""},
("checkboxl_label", "Statistics Update Thread"},
{"buttonl_label", "OK"},
{"button2_label", "Cancel"},
("button3_label", "Apply"},
{"FeatureDιalog_tιtle", "WWWhoosh Log Levels"},
//}}End Automatic Code Generation Block
} ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 27 of 156 /*
A basic extension of the j ava . awt . rame class */ import j ava . awt . * ; import COM. reitshame .util . Debug; import Java . util . Date; public class LoggerFrame extends Frame { public LoggerFrame ( ) {
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{ {INIT_CONTROLS setLayout (null) ; setBackground (java.awt. Color. lightGray) ; setSize{526,442) ; setVisible (false) ; buttonl. setLabel ("Close") ; add (buttonl) ; buttonl. setBounds (451, 411, 64, 20) ; add(textAreal) ; textAreal. setBounds (11, 9,507,392) ; button2. setLabel ( "Clear" ) ; add(button2) ; button2. setBounds (387,411,64,20); button3. setLabel ("Logfile") ; add(button3) ; button3. setBounds (322,411, 64,20) ; setTitle ("WWWhoosh Trace Logger "); setResizable (false) ;
//))
//{ {INIT_MENUS //}}
//{ {REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow ( ) ; this . addWindowListener (aSymWindow) ; SymAction lSymAction = new SymAction (); buttonl. addActionListener (lSymAction) ; button3. addActionListener (lSymAction) ; button2. addActionListener (lSymAction) ; //)} } public LoggerFrame (String title) { this() ; setTitle (title) ; }
/**
* Shows or hides the component depending on the boolean flag b.
* Θparam b if true, show the component; otherwise, hide the component.
* Θsee java. awt .ComponentfisVisible */ public void setVisible (boolean b) { textAreal = Debug. textout; if (b) { setLocation (300, 300); }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 28 of 156 super . setVisible (b) ; } static public void main (String args [ ] ) {
(new LoggerFrame ( ) ) . setVisible (true) , } public void addNotify () {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSizeO; super .addNotify ( ) ; if (fComponentsAdjusted) return;
// Adjust components according to the sets
Insets msets = getlnsets () ; setSize ( sets . left + sets. right + d. width, insets. top + msets .bottom + d. height)
Component components!] = getComponents ( ) ; for (mt ι = 0; i < components . length; ι++)
{
Point p = components [i] .getLocat on () ; p. translate ( sets . left, msets. top) ; components [I] . setLocation (p) ; } fComponentsAdjusted = true; }
// Used for addNotify check, boolean fComponentsAdjusted = false;
//{ {DECLARE_CONTROLS java.awt . Button buttonl = new java.awt .Button () ; java.awt .TextArea textAreal = new java. awt. TextArea ( ) ; java. awt . Button button2 = new java.awt .Button () ; java.awt .Button button3 = new java.awt .Button () ;
//}}
// { {DECLARE_MENUS //}} class SymWindow extends java.awt . event .WindowAdapter ( public void windowClosing (java. wt . event .WindowEvent event) {
Object object = event . getSource () ; if (object == LoggerFrame. this)
LoggerFrame_WmdowClosmg (event) ; } } void LoggerFrame_WmdowClosmg (java.awt. event .WindowEvent event) { setVisible (false) ; // hide the Frame
class SymAction implements java.awt .event . ActionListener { public void actionPerformed (java. awt. event .ActionEvent event) {
Object object = event . getSource () ; if (object == buttonl) buttonl ActionPerformed (event) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 29 of 156 else if (object == button3) button3_ActionPerformed (event) ; else if (object == button2) button2 ActionPerformed (event) ;
void buttonl_ActioπPer ormed (java.awt . event .ActionEvent event) {
// to do: code goes here. buttonl_ActionPerformed_Interactionl (event) ; } void buttonl_ActionPerformed_Interactionl (java. awt .event .ActionEvent event) { try {
// LoggerFrame Hide the LoggerFrame this . setVisible ( false) ; } catch (Exception e) { } } void button3_ActionPerforme (java.awt .event .ActionEvent event) { if (Debug. fileOut() )
{
Debug. forceprint ("\r\n" + "File output stopped at " + new Date (). toGMTString ( ) + "\r\n"
) ;
Debug . setLogOf ( ) ; } else {
Debug. setLogOn ( ) ; Debug. forceprint ("\r\n" + "File output started at " + new Date () .toGMTString ( ) + "\r\n"
} } void button2_ActionPerformed (java. awt . event .ActionEvent event) {
Debug. textout. setText (" ");
}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 30 of 156 import java.awt.*; import Symantec.1tools. awt . BorderPanel; import COM. reitshamer. util . *; public class LogLevelDialog extends Dialog { public LogLevelDialog (Frame parent, boolean modal) { super (parent, modal);
// This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
//{{INIT_CONTROLS setLayout (null) ; setBackground (java.awt . Color. lightGray) ; setFont (new Font ( "Dialog", Font. PLAIN, 14)); setSize (350,222) ; setVisible (false) ; try { borderPanell. setBevelStyle (Symantec. itools. wt. BorderPanel. BEVEL_RAISED) ) catch (java. beans . PropertyVetoException e) { } try { borderPanell. setIPadBottom(2) ; } catch (java. beans . PropertyVetoException e) { } try { borderPanell . setLabel ("Logging Options") , } catch (java. beans . PropertyVetoException e) { } try { borderPanell . setAlignStyle ( Symantec . itools . awt . BorderPanel .ALIGN_LEFT) , ) catch (java. beans . PropertyVetoException e) { } borderPanell. setLayout (null) ; add (borderPanell) ; borderPanell. setFon (new Font ("Dialog", Font. PLAIN, 12)); borderPanell. setBounds (6, 12,338, 177) ; timingcheck. setLabel ("Timing and Statistical Info") ; borderPanell . add (timingcheck) ; timingcheck. setFont (new Font ("Dialog", Font. PLAIN, 12)); timingcheck. setBounds (5, 108, 308, 20) ; headerscheck. setLabel ("Print HTTP Headers"); borderPanell . add (headerscheck) ; headerscheck. setFont (new Font ("Dialog", Font. PLAIN, 12)); headerscheck. setBounds (5, 68, 318, 20); logiccheck. setLabel ("Trace Cache Logic FLow") ; borderPanell. ad (logiccheck) ; logiccheck. setFont (new Font ("Dialog", Font. PLAIN, 12)), logiccheck. setBounds (5,88, 272,20) ; getscheck. setLabel ("HTTP Request and Response Status Lines") ; borderPanell . dd (getscheck) ; getscheck. setFont (new Font ("Dialog", Font. PLAIN, 12)); getscheck. setBounds (5,28, 312,20) ; fullpathCheckbox. setLabel ("Display Full Pathnames") ; borderPanell . add (fullpathCheckbox) ; fullpathCheckbox. setFont (new Font ("Dialog", Font. PLAIN, 12)); fullpathCheckbox. setBounds (5, 48, 186, 20); checkboxl . setLabel ( "Show Exceptions") ; borderPanell. dd (checkboxl) ; checkboxl. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkboxl. setBounds (5, 8, 316, 20) ; buttonl . setLabel ( "OK") ; add (buttonl) ; buttonl. setFont (new Font ( "Dialog", Font. PLAIN, 12));
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 31 of 156 buttonl . setBounds (139,192,64,20); button2. setLabel ("Cancel") ; add(button2) ; button2. setFont (new Font ("Dialog", Font. PLAIN, 12)), button2. setBounds (205, 192, 64, 20) ; button3. setLabel ("Apply" ) ; add(button3) ; button3. setFont (new Font ("Dialog", Font. PLAIN, 12)); button3. setBounds (269, 192, 64,20) ; setTitle ("WWWhoosh Log Levels");
//}}
//{ {REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow ( ) ; this.addWindowListener (aSymWindow) ; SymAction lSymAction = new SymAction () ; buttonl . addActionListener (lSymAction) , SymComponent aSymComponent = new SymComponent ( ) ; this .addComponentListener (aSymComponent) ; button2. addActionListener (lSymAction) , button3. addActionListener (lSymAction) ; Symltem lSymltem = new Symltem(); fullpathCheckbox . addltemListener (lSymltem) ; //}}
public LogLevelDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ;
} public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSizeO; super. addNotify ( ) ;
// Only do this once, if (fComponentsAdjusted) return;
// Adjust components according to the msets
Insets sets = getlnsets (); setSize ( sets . left + msets. ight + d. width, sets. top + sets. bottom + d. height)
Component components!] = getComponents ( ) , for (int ι = 0; i < components. length; ι++)
{
Point p = components [I] .getLocation () ; p. translate ( sets . left, msets. top) ; components [I] . setLocation (p) ; }
// Used for addNotify check. fComponentsAdjusted = true;
public void setVisible (boolean b) { if (b) (
Rectangle bounds = getParent () .getBounds () , Rectangle abounds = getBounds () ; setLocation (bounds. + (bounds .width - abounds. width) / 2, bounds . y + (bounds .height - abounds .height) /2) ,
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 32 of 156 super .setVisible (b) ; }
//{ { DECLARE_CONTROLS
Symantec. itools. awt. BorderPanel borderPanell = new Symantec. ltools . awt .BorderPanel () ; java.awt .Checkbox timingcheck = new ava.awt .Checkbox () ; java .awt.Checkbox headerscheck = new ava. awt. Checkbox () ; java .awt. Checkbox logiccheck = new java.awt . Checkbox 0 ; java.awt .Checkbox getscheck = new java.awt . Checkbo () ; java .awt .Checkbox fullpathCheckbox = new j ava . awt . Checkbox 0 ; java.awt .Checkbox checkboxl = new ava.awt .Checkbox 0 ; ava.awt .Button buttonl = new java. awt. Button ( java.awt .Button button2 = new java . wt .Button () , java .awt. Button button3 = new java.awt .Button () ,
//}}
// Used for addNotify check, boolean fComponentsAdjusted = false, class SymAction implements java.awt .event .ActionListener { public void actιonPerformed(java. awt .event .ActionEvent event) {
Object object = event. getSource () ; if (object == buttonl) buttonl_ActιonPerformed (event) ; else if (object == button2) button2_ActιonPerformed (event) ; else if (object =- button3) button3_ActιonPerformed (event) ; } }
class SymWindow extends ava.awt. event .WindowAdapter { public void WindowClosed (java.awt . event .WindowEvent event) {
Object object = event. getSource () , if (object == LogLevelDialog. this)
LogLevelDιalog_WιndowClosed (event) , } public void wmdowOpened (java.awt .event .WindowEvent event) {
Object object = event .getSource () , if (object == LogLevelDialog. this)
LogLevelDιalog_WmdowOpened (event) ; } public void windowClosing (java. awt. event .WindowEvent event) {
Object object = event .getSource () ; if (object == LogLevelDialog. this)
LogLevelDιalog_WιndowClosmg (event) ; } } void LogLevelDιalog_WmdowClosmg (java. awt .event. WindowEvent event) {
// to do: code goes here.
LogLevelDιalog__WιndowClosιng_Interactιonl (event) , } void LogLevelDιalog_WmdowClosmg_Interactιonl (java.awt .event .WindowEvent event) {
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 33 of 156 try { this. dispose () ; } catch (Exception
void buttonl_ActιonPerformed (java.awt . event .ActionEvent event) {
Debug. LogGETs=getscheck. getState () ;
Debug. LogCache=logιccheck. getState ( ) ;
Debug . LogHeaders=headerscheck . getState ( ) ;
Debug . FULLPATHS=fullpathCheckbox . getState ( ) ;
Debug. LogTιmmg=tιmmgcheck. getState () ; try { this. dispose ( ) ; } catch (Exception e) {
}
class SymComponent extends java. awt . event. ComponentAdapter { public void ComponentShown ( ava . awt . event . ComponentEvent event) {
Object object = event .getSource () ; if (object == LogLevelDialog. this)
LogLevelDιalog_ComponentShow (event) ; } } void LogLevelDιalog_ComponentShown ( ava. awt .event .ComponentEvent event) {
void LogLevelDιalog_WmdowOpened (java . awt . event . indowEvent event) { getscheck. setState ( Debug. LogGETs) ; logiccheck. setState ( Debug. LogCache) ; headerscheck. setState ( Debug. LogHeaders) ; timingcheck. setState ( Debug. ogTiming) ; fullpathCheckbox. setState (Debug. COMPRESS) ; } void button2_ActιonPerforme (java.awt . event.ActionEvent event) { try { this .dispose ( ) ; } catch (Exception e) {
void button3_Act onPerformed (java. wt .event .ActionEvent event) {
Debug. LogGETs=getscheck. getState () ;
Debug. LogCache=logιccheck. getState () ;
Debug. LogHeaders=headerscheck. getState () ;
Debug. COMPRESS=fullpathCheckbox. getState () ;
//Debug. LogHeaders=tιmmgcheck. getState ( ) ;
void LogLevelDιalog_WmdowClosed ( java . awt . event . WindowEvent event)
PCT Application Docket A-027, Office ofChas.G. Call, Reg. No.20,406, Appendix- Page 34 of 156 // to do: code goes here. } class Symltem implements java.awt .event . ItemListener { public void itemStateChangedtjava.awt . event . ItemEvent event) {
Object object = event . getSource () ; if (object ===== fullpathCheckbox) fullpathCheckbox_ItemStateChanged(event) ; } } void fullpathCheckbox_ItemStateChanged (java . awt . event . ItemEvent event ) {
// to do: code goes here.
Debug . FULLPATHS = fullpathCheckbox. getState () ; } s tat ic j ava . util . ResourceBundle logLevelDialogBundle java. util .ResourceBundle. getBundle ("LogLevelDialogBundle") ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 35 of 156 public class LogLevelDialogBundle extends java .util. ListResourceBundle { public Object[][] getContents () { return contents;
static final Object!] [] contents = {
//Changing tags in the following block will //break the parsing of the related file //{{Start Automatic Code Generation Block ;"labell_text", " Log Options"},
'borderPanell_label", ""}, ( "timingcheck_label", "Timing, statistics info"},
"headerscheck_label", "Print HTTP headers"},
'logiccheck_label", "Trace cache logic flow"},
'getscheck_label", "GET requests, server Responses, 304 responses"},
"fullpathCheckbox_label", "Display full pathnames"}, ! "checkboxl_label", "Show Exceptions"}, !"buttonl_label", "OK"},
"button2_label", "Cancel"}, ["button3_label", "Apply"},
("LogLevelDialog_title", "WWWhoosh Log Levels"}, //}}End Automatic Code Generation Block
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 36 of 156 import java.net.*, import java 10.*; import COM. eitshamer.http. OCDResponse; import COM. reitshamer. erro . *, import COM. reitshamer .util . *, import COM.reitshamer.de.*;
/********************************* OCDReade Thread *************************************/
//
// Θauthor Mark Palmer
// Θversion 0.1 - initial beta release, l-JUL-1999
//
// Modifications:
//
//
/* * * * * ** *** * * * * ** ** * * ** * * * * * **** * * OCDReaderThread ***************************************/
/*
* Θ put _sock Socket that the incoming request is coming on
* Θinput ocdr - the OCD Response to be processed via this socket */ public class OCDReaderThread extends Thread { private Socket sock; private OCDResponse _ocdr; public OCDReaderThread (Socket _sock, OCDResponse ocdr) { super ( ) ; sock = _sock;
_ocdr = ocdr;
//{ { INIT_CONTROLS //}} } public void ru ( ) { try {
_ocdr. read (sock) ; } catch (HmrException e) {
Debug. forceprint ("OCD reader thread exception: \n " + e .getMessage () ), try { sock close ( ) ; > catch (IOException loe) {} } }
// { { DECLARE_CONTROLS //}}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 37 of 156 import WWWhooshCommon. * ; import java.awt.*; import java.util .Hashtable; import COM. reitshamer .util . *; import COM.reitshamer.net.*; import COM. reitshamer .error . *; import COM. reitshamer.http. *, import COM. eitshamer .proxy. *; import java.util .Date; import ava.io.*, import Symantec . itools . awt . BorderPanel ; import Symantec. itools .awt . ImageButton; ********************************* PROXY GUI *************************************/
//
// Θauthor Mark Palmer
// Θversion 2.0 - GUI revision
//
// Modifications:
//
// Build Date Description
//
//
// 1.995 02-Aug-1999 disabled GUI stats update to improve performance
//
//
// 2.0 04-Aug-1999 GUI rework - remove stats and log to separate frames
// redesign ma panel
//
// 2.80 ll-Aug-1999 add freestanding logger frame
// add freestanding stats frame
//
// 3.0 19-Aug-99 introduce new file format starting with header
//
//
/********************************* PROXY GUI ****************************+*********/ public class ProxyGUI extends Frame
{ private static Date lastOCFileDate = null; private static OCCache _masterCache = new OCCache ( ) ;
NetListener svr=null; private StatsUpdateThread _supdater==null; private StatsFrame _statsframe = null; private LoggerFrame _loggerframe = null; public ProxyGUI () {
//{{INIT_CONTROLS setLayout (null ) ; setBackground (java. awt .Color. lightGray) ; setSize (382,171) ; setVisible (false) ; openFileDialogl.setMode (FileDialog.LOAD) ; openFileDialogl . setTitle ( "Open" ) ;
//$$ openFileDialogl. ove (176, 200) ; try { borderPanel6. setBevelStyle (Symantec . ltools . awt . BorderPanel . BEVEL_RAISED) ; } catch (java. beans . PropertyVetoException e) { } borderPanelβ. setLayout (null) ; add (borderPanelβ) ; borderPanelδ. setBounds (292,-4, 92, 168) ; button2. setLabel ( "Loopback" ) ; borderPanel6. add (button2) ; button2. setFont (new Font ("Dialog", Font. PLAIN, 12)); button2. setBounds (2, 8, 68,16) ; button3. setLabel ("Whooshl") ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 38 of 156 borderPanel6.add(button3) ; button3. setBackground (new Java. awt .Color (102, 153, 153) ) ; button3. setFont (new Font ("Dialog", Font. PLAIN, 12)); button3. setBounds (2,24, 68, 16) ; button7. setLabel ("Whoosh2") ; borderPanel6.add(button7) ; button7. setBackground (new java . awt .Color (102, 153, 153) ) ; button7.setFont (new Font ("Dialog", Font. PLAIN, 12)); button7.setBounds (2,40, 68, 16) ; button8. setLabel ("Reset") ; borderPanel6.add(button8) ; buttonδ . setFont (new Font ("Dialog", Font. PLAIN, 12)); buttonδ. setBounds (2, 56, 68,16) ; button . setLabel ( "Statistics" ) ; borderPanel6.add(button9) ; button9. setBounds (2, 84, 68,16) ; button5. setLabel ("Clear Stats") ; borderPanel6. add (button5) ; button5. setFont (new Font ("Dialog", Font. PLAIN, 12)); buttonδ. setBounds (2, 100, 68,16) ; buttonl . setLabel ("Logging ") ; borderPanelδ. add (buttonl) ; buttonl. setFont (new Font ("Dialog", Font. PLAIN, 12)); buttonl. setBounds (2,124, 68, 16) ; try { borderPanellO . setBevelStyle (Symantec . itools . aw . BorderPanel .BEVEL_RAISED) ; } catch ( ava. beans . PropertyVetoException e) { } borderPanellO .setLayout (null) ; add (borderPanellO) ; borderPanellO. setBounds (0, -4,296, 168) ; try { borderPanel2. setBevelStyle (Symantec. itools. wt .BorderPanel. BEVEL_NONE) ; ) catch (java. beans . PropertyVetoException e) { } try { borderPanel2. setLabelColor (java.awt .Color .green) ; } catc (java. beans . PropertyVetoException e) { } borderPanel2. setLayout (null) ; borderPanellO . add (borderPanel2 ) ; borderPanel2.setBackground (java. awt. Color. black) ; borderPanel2.setBounds(142,4,136, 140) ; labelll . setText ( "Bytes Saved" ) ; borderPanel2.add(labelll) ; labelll .setForeground)java. awt .Color .green) ; labelll. setFont (new Font ("Dialog", Font. PLAIN, 14)); labelll. setBounds (2, 7, 96,24) ; BwPctLabel. setText ("0 %"); borderPanel2.add(BwPctLabel) ;
BwPctLabel . setForeground (java.awt .Color. green) ; BwPctLabel. setFont (new Font ("Dialog", Font. PLAIN, 20)); BwPctLabel. setBounds (2,32, 112,24) ; labell2. setText ("Packets Saved") ; borderPanel2.add(labell2) ; label1 . setForeground (java. awt. Color. green) ; labell2. setFont (new Font ("Dialog", Font. PLAIN, 14)); labell2. setBounds (2, 68,99,21) ; ReqPctLabel. setText ("0 %"); borderPanel . add (ReqPctLabel ) ;
ReqPctLabel . setForeground (java.awt .Color .green) ; ReqPctLabel. setFont (new Font ("Dialog", Font. PLAIN, 20)); ReqPctLabel. setBounds (2, 92, 112,24) ; try { borderPanel5. setBevelStyle (Symantec . itools . awt . BorderPanel . BEVEL_NONE) ; catch (java. beans. PropertyVetoException e) { } borderPanel5. setLayout (null ) ; borderPanellO. add (borderPanel5) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 39 of 156 borderPanel5. setBackgroun (j ava . awt . Color. black) ; borderPanelδ. setBounds (2, 4, 140, 140) ; loadTimeLabel. setText ("0 s"); borderPanel5. add (loadTimeLabel ) ; loadTimeLabel . setForegroun ( j ava . awt . Color . green) ; loadTimeLabel. setFont (new Font ("Dialog", Font. PLAIN, 20)); loadTimeLabel. setBounds (-1, 32, 112, 24) ; labell4.setText ("Load Time "); borderPanel5.add(labell4) ; labell4. setForeground ( ava.awt. Color. green) ; labell .setFont (new Font ("Dialog", Font. PLAIN, 14)); labell4. setBounds (0,7, 108, 24) , try { borderPanel7. setBevelStyle (Symantec. ltools .awt . BorderPanel .BEVEL_RAISED) ; } catch (java.beans . PropertyVetoException e) { ) borderPanel7.setLayout (null) ; borderPanel5. add (borderPanel7 ) ; borderPanel7. setBounds (-90, 140, 80, 28) , labellO. setText ("Wwwhoos 1 ") ; borderPanel5.add(labell0) ; labellO . setForeground (java.awt. Color .green) ; labellO. setFont (new Font ("Dialog", Font. ITALIC, 16)); labellO. setBounds (-1, 68, 99, 21) ; t eLabel . setText ("Time : ") ; borderPanel5.add (timeLabel) ; timeLabel. setForeground (java. awt .Color .green) ; timeLabel. setBounds (0, 94,139,21) ; try { borderPanel8. setBevelStyle (Symantec . ltools . awt . BorderPanel .BEVELJTONE) ; } catch (java. beans . PropertyVetoException e) { } borderPanelδ. setLayout (null) ; add(borderPanel8) ; borderPanelδ . setBackgroun (new java.awt .Color (128, 0, 64)); borderPanelδ. setBounds (6, 80,124, 40) ; try { borderPanel4. setBevelStyle (Symantec. itools. awt. BorderPanel. BEVEL_RAISED) ;
> catch (java. beans . PropertyVetoException e) { } borderPanel4.setLayout (null) ; borderPanelδ . add (borderPanel4 ) ; borderPanel4. setBounds (-90, 140, 80,28 ); setTitle ("WWWhoosh1 Client");
//}}
//{{INIT_MENUS enul. setLabel ("File") ; menul .add(newMenuItem) ; newMenuItem. setLabel ( "New" ) ; newMenuItem. setShortcut (new MenuShortcut (java.awt .event. KeyEvent .VK_N, false) ) ; menul. add (openMenuItem) ; openMenuItem. setLabel ("Open... ") ; openMenuItem. setShortcut (new MenuShortcut (java.awt .event .KeyEvent .VK_0, false) ) ; menul. add (saveMenuItem) ; saveMenuItem. setLabel ("Save") ; saveMenuItem.setShortcut (new MenuShortcut (java. awt. event. KeyEvent.VK_S, false) ) ; menul .add (saveAsMenuItem) ; saveAsMenuItem. setLabel ( "Save As... ") ; menul . add ( separatorMenuItem) ; separatorMenuItem. setLabel ( "-" ) ; menul. add (exitMenuItem) ; ' exitMenuItem. setLabel ( "Exit" ) ; mamMenuBar. add (menul) ; menu4. setLabel ("Ed t") ; menu4.add(menultem3) ; menultem3. setLabel ("Logging Options") ; menu .add (ConnectionMenuItem) ;
ConnectionMenuIte . setLabel ("Connection Options") ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 40 of 156 menu4. add (menulteml ) ; menulteml. setLabel ("Functional Options") ; mainMenuBar . add (menu4 ) ; menu . setLabel ( "View" ) ; menu2. add (menultem2 ) ; menultem2. setLabel ( "Logging Window" ) ; menu . add (menultem4 ) ; menultem4. setLabel ("Statistics Window") ; mainMenuBar . add (menu2 ) ; menu3. setLabel ( "Help" ) ; menu3.add(aboutMenuItem) ; aboutMenuItem. setLabel ("About...") ; mainMenuBar. add (menu3) ;
//$$ mainMenuBar. move (20, 198) ; setMenuBa (mainMenuBar) ;
//}}
//{ {REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow ( ) ; this . addWindowListener (aSymWmdow) ; SymAction lSymAction = new SymAction () ; openMenuItem. addActionListener (lSymAction) ; exitMenuItem. addActionListener (lSymAction) ; aboutMenuItem. addActionListener (lSymAction) ; button3. addActionListene (lSymAction) ; buttonl . addActionListene (lSymAction) ; button2. addActionListener (lSymAction) ; menultem3. addActionListener (lSymAction) ; buttonδ . addActionListener (lSymAction) ; ConnectionMenuItem. addActionListener (lSymAction) ; button7.addActionListener (lSymAction) ; button8.addActionListener (lSymAction) ; button9.addActionListener (lSymAction) ; menulteml . addActionListener (lSymAction) ; menultem2. addActionListener (lSymAction) ; menultem4. addActionListener (lSymAction) ; //}} try {
//TODO: Remove hardcoded pathname!
FileOutputStream bid = new FileOutputStream( "ClientBuild. java") ;
String verstring = "public class ClientBuild (public static int NUMBER= (ClientBuild. UMBER+1) + " ; }"; bid. rite (verstring . getBytes ( ) ) ; bid. close ( ) ; } catch (IOException loe)
{System, out .prmtln (ioe) ; } } public ProxyGUI (String title) { thisO ; setTitle (title) ; }
/* *
* Shows or hides the component depending on the boolean flag b.
* @param b if true, show the component; otherwise, hide the component.
* @see ava. awt .ComponentlisVisible */ public void setVisible (boolean b) {
//Force resize in spite of VCafe //setResizable (true) ; if (b)
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 41 of 156 setLocation (50, 50);
} super. setVisible (b) ;
} static public void mam (String args [ ] ) { try {
//Create a new instance of our application's frame, and make it visible. ProxyGUI ySvr = new ProxyGUI () ; mySvr .setVisible (true) ; ySv . imt ( ) ;
Counters . setLoopbac (false) ; } catch (Throwable t) (
System. err. println (t) ; t . pπntStackTrace ( ) ;
//Ensure the application exits with an error condition. System. exit (1) ; }
}
//
// Update GUI with latest statistics info no more often than limit interval
// public synchronized void setStatsO
{
//update mam panel int approx_bytessaved = Counters. OK_304 * 700; double pctsaved = (approx_bytessaved * 100.0) / (Counters . getBytesIn() + Counters . getBytesOut ( ) ) ; if (pctsaved > 0.0) {
String si = new Double (pctsaved) . toString ( ) + " ", BwPctLabel. setText (si. substring (0, 5) + " % "); } double reqsaved = (Counters .OK_304*1000.0) / (Counters. GETS_OUT*10.0) ; if (reqsaved > 0.0) {
String s2 == new Double (reqsaved) . toString ( ) + " "; ReqPctLabel. setText ( s2. substring (0, 5) + " % "); } double loadt = Counters. getLastEventlnterval () / 1000.0; String s3 = new Double (loadt) . toString () + " "; loadTimeLabel. setText ( s3. substring (0, 4) + " s" ); timeLabel. setText (new Date (). toGMTString ( ) ); f (_statsframe == null) return; if (_statsframe. isShowing () ) statsframe. setStats () ;
public void mit ( ) throws Exception {
LocalServiceFactory localFactory == new LocalServiceFactory () ; Debug. setTextArea (_textAreal) ; //set up global ref to logger window
//logger frame takes its text area from here //NO need for this factory stuff in Java1 ' MLP
//Pass file/date table to new instances of http proxy service for now HttpProxyService httpSvc == new HttpProxyService (_masterCache,
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 42 of 156 lastOCFileDate, localFactory. addService (httpSvc) ;
Debug . textout . setText ( "" ) ;
Debug. textout. append ("Proxy listening on port " + Debug. listenPort + " at " + new Date (). oGMTString ( ) + "\n");
//
// Start a NetListener. if
Figure imgf000057_0001
svr = new NetListener (Debug. listenPort, localFactory, new HttpTrans () ) , svr. start ( ) ; supdater = new StatsUpdateThread(thιs) ; _supdater . start ( ) ;
} public void addNotify () {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSizeO; super. addNotify () ; if (fComponentsAdjusted) return;
// Adjust components according to the msets setSize (getlnsets () .left + getlnsets () .right + d. idth, getlnsets () .top + getlnsets () .bottom + d. height) ;
Component components [ ] = getComponents ( ) ; for (int ι = 0; I < components . length; ι++) {
Point p = components [I] .getLocation () ; p. translate (getlnsets () .left, getlnsets ( ) . top) ; components [ι] . setLocation (p) ; } fComponentsAdjusted = true; }
// Used for addNotify check, boolean fComponentsAdjusted = false;
Figure imgf000057_0002
= new java.awt .TextArea () ;
// { { DECLARE_CONTROLS java.awt . FileDialog openFileDialogl == new java.awt. FileDialog (this) ;
Symantec. itools .awt .BorderPanel borderPanel6 = new Symantec. tools. awt. BorderPanel () ; ava.awt .Button button2 = new java.awt .Button ( ava.awt .Button button3 = new java.awt .Button ( java.awt .Button button7 = new j va.awt .Butto ( java.awt .Button buttonδ = new j va.awt .Button ( ) java.awt .Button button9 = new java.awt .Button ( ava.awt .Button buttonδ = new java.awt .Button ( java.awt .Button buttonl = new j va.awt .Button (
Symantec. itools .awt. BorderPanel borderPanellO = new Symantec . ltools . awt . BorderPanel () i
Symantec. ltools .awt .BorderPanel borderPanel2 = new Symantec. ltools. awt .BorderPanel () ; java. awt .Label labelll = new java . awt . Label () ; java. awt .Label BwPctLabel = new java.awt .Label () ; java.awt .Label labell2 == new java. awt .Label () ; java.awt .Label ReqPctLabel = new java.awt . abel () ;
Symantec. itools .awt .BorderPanel borderPanel5 = new Symantec. itools .awt .BorderPanel () , java. awt .Label loadTimeLabel - new java. awt .Label () ; java.awt .Label labell4 = new java . awt . Label () ;
Symantec. ltools .awt. BorderPanel borderPanel7 = new Symantec. itools. awt .BorderPanel () ; java. awt .Label labellO = new java. awt. Label () ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 43 of 156 java. awt. abel timeLabel = new java. awt. abel 0 ;
Symantec. itools. wt. BorderPanel borderPanelδ = new Symantec. ltools . awt .BorderPanel () ,
Symantec. ltools .awt .BorderPanel borderPanel4 = new Symantec. ltools . awt .BorderPanel 0
//})
// { {DECLARE_MENUS java.awt .MenuBar mainMenuBar = new ava .awt .MenuBar () ; java. awt. enu menul = new ava.awt .Menu () , java. awt.Menultem newMenuItem = new java.awt .Menultem( ) ; java . awt .Menultem openMenuItem = new java.awt .MenuItemO ; java. awt. enultem saveMenuItem = new java.awt .MenuItemO ; ava. awt .Menultem saveAsMenuItem = new java. awt .Menultem( ) , java. wt .Menultem separatorMenuItem = new java.awt .MenuItemO ; java. awt.Menultem exitMenuItem = new java.awt .MenuItemO ; java. awt.Menu menu4 - new java. wt .Menu () ; ava. awt. enultem menultem3 = new java.awt . Menultem ( ) ; java . awt.Menultem ConnectionMenuItem = new java.awt .MenuItemO ; java.awt .Menultem menulteml = new ava.awt .Menulte () ; java . awt .Menu menu2 == new java. awt .Menu ( ) ; java.awt .Menultem menultem2 = new ava.awt .Menulteml ) ; java.awt .Menultem menultem4 = new ava.awt .Menulteml ) ; java. awt. enu menu3 = new java. awt .Menu () ; java.awt .Menultem aboutMenuItem = new java. awt. Menultem ( ) ;
//}} class SymWindow extends java . awt . event .WindowAdapter { public void windowClosing (java . awt . event .WindowEvent event) (
Object object = event .getSource () ; if (object == ProxyGUI. this)
Framel_WmdowClosmg (event) ; } } void Framel_WιndowClosmg (java.awt .event .WindowEvent event) {
// to do: code goes here.
Framel_WmdowClosmg_Interactιonl (event) ;
void Framel_WmdowClosmg_Interactιonl ( ava.awt. event .WindowEvent event) { try {
// QuitDialog Create and show as modal (new QuitDialog (this, true) ). setVisible (true) ; } catch (Exception e) { }
class SymAction implements ava. awt. event .ActionListener < public void actionPerformed ( java . awt. event. ActionEvent event) {
Object object = event .getSource () ; if (object == openMenuItem) openMenuItem_ActιonPerformed (event) ; else if (object == aboutMenuItem) aboutMenuItem_ActιonPerformed (event) ; else if (object == exitMenuItem) exιtMenuItem_ActιonPerformed (event) ; else if (object == button3) button3_ActιonPerformed (event) ; if (object == buttonl) buttonl ActionPerformed (event ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 44 of 156 else if (object == button2) button2_ActιonPerformed (event) ; // else if (object == button4)
// button4_ActιonPe ormed (event) ; else if (object == menultem3) menuIteιrι3_ActιonPerformed (event) , else if (object == button5) button5_ActιonPerformed (event) ; // else if (object == buttonδ)
// button6_ActιonPerformed (event) ; else if (object == ConnectionMenuItem)
ConnectιonMenuItem_ActιonPerformed (event) ; else if (object == button7) button7_ActιonPerformed (event) ; else if (object == buttonδ) button8_ActιonPerformed (event) ; else if (object == menulteml) menuIteml_ActιonPerforme (event) , else if (object ===== button9) button9_ActιonPerformed (event) ; else if (object == menultem2) menuItem2_ActιonPerforme (event) , else if (object == menultem4) menuItem4_ActιonPerformed (event) ,
} } void openMenuItem_ActιonPerformed ( ava.awt .event .ActionEvent event) {
// to do: code goes here. openMenuItem_ActιonPerformed_Interactιonl (event) ; } void openMenuItem_ActιonPerformed_Interactιonl (java .awt. event .ActionEvent event)
{ try {
// OpenFileDialog Create and show as modal int defMode = openFileDialogl. getMode 0 ;
String defTitle = openFileDialogl. getTitle () ;
String defDirectory = openFileDialogl . getDirectory () ,
String defFile = openFileDialogl . getFile () ; openFileDialogl = new ava. awt . FileDialog (this, defTitle, defMode); openFileDialogl . setDirector (defDirectory) , openFileDialogl . setFile (defFile) ; openFileDialogl . setVisible (true) ; } catch (Exception e) {
void aboutMenuItem_ActιonPerforme (java.awt . event.ActionEvent event) { aboutMenuItem ActionPerformed Interaction! (event) ;
void exιtMenuItem_ActιonPerformed (java. awt .event.ActionEvent event) {
// to do- code goes here. exιtMenuItem_ActιonPerformed_Interactιonl (event) ;
) void exιtMenuItem_ActιonPerformed_Interactιonl (j va. awt. event .ActionEvent event)
{
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 45 of 156 try {
// QuitDialog Create and show as modal
(new QuitDialog (this, true) ) .setVisible (true)
} catch (Exception e) {
}
void button3_ActionPerformed (java.awt . event .ActionEvent event)
{ if (! Debug. PASSTHRU )
{
Debug . PASSTHRU=true ; button3. setBackground (Color . lightGray) ;
//Make sure OCD processing is shut off too since it depend on OC button7. setBackground (Color. lightGray) ; Debug. WWhoosh2=false; //java.awt . Toolkit tk = new java. awt .Toolkit 0 ; //tk.beep ; } else
{ button3. setBackground (new Color (102, 153, 153) ) ; Debug. PASSTHRU=false; } } void buttonl_ActionPerformed (java.awt . event .ActionEvent event) {
// to do: code goes here. if (Debug. TOUT) { Debug. off () ; buttonl . setBackground (Color. lightGray ) ; Debug. forceprint ("\n" + "Logging stopped at " + new Date 0.toGMTString () ) ;
} else {
Debug. on ( ) ;
//buttonl . setBackground (new Color ( 102,153,153 ) ) ; Debug. forceprint ("\n" + "Logging started at " + new Date () .toGMTString ( ) + "\n" );
} buttonl_ActionPerformed_Interactionl (event) ; } void button2_ActionPerformed (java.awt . event .ActionEvent event) { if (Counters .getLoopbac 0 ) { Counters . setLoopback( false) ; button2. setBackground (Color. lightGray) ; } else {
Counters .setLoopbac (true) ; button2. setBackground (new Color (102, 153, 153) ); 1 }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 46 of 156 void button4_ActιonPerformed(java. awt.event.ActionEvent event)
{
Debug. textout . setText (" ") ;
void Lo_ActιonPerformed (java. awt .event .ActionEvent event) {
// to do: code goes here.
Lo_ActιonPerformed_Interactιonl (event) ; } void Lo_ActιonPerformed_Interactιonl (java . awt . event .ActionEvent event) { try {
// LogLevelDialog Create and show as non-modal (new LogLevelDialog (this, false) ). setVisible (true) ; } catch (Exception e) { } } void menuItem3_ActιonPerformed (java. awt. event.ActionEvent event) {
// to do: code goes here. menuItem3_ActιonPerformed_Interactιonl (event) ; } void menuItem3_ActιonPerformed_Interactιonl (java.awt . event .ActionEvent event) { try {
// LogLevelDialog Create and show as modal (new LogLevelDialog (this, true) ). setVisible (true) ; } catch (Exception e) { } } void button5_ActιonPerformed (java. awt .event .ActionEvent event) {
Counters . reset ( ) ; setStats () ;
BwPctLabel. setText ("0 "); loadTimeLabel. setText ( "0 s" ); ReqPctLabel. setText ("0 %"); } void aboutMβnuItem_ActιonPerformed_Interactιonl (java. awt .event .ActionEvent event) { try {
// AboutDialog Create and show as non-modal (new AboutClientDialog (this, false) ). setVisible (true) ; } catch (Exception e) {
void ConnectιonMenuItem_ActιonPerformed (java . awt . event . ActionEvent event) {
// to do: code goes here.
ConnectιonMenuItem_ActιonPerformed_Interactιonl (event) ;
} void ConnectιonMenuItem_ActιonPerformed_Interactιonl (java.awt . event .ActionEvent event) { try {
// ConnectionDialog Create and show as modal (new ConnectionDialog (this, true) ). setVisible (true) ; } catch (Exception e) {
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 47 of 156 } void button7_ActionPerformed (java. awt. event. ActionEvent event)
{ if ( (Debug.WWWhoosh2==false) && ( ! Debug. PASSTHRU ) ) { Debug . WWWhoosh2=true; button7. setBackground) new Color (102, 153, 153) );
//java.awt .Toolkit tk = new java. wt .Toolkit () ;
//tk.beepO ; } else { button7. setBackground (Color. lightGray) ; Debug . WWWhoosh2=false ; } } void button8_ActionPerformed (java.awt . event .ActionEvent event)
{
_masterCache . clearCaches ( ) ;
Debug. print (1, "CACHE CONTENTS ERASED" ) ;
//_statswin. toFront ( ) ;
) void menuIteml_ActionPerformed (java .awt. event .ActionEvent event) ( menuIteml_ActionPerformed_Interactionl (event) ; } void menuIteml_ActionPerformed_Interactionl (java.awt . event .ActionEvent event) { try {
// FeatureDialog Create and show as modal (new FeatureDialog (this, true) ). setVisible (true) ; } catch (Exception e) { ) } void buttonl_ActionPerformed_Interactionl (java.awt .event.ActionEvent event) { if ( (_loggerframe != null) && ( _loggerframe. isShowingO ) ) return; try {
// LoggerFrame Create and show the LoggerFrame _loggerframe = new LoggerFrame () ; _loggerframe . setVisible (true) ;
// buttonl. setBackground (new Color ( 102,153,153 )); } catch (Exception e) { } } void button9_ActionPerformed (java.awt .event .ActionEvent event) {
// to do: code goes here. button9_ActionPerformed Interactionl (event) ; } void button9_ActionPerformed_Interactionl (java. awt. event.ActionEvent event)
{ if ( ( statsframe != null) && ( _statsframe. isShowing () ) )
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 48 of 156 {
_statsframe. hide ( ) ; return;
}; try {
// StatsFrame Create and show the StatsFrame
_statsframe = new StatsFrame () ,
_statsframe. setVisible (true) ; } catch (Exception e) { } void menuItem2_ActιonPerformed(java. awt. event .ActionEvent event) {
// to do: code goes here. menuItem2_ActιonPerformed_Interactιonl (event) ; } void menultem4_ActιonPerformed (java . awt . event . ActionEvent event) {
// to do: code goes here. menuItem4_ActιonPerformed_Interactιonl (event) ; } void menuItem4_ActιonPerformed_Interactιonl (java.awt . event .ActionEvent event) { try {
// StatsFrame Create and show the StatsFrame _statsframe = new StatsFrame () ; _statsframe. setVisible (t ue) ; } catch (Exception e) { } } void menuItem2_ActιonPerformed_Interactιonl ( ava.awt . event .ActionEvent event) { if ( (_loggerframe '= null) & & ( _loggerframe. isShowing () ) ) return; try {
// LoggerFrame Create and show the LoggerFrame _loggerframe = new LoggerFrame 0 ; _loggerframe. setVisible (true) ; //buttonl. setBackgroun (new Color ( 102,153,153 )); } catch (Exception e) { }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 49 of 156 public class ProxyGUIBundle extends java . util . ListResourceBundle
{ public Object!]!] getContents () { return contents;
} static final Object [][] contents = {
//Changing tags n the following block will //break the parsing of the related file //{{Start Automatic Code Generation Block "openFιleDιalogl_tιtle", "Open" } , "openFιleDιalogl_dιrectory", ""}, "openFιleDιalogl_fιle", ""}, "button2_label", "Loopback: OFF"}, "button3_label", "WWWhoosh! : ON"}, "button4_label", "Clear Log"}, "buttonl_label", "Logging: OFF"}, "borderPanell_label", ""}, "labell_text", "HTTP Requests:"}, "label8_text", "HTTP Forwarded:"}, "getsInLabel_text", "000"}, "getsOutLabel_text", "000"}, "label3_text", "GET ms:"}, "RTmsLabel_text", "000"}, "bytesSentLabel_text", "000"}, "bytesRxLabel_text", "000"}, "label4_text", "Bytes sent:"}, "label5_text", "Bytes received:"}, "label2_text", "HTTP Resolved:"}, "ACKLabel_text", "000"}, "eventElapsedLabel_text", "000"}, "label6_text", "WWWhoosh-2 read: "}, "WWWhoosh2byteslabel_text", "000"}, "label7_text", "Load Time ms"}, "textAreal_text", ""}, "button5 Label", "Clear Stats"},
"button6_label" , "File out: OFF"}, "button7_label" , "WWWhoosh2: ON"}, "button8_label" , "Reset Caches"}, "button9 label" , "Statistics"}, "ProxyGUI_tιtle", "WWWhoosh Proxy"}, "menul_label", "File"}, "newMenuItem_label", "New"}, "openMenuItem_label", "Open... "} , "saveMenuItem_label", "Save" } , "saveAsMenuItem_label", "Save As..."}, "separatorMenuItem_label", "-" } , "exιtMenuItem_label", "Exit" } , "menu4_label", "Edit"}, "menultem3_label", "Logging Options"}, "ConnectιonMenuItem_label", "Connection Options"}, "menulteml_label", "Functional Options"}, "menu3_label", "Help"}, "aboutMenuItem_label", "About..."}, //}}End Automatic Code Generation Block
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 50 of 156 /*
A basic extension of the java . awt . Dialog class */ import ava.awt.*; import java.awt .event . *; import Symantec . ltools . awt . BorderPanel; public class QuitDialog extends Dialog { public QuitDialog (Frame parent, boolean modal)
{ super (parent, modal);
//Keep a local reference to the invoking frame frame = parent;
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{{INIT_CONTROLS setLayout (null) ; setBackground ( ava.awt .Color. lightGray) ; setSιze(246,130) ; setVisible (false) ; try { borderPanell . setBevelStyle (Symantec . itools . awt . BorderPanel . BEVEL_RAISED) } catch ( ava. beans . PropertyVetoException e) { } borderPanell .setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (7,6, 239, 95) ; labell setTextC'Do you really want to exit?"); labell . setAlignment (java . awt . Label . CENTER) ; borderPanell. add (labell) ; labell. setBounds (22, 6, 168, 23) ; noButton setLabel (" No ") ; add(noButton) ; noButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); noButton. setBounds (170, 101, 64,20) ; yesButton. setLabel (" Yes ") ; add(yesButton) ; yesButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); yesButton. setBounds (104, 101, 64,20) ; setTitle ("Exit WWWhoosh Client"); //}}
//{ {REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow ( ) ; this.addWmdowListener (aSymWmdow) ; SymAction lSymAction = new SymAction () ; noButton. addActionListener (lSymAction) ; yesButton addActionListene (lSymAction) ; //}} } public void addNotify!) {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSizeO; super.addNotify () ; if (fComponentsAdjusted) return;
// Adjust components according to the sets
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 51 of 156 setSize (getlnsets .left + getlnsetsO .right + d. idth, getlnsetsO .top + getlnsetsO .bottom + d. height) ;
Component components!] = getComponents ( ) ; for (mt ι = 0; i < components . length; ι++) {
Point p = components [I] .getLocation () ; p. translate (getlnsets ( ) . left, getlnsets ( ) . top) ; components [i] .setLocation (p) ; } fComponentsAdjusted = true; } public QuitDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } **
* Shows or hides the component depending on the boolean flag b.
* @param b if true, show the component; otherwise, hide the component.
* @see java.awt .Component#isVιsible */ public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent () .getBounds () ; Rectangle abounds = getBounds () ; setLocation (bounds .x + (bounds .width - abounds .width) / 2, bounds. y + (bounds .height - abounds .height) /2) ; Toolkit. getDefaultToolkit () .beepO ; } super. setVisible (b) ; }
// Used for addNotify check, boolean fComponentsAdjusted = false; // Invoking frame Frame frame = null;
/ / { { DECLARE_CONTROLS
Symantec. ltools . awt .BorderPanel borderPanell = new Symantec. ltools .awt .BorderPanel () ; java.awt . Label labell = new java. awt . Label () ; ava.awt .Button noButton = new java.awt .Button () ; java.awt .Button yesButton = new java.awt .Button () ;
//}} class SymAction implements java .awt .event. ActionListener { public void actionPerformed ( java.awt .event .ActionEvent event) {
Object object = event . getSource () ; if (object == yesButton) yesButton_ActιonPerformed (event) ; else if (object == noButton) noButton_ActιonPerformed (event) ; } } void yesButton_ActιonPerforme (java.awt .event .ActionEvent event) {
// to do: code goes here. yesButton ActionPerformed Interaction! (event) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 52 of 156 void yesButton_ActιonPerformed_Interactιonl ( ava . wt . event .ActionEvent event) { try { frame . setVisible (false) ; // Hide the invoking frame frame dispose ( ) ; // Free system resources this .dispose ( ) ; // Free system resources System.exit (0) ; // close the application catch (Exception e) {
void noButton_ActιonPerformed ( java. awt. event .ActionEvent event) {
// to do: code goes here. noButton_ActιonPerformed_Interactιonl (event) , } void noButton_ActιonPerformed_Interactιonl (j va.awt .event .ActionEvent event) { try { this. dispose () ;
} catch (Exception e) {
}
class SymWindow extends ava. awt. event .WindowAdapter { public void windowClosing (java. awt. event. indowEvent event) {
Object object = event. getSource 0 ; if (object == QuitDialog. this)
QuιtDιalog_WιndowClosιng (event) ;
void QuιtDιalog_W ndowClosmg (java.awt . event .WindowEvent event) {
// to do: code goes here.
QuιtDιalog_WmdowClosmg_Interactιonl (event) ;
) void QuιtDιalog_WιndowClosmg_Interactιonl (java. awt .event .WindowEvent event) { try { this dispose ( ) ;
} catch (Exception e) {
} ) s t a t i c j ava ut i l . Re s ou rc eBund l e qu i t D i a l o gBund l e j ava . util . ResourceBundle . getBundle ( "QuitDialogBundle" ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 53 of 156 public class QuitDialogBundle extends java.util . ListResourceBundle { public ObjectUπ getContents ()
{ return contents;
} static final Object [][] contents = {
//Changing tags in the following block will
//break the parsing of the related file
//{{Start Automatic Code Generation Block
{"yesButton_label", " Yes "},
{"noButton_label", " No "},
{"labell_text", "Do you really want to exit?"},
{ "QuitDialog_tιtle", "Exit WWWhoosh Client"},
//}}End Automatic Code Generation Block };
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 54 of 156 /*
A basic extension of the java.awt . Frame class
*/ import java.awt.*; import Symantec. ltools. awt .BorderPanel; import COM. reitshamer .util . Counters;
public class StatsFrame extends Frame { public StatsFrame () {
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{{INIT_CONTROLS setLayout (null) ; setBackground (java.awt. Color. lightGray) ; setSιze(373,187) ; setVisible (false) ; buttonl. setLabel ("Close") ; add (buttonl) ; buttonl. setBounds (289, 158, 64, 20) ; button2. setLabel ( "Clear" ) ; add(button2) ; button2. setBounds (225,158, 64,20) ; try { borderPanell . setBevelStyle (Symantec . itools . awt . BorderPanel . BEVEL_RAISED) ) catch ( ava.beans . PropertyVetoException e) { } try { borderPanell. setIPadBottom(4) ; } catch (java.beans . PropertyVetoException e) { } try { borderPanell. setLabel ("Statistics") ; ) catch (java.beans . PropertyVetoException e) { } try { borderPanell . setPaddingRight ( 4 ) ; } catch (java. beans . PropertyVetoException e) { } try { borderPanell. setPaddιngBottom(4) ; 1 catch (java.beans. PropertyVetoException e) { } try { borderPanell . setPaddingTo (4) ; } catch(java. beans . PropertyVetoException e) { } try { borderPanell. setPaddingLeft (4) ; } catch (java. beans . PropertyVetoException e) { } try { borderPanell . setAlignStyle (Symantec . itools . awt . BorderPanel . ALIGN_LEFT) ; } catch (java. beans . PropertyVetoException e) { } borderPanell. setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (7, 12, 359, 143) ; RTmsLabel . setText ( "000" ) ; borderPanell. add (RTmsLabel) ; RTmsLabel. setBounds (300,20, 72, 16) ; labell . setText ( "HTTP Requests : " ) , borderPanell. dd (labell) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 55 of 156 labell. setFon (new Font ("Dialog", Font. PLAIN, 12)); labell. setBounds (6, 20, 124,16) ; labelδ. setText ("HTTP Forwarded:") ; borderPanell. add (label8) ; labelδ. setFont (new Font ("Dialog", Font. PLAIN, 12)); label8. setBounds (6,35, 124, 16) ; getsInLabel. setText ("000") ; borderPanell .add (getsInLabel) ; getsInLabel. setBounds (130, 19,72,16) ; getsOutLabel . setText ( "000" ) ; borderPanell .add (getsOutLabel) ; getsOutLabel. setBounds (130, 34, 72, 16) ; label3. setText ("GET ms:"); borderPanell .add (label3) ; label3. setFont (new Font ("Dialog", Font. PLAIN, 12)); label3. setBounds (213, 20, 84, 16) ; bytesSentLabel. setText ("000") ; borderPanell .add (bytesSentLabel) ; bytesSentLabel. setBounds (300,35,72,16) ; bytesRxLabel. setText ("000") ; borderPanell . add (bytesRxLabel ) ; bytesRxLabel. setBounds (130, 64, 72, 16) ; label . setText ( "Bytes Sent : " ) ; borderPanell. add (label4) ; label4. setFont (new Font ("Dialog", Font. PLAIN, 12)); label . setBounds (213,35, 84, 16) ; label5. setText ("Bytes Received: ") ; borderPanell . add (label5 ) ; label5. setFont (new Font ("Dialog", Font. PLAIN, 12)); label5. setBounds (6, 64, 120,14) ; label2. setText ("HTTP Resolved: ") ; borderPanell. add (label2) ; label2. setFont (new Font ("Dialog", Font. PLAIN, 12)); label2.setBounds(6,49,124,16) ;
ACKLabel. setText ("000") ; borderPanell. add (ACKLabel) ;
ACKLabel . setBounds (130,49,72,16); eventElapsedLabel. setText ("000") ; borderPanell . add (eventElapsedLabel) ; eventElapsedLabel. setBounds (130, 80, 74, 15) ; labelδ. setText ("WWWhoosh-2 read: ") ; borderPanell . add (label 6 ) ; label6. setBounds (213,64,83,17) ;
WWWhoosh2byteslabel. setText ("000") ; borderPanell.add (WWWhoosh2byteslabel) ;
WWWhoosh2byteslabel. setBounds (300, 64, 72, 16) ; label7. setText ("Load Time ms"); borderPanell.add (label7) ; label7. setBounds (6, 79, 122, 16) ; label9. setText ("Bytes Saved") ; borderPanell. add (label9) ; label9. setBounds (213, 51, 84, 14) ; bytesSavedLabel. setText ("000") ; borderPanell . add (bytesSavedLabel) ; bytesSavedLabel. setBounds (300, 49, 72, 16) ; setResizable (false) ;
//}}
//{ {INIT_MENUS //})
// { {REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow ( ) ; this . addWindowListener (aSymWindow) ;
SymAction lSymAction = new SymAction () ; buttonl . addActionListener (lSymAction) ; button2. addActionListener (lSymAction) ;
//)}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 56 of 156 public StatsFrame (String title) { this ( ) ; setTitle (title) ; }
/**
* Shows or hides the component depending on the boolean flag b.
* Sparam b if true, show the component; otherwise, hide the component.
* Ssee java .awt. Component#ιsVιsιble */ public void setVisible (boolean b) {
//Force no-resize m spite of VCafe setResizable (false) ; if (b)
{ setLocation (450, 50);
} super . setVisible (b) ;
} static public void mam (String args [ ] ) {
(new StatsFrame ( ) ) . setVisible (true) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSizeO; super .addNotify ( ) ; if (fComponentsAdjusted) return;
// Adjust components according to the msets
Insets insets = getlnsets 0 ; setSize ( sets. left + msets. right + d. width, sets. top + insets. bottom + d. height)
Component components!] = getComponents ( ) ; for (mt i = 0; I < components . length; ι++)
{
Point p = components [I] .getLocation () ; p. translate (insets . left, msets. top) ; components [i] .setLocation (p) ; } fComponentsAdjusted = true; }
// Used for addNotify check, boolean fComponentsAdjusted = false;
// { { DECLARE_CONTROLS java.awt .Button buttonl = new java.awt .Button () ; ava.awt .Button button2 = new java.awt .Button () ;
Symantec. ltools . awt .BorderPanel borderPanell = new Symantec. itools .awt .BorderPanel () ; java.awt . Label RTmsLabel = new java.awt . Label 0 ; java.awt . Label labell = new java.awt .Label () ; ava.awt . Label labelδ = new java.awt .Label () ; java.awt . Label getsInLabel = new java.awt .Label () ; java.awt . Label getsOutLabel = new java. awt. Label () ; java.awt . Label label3 = new java. awt .Label () ; java.awt . Label bytesSentLabel = new java.awt .Label () , ava.awt . Label bytesRxLabel = new java . awt . Label () ; java.awt . Label label4 = new java. awt .Label () ; java.awt . Label label5 = new java. wt. Label () ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 57 of 156 java .awt. Label label2 = new java . awt . Label 0 ; java. wt .Label ACKLabel = new java. awt . Label () ; ava. awt .Label eventElapsedLabel = new java. awt .Label 0 ; java. awt .Label labelδ = new ava.awt . Label 0 ; java. awt .Label WWWhoosh2byteslabel = new ava.awt . Label () ; java . awt . abel label7 = new ava.awt . abel 0 ; ava . awt .Label label9 = new java.awt .Label 0 ; java. wt .Label bytesSavedLabel = new java.awt . abel 0 ;
//}}
//{ { DECLARE_MENUS //}}
//
// Update GUI with latest statistics mfo no more often than limit interval
// public synchronized void setStats
{
//passive method of throttling GUI display
//update mam panel int approx_bytessaved = Counters ,OK_304 * 700; bytesSavedLabel . setText (new Integer (approx_bytessaved) . toString ( ) ) ; getsInLabel . setText (new Integer (Counters . GETS_IN ) . toString () ) ; getsOutLabel. setText ( new Integer (Counters. GETS_OUT ). toString () );
ACKLabel. setText (new Integer (Counters. OK_304 ). oString () ) ; bytesRxLabel. setText (new Long (Counters .getBytesI ( ) ) . toString 0 ) ;
WWWhoosh2byteslabel . setText (new Long (Counters .OCDbytesIn) . toString () ) ; eventElapsedLabel . setText ( (new Long (Counters. getLastEventlnterval () ) ) . toStrmg () ), bytesSentLabel. setText (new Long (Counters . getBytesOut () ).toStrmg() ); bytesSavedLabel. setText (new Long ( approx_bytessaved ).toStrmg() ), if (Counters. GETms () >= 0)
RTmsLabel. setText ( (new Long (Counters .GET s 0 ) ). toString 0 ); } class SymWindow extends java . awt . event .WindowAdapter { public void windowClosing (java . awt . event .WindowEvent event) {
Object object = event. getSource () ; if (object == StatsFrame. this)
StatsFrame_WιndowClosmg (event) ; } } void StatsFrame_WιndowClosmg (java.awt .event .WindowEvent event) { setVisible (false) ; // hide the Frame } class SymAction implements java.awt .event .ActionListener { public void actionPerformed (java . awt .event .ActionEvent event) {
Object object = event .getSource () ; if (object == buttonl) buttonl_ActιonPer ormed (event) ; else if (object == button2) button2_ActιonPerforme (event) ; } } void buttonl_ActιonPerformed (java. awt .event .ActionEvent event) {
// to do: code goes here. buttonl_ActιonPerformed_Interactιonl (event) ; } void buttonl_ActlonPerformed_Interactιonl ( java . awt . event . ActionEvent event)
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 58 of 156 try {
// StatsFrame Hide the StatsFrame this. setVisible (false) ; } catch (Exception e) { }
} void button2_ActionPerformed (java.awt .event .ActionEvent event) {
// to do: code goes here. Counters . reset ( ) ; setStats () ; } }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 59 of 156 import java . awt . * ;
public class StatsHelpDialog extends Dialog { public StatsHelpDialog (Frame parent, boolean modal) { super (parent, modal);
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{{INIT_CONTROLS setLayout (null) ; setFont (new Font ("Dialog", Font. PLAIN, 14)); setSize(351,185) ; setVisible (false) ; okButton. setLabel ("OK") ; add (okButton) ; okButton. setBackground (java . awt. Color . lightGray) ; okButton. setFont (new Font ("Dialog", Font. PLAIN, 14)); okButton. setBounds (140, 128, 60, 24) ; labell . setText ("GETs out: counts GET requests forwarded to server"); add (labell) ; labell. setFont (new Font ("Dialog", Font. PLAIN, 12)); labell. setBounds (12, 40, 420,36) ; label2. setText ("304s back: counts GET requests satisfied via proxy "); add(label2) ; label2. setFont (new Font ("Dialog", Font. PLAIN, 12)); label2. setBounds ( 12, 68, 20, 36) ; label3. setText ("GETs in: counts HTTP GET requests from browser"); add(label3) ; label3. setFont (new Font ("Dialog", Font. PLAIN, 12)); label3.setBounds(12,12, 420,36) ; setTitle ("ICCS statistics");
//}}
// { {REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow ( ) ; this . addWindowListene (aSymWindow) ;
SymAction lSymAction = new SymAction () ; okButton. addActionListener (lSymAction) ;
//}}
) public StatsHelpDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } public void addNotify!) {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSizeO; super . addNotify ( ) ;
// Only do this once. if (fComponentsAdjusted)
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 60 of 156 return;
// Adjust components according to the insets
Insets insets = getlnsetsO; setSize (insets . left + insets. right + d. width, insets. top + insets .bottom + d. height),
Component components!] = getComponents 0 ; for (int i = 0; i < components . length; i++)
{
Point p = components [i] . getLocation () ; p. translate (insets. left, insets .top) ; components [i] . setLocation (p) ; }
// Used for addNotify check. fComponentsAdjusted = true;
} public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent () .getBounds 0 ; Rectangle abounds = getBounds () ; setLocation (bounds . x + (bounds .width - abounds .width) / 2, bounds. y + (bounds . height - abounds. height) /2) ;
super. setVisible (b) ;
}
// { { DECLARE_CONTROLS java.awt .Button okButton = new java .awt . Button ( ) java.awt . Label labell = new java.awt . Label ( ) java.awt . Label label2 = new java.awt . Label ( ) java.awt .Label label3 = new ava.awt .Label ( )
//}}
// Used for addNotify check, boolean fComponentsAdjusted = false; class SymAction implements java.awt .event.ActionListener { public void actionPerformed)java. awt. event .ActionEvent event) {
Object object = event. getSource 0 ; if (object == okButton) okButton_ActιonPerformed (event) ; } } void okButton_ActionPerforme (java.awt . event .ActionEvent event) {
// to do: code goes here. okButton_ActionPerformed_Interactionl (event) ; } void okButton_ActιonPerformed_Interactionl (java. awt. event.ActionEvent event) { try { this .dispose ( ) ;
} catch (Exception e) {
} } class SymWindow extends java.awt .event .WindowAdapter
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 61 of 156 { public void windowClosing (java. wt. event .WindowEvent event)
(
Object object = event .getSource 0 ; if (object == StatsHelpDialog. this)
StatsHelpDialog_WindowClosing (event) ; } } void StatsHelpDialog_WindowClosing (java.awt. event .WindowEvent event) {
// to do: code goes here.
StatsHelpDialog_WindowClosing_Interactionl (event) ; } void StatsHelpDialog_WindowClosing_Interactιonl (java. awt . event. indowEvent event) { try { this. dispose 0 ;
} catch (Exception e) {
1 }
}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 62 of 156 import j ava . awt . * ,
public class StatsHelpDialog extends Dialog { public StatsHelpDialog (Frame parent, boolean modal) { super (parent, modal);
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{ {INIT_CONTROLS setLayout (null) ; setFont (new Font ("Dialog", Font. PLAIN, 14)), setSιze(351, 185) ; setVisible (false) ; okButton . setLabel ( "OK" ) ; add (okButton) ; okButton. setBackgroun (java.awt .Color . lightGray) ; okButton. setFont (new Font ("Dialog", Font. PLAIN, 14)), okButton. setBounds (140, 128, 60,24) ; labell . setText ( "GETs out: counts GET requests forwarded to server"), add(labell) ; labell. setFont (new Font ("Dialog", Font. PLAIN, 12)); labell. setBounds (12,40, 420,36) ; label2. setText ("304s back: counts GET requests satisfied via proxy "); add(label2) ; label2 setFont (new Font ("Dialog", Font. PLAIN, 12)); label2. setBounds (12, 68, 420,36) ; label3 setText ("GETs in: counts HTTP GET requests from browser") ; add(label3) ; label3. setFont (new Font ("Dialog", Font. PLAIN, 12)); label3. setBounds (12, 12, 420, 36) ; setTitle ("ICCS statistics");
/ / } }
II { {REGISTER_LISTENERS
SymWindow aSymW dow = new SymWindow ( ) ; this.addWindowListener (aSymW dow) ;
SymAction lSymAction = new SymAction)), okButton. addActionListener (lSymAction) ,
//}}
public StatsHelpDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSizeO; supe . addNotify ( ) ;
// Only do this once, if (fComponentsAdjusted)
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 63 of 156 return,
// Adjust components according to the sets
Insets msets = getlnsetsO, setSize (insets. left + msets. right + d. idth, sets . top + sets .bottom + d. height)
Component components [ ] = getComponents () ; for (int ι = 0; i < components . length, ι++)
{
Point p = components [l] .getLocation () , p. translate (msets. left, insets. top) , components [I] . setLocation (p) , }
// Used for addNotify check. fComponentsAdjusted = true;
} public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent () .getBounds 0 ; Rectangle abounds = getBounds ( ) , setLocation (bounds .x + (bounds .width - abounds width)/ 2, bounds. y + (bounds .height - abounds. height) 2 ) ,
super . setVisible (b) ;
}
// { { DECLARE_CONTROLS java .awt. Button okButton = new java. awt.Button () , java .awt . abel labell = new java.awt . Label ( java.awt .Label label2 = new java.awt Labell java. awt. abel label3 = new java.awt Labell
//}}
// Used for addNotify check, boolean fComponentsAdjusted = false, class SymAction implements java. wt . event .ActionListener ( public void actionPerformed (java. awt .event .ActionEvent event) {
Object object = event .getSource () , if (object == okButton) okButton_ActιonPer ormed (event) ; } } void okButton_ActιonPerforme (java.awt . event .ActionEvent event) {
// to do: code goes here. okButton_ActιonPerformed_Interactιonl (event) ;
} void okButton_ActιonPerformed_Interactιonl (java. awt . event .ActionEvent event) { try { this .dispose () ;
} catch (Exception e) {
}
class SymWindow extends j ava . awt . event . W dowAdapter
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 64 of 156 { public void windowClosing (java. awt . event .WindowEvent event)
{
Object object = event . getSource () ; if (object == StatsHelpDialog. this)
StatsHelpDialog_WindowClosing (event) ; } } void StatsHelpDialog_WindσwClosin (java.awt. event .WindowEvent event) {
// to do: code goes here.
StatsHelpDialog_WindowClosing_Interactionl (event) ; } void StatsHelpDialog_WindowClosing_Interactionl (java. awt . event .WindowEvent event) { try { this. dispose () ;
} catch (Exception e) {
} }
}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 65 of 156 import java.net.*; import java.io.*; import COM. reitshamer .http. OCDResponse; import COM. reitshamer . error . *, import COM. reitshamer. util . *; import COM.reitshamer.de.*;
/********************************* statsUpdateThread *************************************/
//
// Oauthor Mark Palmer
// Sversion 0.1 - initial beta release, l-Aug-1999
//
// Modifications:
//
//
/********************************* OCDReaderThread ***************************************/
/*
* @input _sock Socket that the incoming request is coming in on
* Θmput ocdr - the OCD Response to be processed via this socket */ public class StatsUpdateThread extends Thread { private ProxyGUI _pguι=null; public StatsUpdateThread (ProxyGUI pgui) { super () ; _pguι = pgui;
//{ { INIT_C0NTR0LS //}} } public void run()
{ while (true) {
_pguι . setStats ( ) ; try { sleep(250) ; } catch (InterruptedException le) {} } }
// { { DECLARE_CONTROLS //}}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 66 of 156 /*
A basic extension of the java. awt. Dialog class */ import java.awt.*; import java . awt . image . ImageObserver; import Symantec. itools .awt .BorderPanel; import Symantec. itools. awt . InvisibleHTMLLink; import Symantec. itools .awt. InvisibleButton; public class AboutServerDialog extends Dialog { public AboutServerDialog (Frame parent, boolean modal) { super (parent, modal);
// This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
//{{INIT_CONTROLS setLayout (null) ; setBackground (java. awt .Color. lightGray) ; setFont (new Font ( "Dialog", Font. PLAIN, 12)); setSize(338,231) ; setVisible (false) ; try { borderPanell. setBevelStyle (Symantec. itools .awt. BorderPanel. BEVEL_RAISED) ; } catch (java. beans . PropertyVetoException e) { } borderPanell . setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (8,8, 327,193) ; label4. setText ("Patents Pending") ; borderPanell .add (label4) ; label4.setBounds (26, 78, 156, 24) ; label3. setText ("All Rights Reserved"); borderPanell. add (label3) ; label3. setBounds (26, 60,156,24) ; label2. setTex ("Copyright (C) 1999 MTI"); borderPanell . add ( label2 ) , label2. setBounds (26, 36, 156, 24) ; label5. setText ("Customer:") ; borderPanell. add (label5) ; label5. setBounds (26, 116,78,20); label6. setTex ("Version: 2") ; borderPanell. add (label6) ; label6. setBounds (26, 135, 76, 15) ; label7.setText("Build: "); borderPanell .add (label7) ; label7.setBounds(26,150,41,21) ; borderPanell . ad (textFieldl) ; textFieldl . setBounds (102, 117,190,17); numlabel. setText ("0") ; borderPanell . add (numlabel ) ; numlabel . setBounds (77,151,51, 21) ; buttonl. setLabel ("WWWhoosh! Site Optimizer"); borderPanell .ad (buttonl) ; buttonl. setBounds (22,14,181,21) ; okButton . setLabel ( "OK" ) ; add (okButton) ; okButton. setFont (new Font ( "Dialog", Font. PLAIN, 12)); okButton. setBounds (262,203, 64,20) ; setTitle ("About WWWhoosh Site Optimizer"); //}} numlabel. setText ( (new Integer (Build. UMBER) ). toString 0 );
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 67 of 156 //{ {REGISTER_LISTENERS
SymWindow aSymWmdow = new SymWindow ( ) ; this.addWmdowListener (aSymWindow) ;
SymAction lSymAction = new SymAction () ; okButton. addActionListener (lSymAction) ; buttonl . addActionListener (lSymAction) ;
//})
} public AboutServerDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSizeO; super . addNotify ( ) ;
// Only do this once. if (fComponentsAdjusted) return;
// Adjust components according to the sets
Insets insets = getlnsetsO; setSize (insets. left + sets. right + d. width, insets. top + insets .bottom + d.height)
Component components!] = getComponents ( ) , for (mt ι = 0; I < components . length; ι++) { Point p = components [I] .getLocation 0 ; p. translate (insets . left, msets .top) ; components [l] . setLocation (p) ; }
// Used for addNotify check. fComponentsAdjusted = true; } public void paint (Graphics g) {
//Image logo2 = getToolkit ( ) . getlmage ("IOP. gif") ; Image logo = getToolkit0.getImageCJavalogo.jpg"), //g.drawlmage (logo2, 5, 50, 200, 75, (ImageObserver) this) ; g.drawlmage (logo, 15, 35, 65, 65, (ImageObserver) this) ;
} public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent () .getBounds () ; Rectangle abounds = getBounds (); setLocation (bounds .x + (bounds .width - abounds.width) / 2, bounds . y + (bounds.height - abounds .height) 12 ) ; } super. setVisible (b) ; }
// { { DECLARE_CONTROLS
Symantec . ltools -awt. BorderPanel borderPanell = new Symantec. itools. awt .BorderPanel () ; java.awt .Label label4 = new java. awt .Label ( ) java.awt . Label label3 = new java.awt .Label () java. awt . Label label2 - new java. awt .Label ()
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 68 of 156 ava. awt. abel label5 = new java.awt . Label 0 ; ava. awt. Label labelδ = new java.awt . Label 0 ; ava. wt. Label label7 = new java.awt .Label O ; ava. wt .TextField textFieldl = new java. awt . TextFiel () ; ava.awt. Label numlabel = new java.awt . Label 0 ; ava .awt. Button buttonl = new j va . awt . Button 0 ; ava .awt .Button okButton = new java. awt .Button () ; //}}
// Used for addNotify check, boolean fComponentsAdjusted = false; class SymAction implements java. awt . event .ActionListener { public void actionPerformed (java .awt. event.ActionEvent event) {
Object object = event . getSource 0 ; if (object == okButton) okButton_ActionPerformed (event) ; else if (object == buttonl) buttonl_ActionPerformed (event) ; } } void okButton_ActionPerforme (java.awt .event .ActionEvent event) {
// to do: code goes here. okButton ActionPerformed Interactionl (event) ;
} ~ void okButton_ActionPerformed_Interactιonl (java.awt .event.ActionEvent event) { try { this .dispose ( ) ;
} catch (Exception e) {
}
class SymWindow extends java.awt . event .WindowAdapter { public void windowClosing (java.awt . event .WindowEvent event) {
Object object = event . getSource () ; if (object == AboutServerDialog. this)
AboutServerDialog_WindowClosing (event) ; } } void AboutServerDialog_WindowClosing (java . awt . event . WindowEvent event) {
// to do: code goes here.
AboutServerDialog_WindowClosing_Interactionl (event) ; } void AboutServerDialog_WindowClosmg_Interactionl (java . awt . event .WindowEvent event) { try { this .dispose ( ) ;
} catch (Exception e) {
} } void buttonl_ActionPerformed (java. awt. event .ActionEvent event)
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 69 of 156 Runtime rt = Runtime. getRuntime 0 ; try { rt. exec ("C: WProgram FilesWlnternet ExplorerWlexplore.exe http://www.wwwhoosh.com") ; } catch (java. io. IOException ioe) {) } }
public class Build {public static int VERSI0N=2; public static int NUMBER=1007
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 70 of 156 import java.io.*; import java. util . Date;
/******************************** CONFIG ******************************************/
//
// The Config class is responsible for governing the runtime operation of the Optimizer
// by the settings of its various parameters - whether to user compression, whether to
// generate OCD information, what file extensions to process, etc.
// It also writes and restores itself from an ASCII configuration file.
// ***************+**************** CONFIG **************+*********** ************ ***/ public class Config { // The following function is a placeholder for control initialization. // You should call this function from a constructor or initialization function, public void vclnit () { //{ { INIT_CONTROLS //$$ configl.move (0,0) ;
//}}
}
//hardcode version until it changes! public static int VERSION = 2;
Figure imgf000085_0001
private static long _globalRunTime=0; public static void setRunTime ( )
{ _globalRunTime = System. currentTimeMillis 0 ; } public static long getRunTime ( ) {return _globalRunTime; } public static boolean getContinuous () {return _continuous; } public static void setContinuous (boolean c) {_continuous = c; } public static int getGenlnterval ( ) {return _geninterval; } public static void setGenlnterval (int g) {_geninterval=g; }
Figure imgf000085_0002
}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 71 of 156 public static String getDefaultFile ( )
{return _defaultFιle; } public static void setDefaultFile (String d)
{_defaultFιle = d, _modιfιed=true; } public static String getRootDirO {return _rootDιr; } public static void setRootDir (String d) {_rootDιr = d. replace (' W ', ' / ' ) ; _rootDιr = _rootDιr. toLowerCase () ; if (d == null)
_rootDιr = System. getPropert ("user . dir") ; _modιfιed=true; if ( '_rootDιr.endsWιth("/") )
_rootDιr += " I " ; ) public static String getCurlnFile ( )
{return _curFιle; } public static void setCurlnFile (String d)
{_curFιle = d; } public static String getCurOutFile ()
{return _curOutFιle; } public static void setCurOutFile (String d)
{_curOutFιle = d. toLowerCase () ; } public static void setGZip (boolean tf)
{_GZIP = tf; } public static boolean getGZipO
{return _GZIP; } public static void setOCDl (boolean tf)
{JDCD1 = tf; } public static boolean getOCDl ( )
{return _OCDl; } public static boolean modified!)
{return _modιfιed; } public static void setModified (boolean m)
{_modιfιed = m; } public static String getFιle()
{return _configFName; } public static void setFile (String f)
Figure imgf000086_0001
_rootDιr = nf. getParent () ;
_modιfιed=true; } public static void setLogFile (String Ifname)
{_logfllename = Ifname; } public static String getLogFile
{return _logfllename; } public static void setFiles (String [ ] s)
{_fιleLιst = s; _modιfιed=true; } public static String!] getFiles ( )
{ return _fιleLιst; } public static void setDoma (String s) { _domaιn = s . replace 1 ' ','/') ; _domam = _domam. toLowerCase () ; _modιfιed=true; } public static String getDoma {return domain;}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 72 of 156 public static void setSubobjectExtensions (String s)
{_subobjectExtensιons = s . oLowerCase () ; _modιfιed=true; } public static String getSubobjectExtensions ( )
{return _subobjectExtensιons; } public static void setExtensions (String s)
{_extensιonLιst = s .toLowerCase 0 , _modιfιed=true; } public static String getExtensions ( )
{return _extensιonLιst; }
//general rule for detecting filenames, if valid extension after last dot public static boolean isSubob ect (String f) { if (f== null) return false;
String filename = f. toLowerCase () ; mt dot = filename. lastlndexOf (" .gif") ;
Figure imgf000087_0001
nt (" GIF: " + filename + "\n") ;
dot = fllename. lastlndexOf (".") ; if (dot == -1) return false; if ( ( filename. length () < dot+4) || (filename. length () > dot+5) ) return false;
String ext = filename. substring (dot+1, dot+4) ; if (_subobjectExtensιons. dexOf (ext. toLowerCase () ) > -1) { // OutMgr. print (" FOUND SUBOBJECT " + filename ) ; return true; } else return false;
} ******************************** DETECT HTML EXTENSIONS ******************************/ public static boolean mExtensionList (String ext) {
//TODO: FIX - breaks for extensions using mixed case e.g. ".Htm" if ( (_extensιonLιst . dexOf (ext. toUpperCase ( ) ) > -1)
II (_extensιonLιst. mdexOf (ext .toLowerCase () ) > -1) ) return true; else return false; }
/******************************** DETECT SUBOBJECT FILE EXTENSIONS **************************/ public static boolean mSubobjectExtensionList (String ext) { String tmp = ext . toLowerCase () ; if (_subobjectExtensιons . mdexOf (tmp) '= -1) return true; else return false;
}
/******************************** XJOAD LAST USED CONFIG *************************************/ public static boolean loadLastO {
//get a copy of the last-used config from client. cfg, //then proceed to load the actual last-used config
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 73 of 156 loadFromt "WWWhoosh. INI") ; //bootstrap if ( '_con igFName. equalsIgnoreCase ("WWWhoosh. INI") ) loadFrom(_configFName) ; return true; }
/*********** *^>r ********************* * LO D FROM FILE t * *** / public static boolean loadFrom(String fn) {
File fi = new Fιle(fn); if ( 'fi. exists 0 ) { System. out.printlnO'**** WARNING: configuration file not found ****"
+ " creating new" + OutMgr. chopPath (fi.getAbsolutePath () ) ) ; saveAsCWWWhoosh.INI"); //saves in default run directory
//_rootDιr=fι.getParent ( ) ; return false; } try
{FilelnputStream fin = new FιleΙnputStrea (fι) ; DatalnputStream dm = new DatalnputStream(fm) ;
_rootDιr=fι getParent(); //config file directory is used as web file root for
String taglme = din. readLine ( ) ; String val=null; while (tagline '= null) { val = tagline . substring (tagline. dexOf ("=") +1) .trιm( ) ; if (tagline . startsWith ( "DateLastRun" ) ) {
Config. setDate (val) ; } if (taglme. startsWith ("NonameFile") ) { val = tagline. substring (taglme. mdexOf ("=") +1) . trimO ; Config. setDefaultFile (val) ; } if (tagline. startsWith ("RootDir") ) { val = taglme. substring (tagline. mdexOf ("=") +1) . trimO , setRootDir (val) ; } if (tagline . startsWith ("Domain") ) { val = tagline. substring (tagline. mdexOf ("=") +1) . trιm() ;
Config. setDomai (val) ;
} if (tagline. startsWith ("LastConfigFile") )
{ val = tagline. substring (tagline. mdexOf ("=") +1) .trimO ;
_con igFName = val; } if (tagl e. startsWith ("LogFile") )
{ val = taglme. substring (tagline. mdexOf ("=") +1) .trimO ;
_logfllename = val;
OutMgr. setLogflie (val) ;
} if (tagline. startsWithC'FILEOUT") )
{ val = tagline. substring (tagline . dexOf ("=") +1) . trιm( ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 74 of 156 if (val == "true" )
OutMgr . setLogOn ( ) ; else
OutMgr . setLogOff ( ) ; } if (tagline. StartsWit ("LOGAPPEND") ) { val = taglme. substring (tagline. indexOf ("=")+D .trimO ; if (val == "true")
OutMgr . setLogAppen (true) ; else
OutMgr . setLogAppend (false) ; } if (taglme. startsWith ("OCD1") ) { val = tagline. substring (tagline . mdexO ("=") +1) .trim () ; if (val. equalsIgnoreCase ("false") )
Config. setOCDl (false) ; else
Config. setOCDl (true) ; } if (tagline. startsWith ("Continuous") ) { val = tagline. substrin (tagline. indexOf ("=")+D .trimO ; if (val. equalsIgnoreCase ("true") )
Config. setContinuous (true) ; else
Config. setContinuous (false) ; } if (tagline . startsWith ( "Genlnterval" ) ) { val = tagline. substring (tagline. indexOf ("=") +1) . trim() Integer tmpint = new Integer (val) ; setGenlnterval (tmpint . intValue ( ) ) ; } if (tagline. startsWith ("Compression") )
{ val = tagline. substring (tagline. indexOf ("=") +1) .trim( ) ; if (val.equalsIgnoreCase ("true") )
Config. setGZip (true) ; else
Config. setGZip (false) ; } if (tagline. startsWith ("HTMLExtensions") ) {
Config. setExtensions (val) ; } if (tagline. startsWith ("[FileList] ") ) { int ι=0; taglme = din. readLine () ; StringU tmplist = new String [100] ; while (tagline != null) { tmplist [i++]=taglme; tagline = din. eadLine 0 ; } fileList = new String[i]; for (mt z=0; z<i; z++)
_fileList [z] =tmplιst [z] ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 75 of 156 tagline = din. eadLine () ; 1 fin. close () ;
> catch (IOException e)
{
System. out.println ( "**** ERROR READING CONFIGURATION FILE " + fi ) return false; }
_modιfιed=false;
//saveAs ( "default. cfg") ; //saves m default run directory return true; )
/******************************** SAVE TO SPECIFIC FILE *********************************** public static boolean saveAs (String fn) {
String ascnContents = "";
Figure imgf000090_0001
_confιgFName = fn; try
{FileOutputStream fout = new FιleOutputStream(of ); ascnContents = " [WWWhooshLlParameters] \r\n" +
"DateLastRun= " + _dateStamp + "\r\n" + "NonameFιle= " + _defaultFιle + "\r\n" + "HTMLExtensιons= " + _extensιonLιst + "\r\n" + "LastConfιgFιle= " + _confιgFName + "\r\n" + "TTOUT= " + OutMgr. TTOUT + "\r\n" +
"0CD1= " + Config. getOCDl ( ) + "\r\n" +
"Compression- " + Config. getGZip () + "\r\n" + "FILEOUT= " + OutMgr. flleOut () + "\r\n" + "LOGAPPEND= " + OutMgr. LOG_APPEND + "\r\n" + "Domam= " + _domam + "\r\n" + "LogFιle= " + _logfιlename + "\r\n" + "RootDιr= " + _rootDιr + "\r\n" + "Contmuous= " + _contιnuous + "\r\n" + "Genlnterval= " + _genιnterval + "\r\n" + "[FιleLιst]= lιst\r\n"; if (_fιleLιst. length > 0) for (mt ι=0; ι< _fιleLιst. length; ι++) {
String tmp = _flleList [l] ; ascnContents += tmp + " \n", } fout. write ( ascnContents . getBytes ( ) ); fout. close ( ) ;
} catch (IOException e) { System. out. println ("**** ERROR CREATING CONFIG FILE " + of .getAbsolutePath ); return false; } return true;
}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 76 of 156 public static boolean save 0 {
String tmp = _rootDir; saveAs (_con igFName) ; saveAs CWWWhoosh. INI " ) ;
_rootDir=tmp; return true ; } public static void setMaxDepth (int d)
{_maxDepth=d; } public static int getMaxDepth ( )
{return _maxDepth; } public static void setCurDir (String cd)
{_curDir=cd; } public static String getCurDirO
{return _curDir; } public static void setCurFile (String cf)
{_curFile=cf; } public static String getCurFilet)
{return _curFile; }
// { {DECLARE_CONTROLS
Config configl = new Config ( ) ;
//}}
PCT Application Docket A-027, Office of Chas.G. CaJJ, Reg. No. 20,406, Appendix- Page 77 of 156 import java.io.*; import java.util.*,
>* *
* Reads a configuration file that consists of headers and entries.
* Headers are of the format <br>
* <code> [HeaderName] </codexbr>
* entries are of the format <br>
* <code>EntryName=EntryValue</code> . <p>
* Example :<br>
* <code> [Mam] <br>
* HomeDιr=/root<br>
* Tιmeout=30<br>
* </code> */ public class ConfigFile { private String sFilename; private Hashtable sectionTable = null;
/**
* Initializes the ConfigFile object from a file. *
* Sparam _sFιlename The path to the f le.
* Θexception HmrException if an error occurs opening the file or if
* the file is of an invalid format. */ public ConfigFile (String _sFιlename) { sFilename = _sFιlename; try { loadFileO ;
} catch (IOException e)
(
OutMgr. print ( 1,
" **** ERROR: could not open file " + sFilename ) , } return; }
/**
* Get a configuration parameter.
*
* Θparam section name of section of the config file
* Θparam name name of parameter m the section
* @return the parameter as a <code>Strmg</code> */ public String get (Object section. Object name) throws HmrValueNotFoundException {
Object valTable = sectionTable. get (section) ; if (valTable == null)
{ throw new HmrValueNotFoundException ("No section <" + section + "> in file <" + sFilename + ">") ; }
Object objRet = ( (Hashtable) alTable ). ge (name), if (objRet == null) { throw new HmrValueNotFoundException ("No value for <" + section + ">:<" + name + "> m file <" + sFilename + ">") ; } return ( (String) objRet) ; }
/**
* Get a section of configuration parameters.
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 78 of 156 * Θparam section name of section of the config file
* Θreturn a <code>Vector</code> of <code>NameValuePaιrs</code>
* containing all the parameters in the section
* @see COM. reitshamer .util.NameValuePair */ public Vector getΞection (Ob ect section) {
Vector v = new Vector ( ) ;
Hashtable valTable = (Hashtable) sectionTable. get (section) ;
// Loop through section to get values.
Enumeration eKeys = valTable. keys () ; while (eKeys. hasMoreElements () )
(
Object elem = eKeys .nextElement () ;
NameValuePair nvp = new NameValuePair ( (String) elem,
(String) alTable .get (elem) ) ; v.addElement (nvp) ; } return v; } **
* Re-mitialize from the con iguration file. *
* Θexception COM. reitshamer. error. HmrException if an error occurs
* opening the file or the file is of an invalid format. */ public void reload () throws HmrException { try
{ loadFile ;
} catch (IOException e)
{ throw new HmrException ("unable to open file: " + e. getMessage () ) ;
} } private void loadFile ( ) throws IOException { mt iRet;
String sLine;
//Debug.print ("opening file <" + sFilename + ">"); FileReader read = new FileReader (sFilename) ; BufferedReader bread = new BufferedReader (fread) ;
// Create Hashtable which contains Hashtables. sectionTable = new Hashtable () ; // Create Hashtable pointer which will point to the current section.
Hashtable newTable = null;
String sName; t index = 0; while (true) {
// Read a line. sL e = bread. readLine () ; if (sL e == null)
{ break; I sLine = sLme. tπm( ) ; if ( (sLine. lengthO == 0) || sL e. substring (0, 1) .equals (", ") ) { continue;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 79 of 156 if (sLine.charAt (0) == '[') { // It's a new section name. Reset the 'current section' // pointer. if (sLine.charAt (sLine. length () -1) == ']') { sName = sLme. substring (1, sLine. length 1 ) - 1); ) else { sName = sLme. substring (1, sLine. length 1 )) ; }
//Debug. print ( "got section name <" + sName + ">") ; newTable = new Hashtable () ; sectionTable.put (sName, newTable) ; continue; } if (newTable ===== null) { // There's been no section header. The current section has a // label of "". newTable = new Hashtable () ; sectionTable.put (new String (""), newTable); } StringTokenizer tkzr = new StringTokenizer (sLme, "="); String name = tkzr. nextToken () ; String value = null; if ( Itkzr.hasMoreTokens () ) {
Debug. print ( "no value for token <" + name + ">"); } else { value = tkzr . nextToke 0 ; value = value. trim () ; newTable. put (name, value) ; }
//Debug. print ("name=<" + name + "> value=<" + value + ">") ; } f ead. close ( ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 80 of 156 import va . awt . * ; import java .awt .event . *; import java.10. File, import Symantec. itools. awt .BorderPanel;
public class ConfirmDialog extends Dialog { public ConfirmDialog (Frame parent, boolean modal)
{ super (parent, modal);
//Keep a local reference to the invoking frame frame = parent;
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
// { { INIT_CONTROLS setLayout (null) ; setBackground (java. awt .Color. lightGray) ; setSιze(246, 113) ; setVisible ( false) ; yesButton. setLabel (" Yes "); add (yesButton) ; yesButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); yesButton. setBounds (107,87, 64,20) ; noButton. setLabel (" No "); add (noButton) ; noButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); noButton. setBounds (170, 87, 64, 20) ; try { borderPanell . setBevelStyle ( Symantec . itools . awt . BorderPanel . BEVEL_RAISED) , } catch( ava. beans . PropertyVetoException e) { } borderPanell . setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (4, 2, 239, 88) ; labell . setText ("Remove all generated files?"); labθll.setAlignment ( java. awt. Label . CENTER) ; borderPanell . add (labell) ; labell. setBounds (21,26,180,23) ; setTitle ( "WWWhoosh Confirm" ) ; //})
//{ {REGISTER_LISTENERS
SymWindow aSymW dow = new SymWindow (); this addWmdowListener (aSymWindow) ; SymAction lSymAction = new SymAction (); noButton. addActionListener (lSymAction) ; yesButton. addActionListener (lSymAction) ;
SymMouseMotion aSymMouseMotion = new SymMouseMotion () ; this addMouseMotionListener (aSymMouseMotion) ; //)) } public void addNotify () {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSizeO; super . addNotify ( ) ; if (fComponentsAdjusted) return;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 81 of 156 // Adjust components according to the insets setSize (getlnsets () .left + getlnsets (). right + d. width, getlnsets 0. top + getlnsets () .bottom + d. height) ;
Component components!] = getCo ponents ( ) ; for (int ι = 0; I < components . length; ι++) {
Point p = components [I] .getLocationO ; p. translate (getlnsets 0.left, getlnsets ( ) . top) ; components [l] . setLocation (p) ; 1 fComponentsAdjusted = true; } public ConfirmDialog (Frame parent, String title, boolean modal) { this (parent, modal); setTitle (title) ; }
/* *
* Shows or hides the component depending on the boolean flag b.
* Θparam b if true, show the component; otherwise, hide the component.
* @see java.awt .Component#ιsVιsιble */ public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent () .getBounds , Rectangle abounds = getBounds ( ) ; setLocation (bounds. x + (bounds. width - abounds. width) / 2, bounds . y + (bounds. height - abounds .height) 12 ) ; Toolkit. getDefaultToolkit () .beep() ; } supe . setVisible (b) ; 1 boolean _deleteOK - false;
// Used for addNotify check, boolean fComponentsAdjusted = false; // Invoking frame Frame frame = null;
// { { DECLARE_CONTROLS j ava . awt . Button yesButton = new java.awt. Button ( ) ; ava.awt .Button noButton = new java.awt .Button () ;
Symantec. itools .awt .BorderPanel borderPanell = new Symantec. itools. awt .BorderPanel ( ) java.awt . Label labell = new java. awt .Label () ;
//}} class SymAction implements java . awt. event .ActionListener { public void actionPerformed (java.awt . event .ActionEvent event) {
Object object == event .getSource () ; if (object =- yesButton) yesButton_ActιonPerformed (event) ; else if (object == noButton) noButton_ActιonPerformed (event) ; } ) boolean deleteOKO {return _deleteOK; } void yesButton_ActιonPerformed(java. awt .event.ActionEvent event) {
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 82 of 156 deleteOK = true, try { this. dispose ( ) ; } catch (Exception e)
void noButton_ActιonPerformed ( java. wt. event .ActionEvent event) {
// to do: code goes here. noButton_ActιonPerformed_Interactιonl (event) ; } void noButton_ActιonPerformed_Interactιonl (java. awt . event .ActionEvent event) { try { this .dispose ( ) ;
} catch (Exception e) {
} } class SymWindow extends java.awt .event . WindowAdapter { public void WindowClosed (java.awt . event .WindowEvent event) {
Object object = event . getSource 0 ; if (object == ConfirmDialog. this)
Con ιrmDιalog_WιndowClosed (event) ; } public void windowClosing (java.awt . event .WindowEvent event) {
Object object = event .getSource () ; if (object == ConfirmDialog. this)
ConfιrmDιalog_WmdowClosmg (event) ; } ) void ConfιrmDιalog_WmdowClosιng (java .awt . event .WindowEvent event) {
// to do: code goes here.
ConfιrmDιalog_WmdowClosιng_Interactιonl (event) ;
void ConfιrmDιalog_WιndowClosmg_Interactιonl ( ava.awt .even .WindowEvent event) { try { this.dispose () ;
} catch (Exception e) {
} }
class SymMouseMotion extends java. awt .event. MouseMotionAdapter { public void mouseMoved (java. awt. event.MouseEvent event) {
Object object = event .getSource () ; if (object == ConfirmDialog. this)
ConfιrmDιalog_MouseMoved (event) ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 83 of 156 void ConfirmDialog_MouseMoved( ava. awt .event .MouseEvent event) // to do: code goes here.
void ConfirmDialog_WindowClosed (j va . awt . event .WindowEvent event) // to do: code goes here.
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 84 of 156 import java . awt . * ; import java. awt.event . *; import java .10. File; import Symantec. ltools .awt .BorderPanel;
public class ConfirmSaveExitDialog extends Dialog { public ConfirmSaveExitDialog (Frame parent, boolean modal)
{ super (parent, modal);
//Keep a local reference to the invoking frame frame = parent;
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
// { { INIT_CONTROLS setLayout (null) ; setBackground (java. awt. Color. lightGray) ; setSιze(300,107) ; setVisible (false) ; yesButton. setLabel (" Yes ") ; add (yesButton) ; yesButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); yesButton. setBounds (156, 80, 64, 20) ; noButton. setLabel (" No ") ; add (noButton) ; noButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); noButton. setBounds (221, 80, 64,20) ; try { borderPanel1. setBevelStyle (Symantec. itools. awt.BorderPanel. BEVEL_RAISED) } catc (java.beans . PropertyVetoException e) { } borderPanell .setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (7, 8, 290, 71); labell . setText ("Save changes to configuration file?"); labell. setAlignment (java. awt.Label. CENTER) ; borderPanell. add (labell) ; labell. setBounds (31, 16, 204, 23) ; setTitle ("WWWhoosh - Save Config"); //}}
// { {REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindo (); this.addW dowListener (aSymW dow) ; SymAction lSymAction = new SymAction (); noButton . addActionListener ( lSymAction) ; yesButton addActionListener (lSymAction) ;
SymMouseMotion aSymMouseMotion = new SymMouseMotion () ; this . addMouseMotionListener (aSymMouseMotion) ;
//}}
} public void addNotify () {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getsιze(); super .addNotify ( ) ; if (fComponentsAdjusted) return;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 85 of 156 // Adjust components according to the insets setSize (getlnsets 0.left + getlnsets (). right + d. width, getlnsets (). top + getlnsets () .bottom + d height);
Component components!] = getComponents ( ) ; for (int ι = 0; I < components. length; ι++) {
Point p = components [I] . getLocationO ; p. translate (getlnsets ( ) left, getlnsets O .top) ; components [I] .setLocation (p) ; } fComponentsAdjusted = true; } public ConfirmSaveExitDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; }
/* *
* Shows or hides the component depending on the boolean flag b.
* Sparam b if true, show the component; otherwise, hide the component.
* @see java. awt. ComponenttisVisible */ public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent O .getBounds 0 ; Rectangle abounds = getBounds 0 ; setLocation (bounds .x + (bounds .width - abounds .width) / 2, bounds. y + (bounds .height - abounds height) 12 ) ; Toolkit . getDefaultToolkit ( ) . eep ( ) ; } supe . setVisible (b) ; } boolean _deleteOK = false;
// Used for addNotify check, boolean fComponentsAdjusted = false; // Invoking frame Frame frame = null;
// { { DECLARE_CONTROLS ava.awt .Button yesButton = new java. awt. Button () ; java.awt .Button noButton = new java. awt. Button ( ) ;
Symantec. itools . awt .BorderPanel borderPanell = new Symantec itools .awt .BorderPanel i ava.awt . Label labell = new java.awt .Label 0 ;
//}} class SymAction implements java . awt .event . ActionListener { public void actionPerformed ( ava. awt .event .ActionEvent event) {
Object object = event . getSource () ; if (object == yesButton) yesButton_ActιonPerformed (event) ; else if (object == noButton) noButton_ActιonPerformed (event) ; } ) boolean deleteOK ( ) {return _deleteOK; } void yesButton_ActιonPerforme (java.awt .event.ActionEvent event) <
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 86 of 156 Con ig. save () ; try { this. dispose () ; } catch (Exception e) { }
void noButton_Act onPerformed (java. awt .event .ActionEvent event) {
// to do: code goes here. noButton ActionPerformed Interactionl (event) ;
void noButton_ActιonPerformed_Interactιonl (java.awt .event .ActionEvent event) { try { this. ispose 0 ;
} catch (Exception e) {
} } class SymWindow extends java. awt .event .WmdowAdapter { public void WindowClosed (java. awt .event. WindowEvent event) {
Object object = event. getSource () ; if (object == ConfirmSaveExitDialog. this)
ConflrmSaveExitDialog fl dowClosed (event) ; } public void windowClosing (java .awt. event. indowEvent event) {
Object object = event .getSource () ; if (object == ConfirmSaveExitDialog. this)
ConfιrmSaveExιtDιalog_WιndowClosmg (event) ; } } void ConfιrmSaveExιtDιalog_WmdowClosιng ( ava.awt .event. WindowEvent event) {
// to do: code goes here.
ConfιrmSaveExιtDιalog_WmdowClosιng_Interactιonl (event) ;
void ConfιrmSaveExιtDιalog_WmdowClosιng_Interactιonl (java.awt .event .WindowEvent event) { try { this. dispose 0 ; catch (Exception e)
class SymMouseMotion extends java.awt . event .MouseMotionAdapter { public void mouseMoved( java.awt .event .MouseEvent event) {
Object object = event . getSource () ; if (object == ConfirmSaveExitDialog. this)
ConfirmSaveExitDialog MouseMoved (event) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 87 of 156 } void ConfιrmSaveExιtDιalog_MouseMoved (java. wt . event .MouseEvent event) // to do: code goes here.
void ConfιrmSaveExιtDιalog_WιndowClosed (java.awt . event .WindowEvent event) // to do: code goes here.
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 88 of 156 import j ava . io . * ; import java.util . Date; import j va .util . zip.GZIPOutputStream; import java.util zip.GZIPInputStream; import WWWhooshCommon. * ;
/*
This class is responsible for knowing the details of the OC file formats and hiding those details from the Optimizer.
It handles writing specific subsections of the format to a file. */
public class FileFormatMgr
{
D
Figure imgf000103_0001
t O t tSt d
//instantiate with file name and directory of input or output file public FileFormatMgr (String filedir, String filename)
Figure imgf000103_0002
OutMgr. print (" **** ERROR: failed to access output file for writing **** " + _fllename) ; }
//{ {INIT_CONTROLS //}} }
//use this constructor while we still have code that creates the data streams //in Optimizer. Eventually move all that code into this class so it's //the only one actually touching files public FileFormatMgr 0 U private void readHeader (BufferedlnputStream bis) (
}
//write header using filestream member from instantiation private void writeHeader ()
{
WhooshHeader whooshHDR = new WhooshHeade () ; whooshHDR.writeTo (_fιlestream) ;
} public void writeHeader (FileOutputStream fs) {
WhooshHeader whooshHDR = new WhooshHeader () ; whooshHDR . riteTo ( fs) ;
} public String readCoherency (BufferedlnputStream bis) throws IOException {
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 89 of 156 //TODO: this code should be common with that m OCResponse
WhooshHeader whoosh= new WhooshHeader () ; byte[] fixbuf = new byte [1028]; try { whoosh. readFro (bιs) ; //TODO: capture length for stats iRet = bis .read (fixbuf) ; } catch (IOException e) { }
ByteArrayOutputStream baos = new ByteArrayOutputStream( ) ; boolean gzιpformat=false; if (fixbuf [0] == OxlF ) //next byte should be 0x8b == 139 gzipformat = true;
String retstr=null; try ( while (iRet '= -1) { baos. write (fixbu , 0, iRet) ; Ret = b s. ead (fixbuf) ; } byte [ ] ba = baos. toByteArray ( ) ; //get variable-length as byte array if (gzipformat) {
//all this recasting seems a bit silly but required by type collection ByteArraylnputStream bais = new ByteArraylnputStream(ba) ; //construct stream around arry
GZIPInputStream gz = new GZIPInputStream(baιs) ; //construct gzip array from stream
//now we're ready to uncompress stream into another byte array ByteArrayOutputStream uncompressedstream = new ByteArrayOutputStream() ; int fullcount = gz read (fixbuf) ; while (fullcount '= -1)
{ uncompressedstream write (fixbuf, 0, fullcount) ; fullcount = gzm. read (fixbuf) ;
} ba = uncompressedstream. toByteArray () ; } retstr = new String (ba); } catch (IOException e) { } return retstr; }
//Write entire Coherency file, given the mfo string form.
//Also write a _noname file, if this is a default HTML file. public void wπteCoherencyF le (String coherency)
{
//start by writing the header writeHeader ( ) ; try {//TODO: put compression into its own utility method
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 90 of 156 if (coherency != null) { if (Config. getGZipO )
GZIPOutputStream gzout = new GZIPOutputStream (_dos) ; //careful-writes 10-byte header ! gzout .write (coherency . getBytes ( ) ) ; gzout. close 0 ; ) else { _dos. rite (coherency. getBytes 0 ) ;
} }
_dos . close ( ) ;
Stats . _bytesWritten+=_filehandle . length ( ) ; ) catch (IOException e)
{OutMgr. print (" **** ERROR writing to output file **** " + _filename ); }
//File noname - copy generated OC file to oc_noname.htm /*
File noname = null; if (fn. equalsIgnoreCase ( Config. getDefaultFile () ) ) noname = new File ( fd, "oc_noname.htm" ) ; if (noname !=null) { try {
FileOutputStream xnonameout = new FileOutputStream(noname) ; if (OCdata != null) { if (Config. getGZipO ) {
GZIPOutputStream nonameout = new GZIPOutputStream(xnonameout) ; nona eout. write (OCdata. getBytes 0 ) ; nonameout . close ( ) ; } else { xnonameout .write (OCdata. getBytes () ) ; xnonameout . close ( ) ; } }
Stats._numOutFiles++; xnonameout . close ( ) ;
Stats._bytesWritten+=noname. length () ;
} catch (IOException e)
{OutMgr .print (" **** ERROR: Exception writing coherency data **** " + ofile ); }
} */
OutMg .print (OutMgr. INCSTATUS, " Created: " + OutMgr . chopPat (_filename)
+ " size: " + _filehandle. length 0 + " bytes "
/* if (noname != null)
OutMgr. print (OutMgr. INCSTATUS, " Created: oc_noname.htm" ); */
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 91 of 156 / / { { DECLARE_CONTROLS //})
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 92 of 156 import java.awt.*; import java.10. File; import Symantec . itools . awt . ImagePanel ; import Symantec . itools . awt . BorderPanel ; import com. sun. java. swing. JProgressBar; public class InputsDialog extends Dialog { public InputsDialog (WWWhooshServer parent, boolean modal)
{ super (parent, modal); _parentapp=parent;
// This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
// { { INIT_CONTROLS setLayout (null) ; setBackground ( java.awt .Color . lightGray) ; setSιze(484,403) ; setVisible (false) ; okButton. setLabel ("OK") ; ad (okButton) ; okButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); okButton. setBounds (280,374, 64, 20) ; button2. setLabel ("Cancel") ; add(button2) ; button2. setFont (new Font ("Dialog", Font. PLAIN, 12)); button2. setBounds (344, 374,64,20) ; buttonl . setLabel ( "Apply" ) ; add (buttonl) ; buttonl. setFont (new Font ("Dialog", Font. PLAIN, 12)); buttonl. setBounds (406, 374 , 64 , 20) ; try { borderPanell . setBevelStyle (Symantec . ltools . awt . BorderPanel . BEVEL_RAISED) } catch (java. eans. PropertyVetoException e) { } try { borderPanell . setLabel ( " Server Setup " ) ; } catch (java.beans. PropertyVetoException e) { } try { borderPanell . setAlignStyle (Symantec. itools . awt .BorderPanel .ALIGN_LEFT) ; } catch (java. beans . PropertyVetoException e) { } borderPanell . setLayout (null) ; ad (borderPanell) ; borderPanell. setBounds (10, 12, 464,170) ; label7. setText ( "text" ) ; borderPanell .add(label7) ; label7. setBounds (134, 222, 100, 40) ; labell . setText ( "Domain Name : " ) ; borderPanell .add (labell) ; labell. setBounds (8, 8, 129, 19) ; label3. setText ( "Default Page : " ) ; borderPanell .ad (label3) ; label3. setBounds (8, 80, 129,19) ; textFιeld4. setText ("htm html shtml") ; borderPanell. add (textFιeld4) ; textFιeld4. setBounds (139,32,300,20) ; textFieldl. setText ("www. yourdomainhere . com") ; borderPanell. add (textFieldl) ; textFieldl. setBounds (139, 8, 300, 20) ; label . setText ("HTML File Extensions:"); borderPanell .add (label4 ) ; label4. setFont (new Font ("Dialog", Font. PLAIN, 12)); label4. setBounds (8, 32, 129, 19) ;
PCT Application Docket A-027, Office ofChas.G. Call, Reg. No.20,406, Appendix- Page 93 of 156 subobjextField. setText ("gif jpg jpeg"); borderPanell .add (subobjextField) ; subobjextField. setBounds (139,56, 300,20) ; label6. setText ("Subobject Extensions : ") ; borderPanell. add (labelδ) ; label6.setBounds(8,56,129,19) ; textField3. setText ("index.html") ,- borderPanell. add (textField3) ; textField3. setBounds (139, 80,300, 20) ; do ainRootField. setText ( "domain directory") ; borderPanell . add (domainRootField) ; domainRootField. setBounds (139, 104, 233, 20) ; label9. setText ("Domain Root:") ; borderPanell. add (label9) ; label9. setBounds (8,104,129,19) ; rootButton . setLabel ( "Browse ..."); borderPanel1. add (rootButton) ; rootButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); rootButton. setBounds (376, 104, 64 , 20) ; try { borderPanel2. setBevelStyle ( Symantec . itools . awt . BorderPanel . BEVEL_RAISED) ; } catch(java. beans . PropertyVetoException e) { } try { borderPanel2. setLabel (" Inputs for Processing "); } catch (java. beans . PropertyVetoException e) { } try { borderPanel2.setAlignStyle (Symantec. itools . awt .BorderPanel. ALIGN_LEFT) ; } catch (java. beans . PropertyVetoException e) { } borderPanel2. setLayout (null) ; add (borderPanel2) ; borderPanel2.setBounds(10,191,465,182) ; borderPanel2.add(list2) ; list2. setBounds (9, 47, 366, 88); borderPanel2.add(textField2) ; textField2. setBounds (63, 6, 309, 20) ; insertButton. setLabel ("Insert File") ; borderPanel2. add ( insertButton) ; insertButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); insertButton. setBounds (378, 55, 64, 20) ; deleteButton. setLabel ("Delete") ; borderPanel2. add (deleteButton) ; deleteButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); deleteButton. setBounds (378, 106, 64, 20) ; browseButton. setLabel ("Browse... ") ; borderPanel2. ad (browseButton) ; browseButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); browseButton. setBounds (376, 6, 64, 20) ; insPathButt. setLabel ("Insert Path") ; borderPanel2.add(insPathButt) ; insPathButt. setFont (new Font ("Dialog", Font. PLAIN, 12)); insPathButt. setBounds (378,80, 64,20) ; label5. setText ("Add New:"); borderPanel2. add (label5) ; label5. setBounds (8, 5, 52,23) ; try { borderPanel3. setBevelStyle (Symantec . itools . wt . BorderPanel . BEVEL_RAISED) ; } catch (java.beans. PropertyVetoException e) { } try { borderPanel3. setPaddingRight ( 1 ) ; } catch (java.beans . PropertyVetoException e) { } try { borderPanel3. setPaddingBottom ( 1 ) ; } catch (java.beans. PropertyVetoException e) { }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 94 of 156 try { borderPanel3. setPaddmgTop ( 1 ) , } catch(java. beans. PropertyVetoException e) { } try { borderPanel3. setPaddmgLeft (1) ; } catch (java. beans. PropertyVetoException e) { } borderPanel3. setLayout (null) ; borderPanel2. add (borderPanel3 ) ; borderPanel3. setBounds (10, 33, 432,5) ; setTitle ("WWWhoosh Inputs: Files to Process"); //))
//{ (REGISTER_LISTENERS
SymWindow aSymW dow = new SymWindow () ; this . addWindowListener (aSymWmdow) ; SymAction lSymAction = new SymAction (); okButton. addActionListener (lSymAction) ; button2.addActionListener (lSymAction) ; insertButton. addActionListener (lSymAction) ; deleteButton. addActionListener (lSymAction) ; browseButton. addActionListener (lSymAction) ; lιst2.addActionListener (lSymAction) ; insPathButt . addActionListener (lSymAction) ; buttonl . addActionListener (lSymAction) ; textFιeld2.addActionListener (lSymAction) ; rootButton. addActionListener (lSymAction) ; //}} } public InputsDialog (WWWhooshServer parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSιze(); super .addNotify () ;
// Only do this once, if (fComponentsAdjusted) return;
// Adjust components according to the insets
Insets insets = getlnsetsO; setSize ( sets .left + insets . right + d. width, msets. top + msets.bottom + d. height);
Component components!] = getCo ponents 0 ; for (mt ι = 0; l < components . length; ι++)
{
Point p = components [1] . getLocation () ; p. translate (insets. left, msets . top) ; components [ I] . setLocation (p) ; }
// Used for addNotify check. fComponentsAdjusted = true; } public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent (). getBounds () ; Rectangle abounds = getBounds () ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 95 of 156 setLocation (bounds .x + (bounds. width - abounds. width) / 2, bounds. y + (bounds .height - abounds .height) 12 ) ; } super. setVisible (b) ;
}
WWWhooshServer _parentapp=null; //{ {DECLARE_CONTROLS ava . awt . Button okButton = new ava.awt .Button () ; java.awt .Button button2 = new java.awt .Button () ; ava.awt .Button buttonl = new java.awt .Button () ;
Symantec. ltools .awt .BorderPanel borderPanell = new Symantec. ltools. awt. BorderPanel 0 , java.awt . Label label7 = new java. awt .Label () ; java.awt . Label labell = new java.awt .Label () ; j ava . awt . Label label3 = new java awt.LabelO; java.awt .TextField textFιeld4 = new java awt .TextField 0 ; java.awt .TextField textFieldl = new java awt .TextField 0 ; java.awt . Label label4 = new java. awt .Label () ; java.awt .TextField subobjextField = new java.awt TextFieldO; java.awt .Label label6 = new java. awt. Label () ; java.awt . TextField textFιeld3 = new java awt .TextField 0 ; java.awt .TextField domainRootField = new java.awt .TextFieldO ; java.awt . Label label9 = new java. wt. Label () ; java.awt .Button rootButton = new java.awt .Button () ;
Symantec. itools. awt .BorderPanel borderPanel2 = new Symantec. ltools. awt .BorderPanel () , java.awt .List lιst2 = new java.awt . List (4 ) ; java. awt .TextField textFιeld2 = new ava. wt. TextField 0 ; java. awt .Button insertButton = new java.awt. Button () , java.awt .Button deleteButton = new java. awt. Button {) java. awt .Button browseButton = new j ava. awt. Button () , java. awt .Button insPathButt = new java.awt .Butto () ; java. awt .Label label5 = new java.awt .Label () ;
Symantec. itools. awt .BorderPanel borderPanel3 = new Symantec. itools . awt .BorderPanel () //}}
// Used for addNotify check, boolean fComponentsAdjusted = false; class SymAction implements ava.awt . event ActionListener { public void actionPerformed (java.awt . event .ActionEvent event) {
Object object = event. getSource () ; if (object == okButton) okButton_ActιonPerformed (event) ; else if (object == button2) button2_ActιonPerformed (event) ; else if (object == insertButton) msertButton_ActιonPerformed (event) ; else if (object == deleteButton) deleteButton_ActιonPerformed (event) ; else if (object == browseButton) browseButton_ActιonPerformed [event) ; else if (object == lιst2) lιst2_ActιonPerforme (event) ; else if (object == insPathButt) ιnsPathButt_ActιonPerformed (event) ; else if (object == buttonl) buttonl_ActιonPerforme (event) ; else if (object == textFιeld2) textFιeld2_ActιonPerformed (event) ; else if (object == rootButton) rootButton ActionPerforme (event) ;
void σkButtσn_ActιonPerformed (java.awt . event .ActionEvent event) {
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 96 of 156 okButton_ActιonPerformed_Interactιonl (event) ; } void okButton_ActιonPerformed_Interactιonl (java.awt . event .ActionEvent event) {
Config.setExtensions (textFιeld4. getText ( ) ) ; Config. setDefaultFile (textFιeld3. getText () ) ; Config. setDomain ( textFieldl .getText ( ) ) ; String [] flist = lιst . getltems () ; Config. setRootDir ( domainRootField. etText () );
//warn them about bad filenames, but allow them to proceed for (mt l =0; K flist. length; ι++) {
File testfile = new File (flist [I] ) ; if (! testfile. exists 0 )
OutMgr. print ("*** WARNING - File Not Found *** " + testfile.getAbsolutePathO ) ; }
Config. setFiles (flist ) ; _parentapp.updateStatLabels 0 ; try { this. dispose 0 ; } catch (Exception e) (
class SymWindow extends java. awt. event. dowAdapter { public void windowOpened ( java.awt . event WindowEvent event) {
Object object = event .getSource () ; if (object == InputsDialog. this)
InputsDιalog_W dowOpened (event) ; } public void windowClosin (java.awt . event .WindowEvent event) (
Object object = event . getSource 0 ; if (object == InputsDialog. this)
InputsDιalog_W dowClosιng (event) ;
void InputsDιalog_WmdowClosιng (java.awt .event WindowEvent event) {
// to do: code goes here.
InputsDιalog_WιndowClosmg_Interactιonl (event) ;
void InputsDιalog_WιndowClosing_Interactιonl (java.awt . event .WindowEvent event) {
ConfirmSaveDialog csd = null; try {
// ConfirmSaveDialog Create and show as modal csd = new ConfirmSaveDialog ( _parentapp, true); csd. setVisible (true) ; } catch (Exception e) { } if (csd.SAVEIT) updateConfigO ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 97 of 156 setVisible (false) ;
} void button2_ActιonPerformed ( ava awt. event .ActionEvent event)
{
// to do: code goes here. button2_ActιonPerformed_Interactιonl (event) ; } void button2_ActιonPerformed_Interactιonl (java.awt event .ActionEvent event) {
_parentapp.updateStatLabels () ; try {
// InputsDialog Hide the InputsDialog this. setVisible (false) ; } catch (Exception e) { } } void InputsDιalog_WmdowOpened(java. awt.event.WindowEvent event) {
// to do: code goes here. textFιeld4. setText (Config . getExtensions 0 ) ; textFιeld3. setText (Config. getDefaultFile () ) ; textFieldl. setText (Conflg.getDoma 0 ) ; domainRootField. setText (Config. getRootDir 0 ) ; textFιeld2. setText (Config. getRootDir ( ) ) ; String [] flist = Con ig . getFiles ( ) ; if (flist ι =null ) for ( t ι=0 ; Kflist . length; ι++) lιst2. add (flιst [ι ] ) ;
} void ιnsertButton_ActιonPerforme (java.awt .event.ActionEvent event) {
// to do: code goes here.
String fspec = textFιeld2.getText () ; if ((fspec '= null) && ' fspec. equals ("") ) lιst2. add (fspec) ;
) void deleteButton_ActιonPerformed (java.awt .event .ActionEvent event)
{
String item = lιst2.getSelectedltemO ; lιst . remove ( item) ; } void browseButton_ActιonPerformed (j ava . awt . event .ActionEvent event ) { FileDialog fileDialogl = new java. awt . FileDialo ( (Frame) this. getParent 0 ) textFιeld2. setText (domainRootField. getText () ) ; if (textFιeld2. etText 0 '= "") fileDialogl. setDirectory ( textFιeld2.getText ( ) ); else fileDialogl .setDirectory ( Config. getRootDir ( ) ) ; fιleDιalogl.setFιle(Confιg.getDefaultFιle() ) ; fileDialogl .setVisible (true) ; String inFileName = fileDialogl .getFile ; String dirname = fileDialogl . getDirectory 0 ; if (inFileName '=null) textFιeld2. setText (dirname + inFileName); Config. setCurDir (dirname) ; Config. setDoma (textFieldl. getText 0 ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 98 of 156 void lιst2_ActιonPerformed (java.awt . event .ActionEvent event)
{ textFιeld2. setText (lιst2. getSelectedltern () ) ;
} void sPathButt_ActιonPerformed ( ava. awt .event .ActionEvent event) { String fspec = textFιeld2.getText () ; if ((fspec ι= null) && > fspec. equals ("") ) {
String pathpart = fspec; int lastslash = fspec. lastlndexOf ( "\\") ; if (lastslash > -1) pathpart = fspec. substring (0, lastslash) ; lιst2.add (pathpart) ;
void updateConfig () {
Config . setExtensions (textFιeld4. getText ( ) ) ; Config. setDefaultFile (textFιeld3. getText () ) ; Config. setDoma ( textFieldl .getText ( ) ); Config. setRootDir ( domainRootField. getText 0 ) ; String!] flist = lιst2. getltems () ; Config. setFiles (flist ),
_parentapp.updateStatLabels 0 ;
}
void buttonl_ActιonPerformed (java .awt. event .ActionEvent event) { updateConfi ( ) ;
} void text Fιeld2_ActιonPer forme (java . awt . event . ActionEvent event) { msPathButt_ActιonPerf ormed (event) ;
} void rootButton_ActιonPerformed (java . awt . event .ActionEvent event )
{
FileDialog fιleDιalog2 = new java.awt . FileDialog ( (Frame) this . getParent ()) , if (domainRootField. getText () '= "") fιleDιalog2.setDirectory ( textFιeld2. getText () ), else fιleDιalog2. setDirectory ( Config. getRootDir () );
//fιleDιalog2.setFιle (Config. getDefaultFile 0 ) ; fιleDιalog . setVisible (true) ;
String inFileName = fιleDιalog2. getFile 0 ; String dirname = fιleDιalog2.getDιrectory 0 ; Config. setRootDir (dirname) ; if (inFileName '=null)
{ domainRootField. setText ( Config. etRootDi 0 ) ; textFιeld2.setText ( Con ig. getRootDir () ),
} Config. setCurDir (dirname) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 99 of 156 Config. setRootDir (domainRootField. getText 0 )
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 100 of 156 /*
A basic extension of the j ava . awt Dialog class */ import java.awt.*; import Symantec . ltools . awt. BorderPanel; public class LogLevelDialog extends Dialog
(
Frame parent;
public LogLevelDialo (Frame parent) super (parent) , _parent=ρarent ,
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{{INIT_CONTROLS setLayout (null) ; setBackground (java.awt . Color. lightGray) ; setSιze(320,234) ; setVisible (false) ; okButton. setLabel ("OK") ; add (okButton) , okButton. setBounds (114, 204, 64, 20) ; buttonl. setLabel ("Cancel") ; add (buttonl) , buttonl. setBounds (179, 204, 64, 20) ; button2. setLabel ( "Apply" ) ; add(button2) ; button2. setBounds (244,204, 64,20) ; try { borderPanel3. setBevelStyle (Symantec . itools . wt . BorderPanel . BEVEL_RAISED) } catch ( ava.beans . PropertyVetoException e) { } try { borderPanel3. setLabel (" Logging ") ; } catch (java.beans. PropertyVetoException e) { } try { borderPanel3.setPadd gRight (0) ; } catch (java.beans . PropertyVetoException e) { ) try { borderPanel3. setPaddιngBottom(O) ; } catch ( ava. beans . PropertyVetoException e) { } try { borderPanel3. setPaddingTop (0) ; } catch ( ava. beans . PropertyVetoException e) { } try { borderPanel3. setPaddingLeft (0) ; } catch (java. beans . PropertyVetoException e) { } try { borderPanel3. setAlignStyle (Symantec. itools awt .BorderPanel .ALIGN_LEFT) ; } catch ( ava. beans . PropertyVetoException e) { } borderPanel3.setLayout (null) ; add(borderPanel3) ; borderPanel3. setBounds (10,11,299,188) ; checkbox4. setLabel ("Print Incremental Status ");
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 101 of 156 borderPanel3.add (checkbox4) ; checkbox4. setFont (new Font ( "Dialog" , Font. PLAIN, 12)); checkbox4. setBounds (16,78,179,26) ; checkboxl. setLabel ("Print Filenames") ; borderPanel3.add (checkboxl) ; checkboxl. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkboxl. setBounds (16, 6, 116, 24) ; checkbox2. setLabel ("Print Full Paths"); borderPanel3.add(checkbox2) ; checkbox2. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkbox2. setBounds (16, 30, 116, 24) ; checkbox3. setLabel ("Print Debug Messages"); borderPanel3.add(checkbox3) ; checkbox3. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkbox3. setBounds (16, 53, 179, 26) ; checkbox5. setLabel ("Append to Logfile"); borderPanel3.add(checkbox5) ; checkbox5. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkbox5. setBounds (16, 104, 179, 26) ; borderPanel3. add (textFieldl) ; textFieldl. setBounds (57, 137,227,20) ; labell. setText ("Logfile") ; borderPanel3.add (labell) ; labell. setBounds (16, 136, 45,22) ;
//}}
//{ {REGISTER_LISTENERS
SymWindow aSymWmdow = new SymWindowO; this .addWindowListener (aSymWmdow) ; SymAction lSymAction = new SymAction () ; button2. addActionListene (lSymAction) ; okButton. addActionListener (lSymAction) ; buttonl .addActionListener (lSymAction) ; //}}
} public LogLevelDialog (Frame parent, boolean modal) { this (parent) ; setModal (modal) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSize O ; super .addNotify ( ) ; if (fComponentsAdjusted) return;
// Adjust components according to the msets
Insets insets = getlnsetsO; setSize (insets . left + insets. right + d. width, msets. top + insets. ottom + d. height ) ;
Component components [ ] = getComponents ( ) ; for ( t ι = 0; I < components . length; ι++)
{
Point p = components [i] .getLocatιon() ; p. translate (insets .left, msets .top) ; components [I] .setLocation (p) ; } fComponentsAdjusted = true; }
// Used for addNotify check, boolean fComponentsAdjusted = false;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 102 of 156 public LogLevelDialog (Frame parent, String title, boolean modal)
{ this (parent, modal) ; setTitle (title) ; }
/**
* Shows or hides the component depending on the boolean flag b.
* Θparam b if true, show the component; otherwise, hide the component.
* Θsee java. awt. Component#ιsVιsιble */ public void setVisible (boolean b) { xf (b) {
Rectangle bounds = getParent () .getBounds () ; Rectangle abounds = getBounds ( ) ; setLocation (bounds. + (bounds .width - abounds .width) / 2, bounds. y + (bounds .height - abounds. height ) 12 ) ; } super. setVisible (b) ;
}
// { { DECLARE_CONTROLS java .awt. Button okButton = new java.awt .Button () ; java. awt. Button buttonl = new java. awt .Button () ; java.awt .Button button2 = new java. awt .Button () ;
Symantec. itools. awt . BorderPanel borderPanel3 = new Symantec. itools . awt .BorderPanel ( ) java .awt. Checkbox checkbox4 = new java.awt . Checkbox ( ) java .awt. Checkbox checkboxl = new java.awt . Checkbo () java .awt. Checkbox checkbox2 = new java.awt . Checkbox () java awt. Checkbox checkbox3 = new java.awt . Checkbox ( ) java. awt. Checkbox checkbox5 = new java.awt . Checkbox ( ) java. awt. TextField textFieldl = new java . awt . TextField () ; java. awt. Label labell = new java.awt. Label () ;
//}) class SymWindow extends java. awt .event .WmdowAdapter { public void w dowOpened (java. awt .event. WindowEvent event) {
Object object = event .getSource () ; if (object == LogLevelDialog. this)
LogLevelDιalog_WmdowOpened (event) ; } public void windowClosing (java. awt .event .WindowEvent event) {
Object object = event. getSource () ; if (object == LogLevelDialog. this)
LogLevelDιalog_WmdowClosmg (event) ; } } void LogLevelDιalog_WιndowClosmg (java.awt. event .WindowEvent event) {
Con irmSaveDialog csd = null; try {
// ConfirmSaveDialog Create and show as modal csd = new ConfirmSaveDialog ( _parent, true); csd. setVisible (true) ; } catch (Exception e) { } if (csd.SAVEIT) { OutMgr . PRINT_FILENAMES =checkboxl . getState ( ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 103 of 156 OutMgr . PRINT_FULLNAMEΞ =checkbox2. getState ( ) ; OutMgr . PRINT_DEBUGMSG =checkbox3. getState ( ) ; OutMgr . PRINT_INCSTATUS =checkbox . getState ( ) ; OutMgr . LOG_APPEND =checkbox5. getState ( ) ; Config. setLogFile (textFieldl. getText () ) ; OutMgr . setLogflie (textFieldl . getText ( ) ) ; ) setVisible (false) ; } class SymAction implements java. awt . event . ActionListener { public void actionPerformed (java.awt .event. ActionEvent event)
{
Object object = event. getSource () ; if (object == button2) button2_ActιonPerformed (event) ; else f (object == okButton) okButton_ActιonPerformed (event) ; else if (object == buttonl) buttonl_ActιonPerformed (event) ; } } void button2_ActionPerforme ( java.awt. event .ActionEvent event) {
OutMgr. PRINT_FILENAMES =checkboxl . getState ( ) ;
OutMgr. PRINT_FULLNAMES =checkbox2. getState () ;
OutMgr. PRINT_DEBUGMSG =checkbox3. getState () ; OutMgr . PRINT_INCSTATUS =checkbox4. getState ( ) ;
OutMgr. LOG_APPEND = checkbox5. etState () ;
Config. setLogFile (textFieldl .getText () ) ;
OutMgr . setLogfile ( textFieldl . getText () ) ;
} void okButton_ActionPerforme (java. awt. event .ActionEvent event)
{ button2_ActionPerforme ( event) ; okButton_ActionPerformed_Interactionl (event) ; } void okButton_ActionPerformed_Interactionl (java.awt . event .ActionEvent event) { try {
// LogLevelDialog Hide the LogLevelDialog this. setVisible (false) ; } catch (Exception e) {
void LogLevelDialog WindowOpened ( ava. awt .event .WindowEvent event)
// to do: code goes here. checkboxl .setState (OutMgr. PRINT_FILENAMES) checkbox . setState (OutMgr, PRINT_FULLNAMES ) checkbox3. setState (OutMgr. PRINT_DEBUGMSG) ; checkbox . setState (OutMgr . PRINT_INCSTATUS checkbox5. setState (OutMgr . LOG_APPEND) ; textFieldl . setText (Config, getLogFileO ) ;
void buttonl_ActionPerformed (java.awt .event .ActionEvent event) {
// to do: code goes here. hide ( ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 104 of 156
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 105 of 156 import java.util.*; import ava.util.zip.*; import java.io *; import WWWhooshCommon . * ,
/* ********************** OPTIMIZER ** ******************************** II II Sauthor Mark Palmer II I I Θversion 0.1 initial beta release, l-JUL-1999
// aversion 1.0 support version mfo in header, compression optional
// aversion 2.0 support incremental updates
//
//
// Modifications:
//
//
// This class is responsible for taking an input directory or file spec and outputtmg
// OC and OCD files for it. It interacts with the GUI and Config classes to decide
// how much to do. The Optimizer is a Thread so it can be stopped/started by GUI
// Button callbacks running m the main thread.
//
// BUILD DATE COMMENTS
//
// 746 4-Aug-99
//
// 1- buttons reworked to be better placed and uniform sizes
//
// 2- error messages made more uniform (case and severity levels)
//
// 3- STOP button message changed -
// changed the message so it says "Finishing current input" as
// soon as you hit the button, then "Generation Halted" is printed
// after the current input is done processing.
//
// 4- changed domain root specification to use browse field
//
//
// 13-Aug-99 More GUI refinement:
// made some dialogs modal
// moved buttons off panels
// set -noresize
//
// 14-Aug-99 performance issues - initialization time
//
// 18-Aug-99 rework logging, add -append
//
// 19-Aug-99 create/integrate FileFormatMgr class to write header
// mfo before OC and OCD mfo
//
// 30-Aug-99 add dialog to save changes on input dialog close, fix logging bug
// consolidate WhooshHeader class - common across client and server
//
// l-Sep-99 move
// Incremental updates: generate OC BEFORE OCD, and compare all timestamps.
// if none have changed, skip writing OC and generating OCD
//
// 2-Sep-99 renamed all classes and vars and labels from ICDS to WWWhoosh
//
/********************************* OPTIMIZER ***************************************/ public class Optimizer extends Thread
{
Hashtable _OCdupcheck= new Hashtable (); //to detect duplicate entries while building OC
Hashtable _OCDdupcheck= new Hashtable ( ) , //to detect duplicates while building OCD
Hashtable notfounds= new Hashtable () ; //to prevent duplicate "not found" error messages static String _lmebuf=""; //buffer for reading lines of HTML files WWWhooshServer server=null; //handle to GUI thread for updating statistics
PCT Application Docket A-027, Office of Chas.G. Call, Res. No. 20,406, Appendix- Page 106 of 156 //legal characters - we hash into this string to check for legal substrings
//TODO: convert so we check whether numeric value is m alphanumeric range
String OKchars = "abcdefghι klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.-_/\\";
String [ ] _flιst=null; //list of files to be processed boolean haltmsg=false; boolean done=false;
//main method called by Thread. start () ; public void run () { while (true) {
Stats. clear () ;
OutMgr. print (" > " +
"Site optimization started at " + new Date 0. toLocaleStnng 0
+ » < " ) ;
OutMgr.print (" "); reset () ; // _flιst = Con ig.getFiles ( ) ; if (_flιst ' = null) { for (int l = 0; K _flist . length; ι++) { File lιstm=new File (_flist [I] ) ; if ( ' listm. exists () )
OutMgr. print (" **** ERROR: Specified input file not found **** " +
OutMgr. chopPath ( OutMgr. chopPath (listin.getAbsolutePath () ) ) + " - skipping" else if (list . lsDirectory ( ) ) process (_flist [I] trιm(), null); else process (listin.getParent () , listm getName ( ) ); }
OutMgr. prin ("\r\n") ;
Config . setDate (new Date ( ) . toLocaleStnng ( ) ) ;
OutMgr .print ("Run Summary Statistics: " + Conflg.getDomam ( ) ); OutMgr .print (" " + Stats ._numChecks + " unique checks generated") OutMgr .print (" " + Stats ._notFound + " SRC file missing errors") OutMgr .print (" " + Stats _numOutFιles + " files generated") ;
OutMgr .print (" " + Stats ._numInFιles + " files read") ;
OutMgr. print (" " + Stats. _bytesRead + bytes read"
OutMgr .print (" + Stats. _bytesWπtten + " bytes written");
// TODO: consider reporting these statistics
// density and efficiency are conceived as simple relative numeric measures of the
// average round-trips and bandwith savings to be expected by processing a site using Optimizer
//
// OutMgr. print (" " + "Density: " + Stats . numChecks/Stats ._numInFιles + "\n");
// OutMgr. print (" " + "Efficiency: " + Stats ._byte≤Read/Stats._bytesWrιtten + " \n\n");
OutMgr. print (" ") ;
OutMgr. print (" > " +
"Site optimization ended at " + new Date () .toLocaleStnng ()
+ .. < .. ) ;
if (Conflg.getContinuous ( ) == false)
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 107 of 156 return; try
{ long t pst = System. currentTimeMillis ( ) + Config. getGenlnterval () * 60000;
Date tmpd = new Date (tmpst);
OutMgr .print (" > Next Run Time: " + tmpd. toLocaleString () ),
sleep ( Config. getGenlnterval () * 60000 ) catch (InterruptedException ie)
{)
}//end of forever
) public synchronized void finishCycle ( )
{done=true; notifyAHO ; } public synchronized void waitForCycle ()
( while ( I one) try{ this. wait ( ) ;
} catch (InterruptedException ie) {} }
//Accessor and utility methods /********************************* UTILITY METHODS **************************************/ public void setFileList (String [ ] flist)
//Sinput flist - array of file or directory names to be processed {_flist = flist; }
//clear duplicate-check caches public void reset () {
_OCdupcheck = new Hashtable (); _OCDdupcheck = new Hashtable () ; } public Optimizer (WWWhooshServer s) //Sinput s - handle to GUI thread
{_server=s ; // { { INIT CONTROLS
//}}
}
//heck whether a given file has been generated by this utility //in order to avoid processing files that we generated // boolean isOCFile (String infile) { if ( infile. substring (0, 3) .equalsIgnoreCase ("oc_") || file. substring (0,4) . equalsIgnoreCase ("ocd_") ) return true; return false; }
//general rule for extracting filenames: if valid extension after last dot /***************************** ****READ LEGAL SUBSTRING ******************************/ public String readLegalString (BufferedReader f)
{ if (f== null) return null;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 108 of 156 String result=" " ; while (result == "") {
//TODO: handle different length extensions - hack here assumes all <= 4 //TODO: get the list of extensions from user config if (_lιnebuf '= null) { ext = _lmebuf. mdexOf (" src"); if (ext == -1) ext = _linebuf.indexOfC.gif"); if (ext == -1) ext = _lmebuf. mdexOf (". jpg") ; if (ext == -1) ext = _linebuf.indexOfC.htm"); } if (ext '= -1) // extensions in this line
(
//we have a subobject extension starting at ext //lop off stuff to the right char[] toend = _lmebuf . toCharArray ( ) ; int endpath=_lmebuf. length () -1; int startpath=0; while ( (OKchars . dexOf (toend [startpath] ) == -1) && (startpath < endpath) ) //skip bad startpath++; endpath=startpath; while ((endpath < _lιnebuf. length () ) && (OKchars . mdexOf (toend [endpath] ) '= -1)
) //get good
{ endpath++; } result = _lιnebuf. substring (startpath, endpath) ; _lmebuf = _lmebuf. substring (endpath) ; } else try //no extension found, get another line { result = ""; _lmebuf=f . readLine ( ) ; if (_lmebuf==null) { f .close () ; return null; }
_lιnebuf = _lmebuf. toLowerCase () ; } catch (IOException loe)
{OutMgr. print ("****ERROR - 10 Exception reading input stream *** " + loe ); result=null; } } return result; }
/********************************* DETECT SUBOBJECT FILENAME ******************************/ //general rule for detecting subobject filenames: if valid extension after last dot // TODO: how do we handle filenames with no extension?
// perhaps by opening each file and looking for the header bytes of a .gif file, etc. // public static boolean isSubobject (String f) //Sinput f - filename to be checked
//Sreturns whether filename is considered a subobject for building checks and OCDs {
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 109 of 156 if ( f== null ) return false;
String filename = f. toLowerCase () ; int dot = filename.lastIndexOfC.gif"); dot = fllename. lastlndexO (".") , if (dot == -1) return false;
//rule out filenames that continue past the extension if ( (filename length ( ) < dot+4) || (filename . length ( ) > dot+5) ) return false;
String ext = ilename. substring (dot+1, dot+4) ; if (Conflg.getSubobjectExtensions () . indexOf (ext . toLowerCase () ) l= -1)
{return true; } else return false;
)
/************ utility to unify slash direction, lowercase, and eliminate back refs *****************
//
// There can be many ways of referring to the same file, and the same file spec gets reported
// differently by various system calls and differently when these same Java calls are run on
// different OSs. Once the filenames are converted into URL format on the server, the
// client must know how to take browser-generated URLs and normalize them across browsers and OSs
// into this same format for matching when consulting the cache
//
// This method takes an input filename and converts it to a canonical format.
// - lowercase
// - full pathnames
// - forward-slashes
// - directories always terminated by slash
// - no backup indicators (e.g. "foo/ .. / .. /bar" )
// - no reset indicators (.e.g. "./foo")
// * * * **** * * ** * * **** ** * * * ***** ** ** * ***** * * NOR ALIZE NAME ****+**************************************/
// public String normalizeName (String f)
{
String full = f. replace (' \\ ','/' ) toLowerCase () ; t cut = full. mdexOf ("//") ; while ( cut '= -1) { String parti = full . substring (0, cut+1) ; String part2 = full . substring (cut+2) ; full = parti + part2; cut = full. dexOf ("//") ; } cut = ful1. mdexOf ("/./") ; while ( cut '= -1) { String parti = full substring (0, cut+1) ; String part2 = full . substrιng(cut+3) ; full = parti + part2; cut = full. mdexOf ( " I . I" ) ; } cut = full. dexOf ("/../") ; while ( cut '= -1)
{
String parti = full . substrin (0, cut) ; t lsl = parti. lastlndexOf ("/") ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 110 of 156 if ( lsl ι = -1 ) parti = parti . substring (0, lsl) ;
String part2 = full. substring (cut+3) ; full = parti + part2; cut = full.indexOf ("/. /") ;
} return full; }
J* * * * ** * * * * * *** * * * * * * ** * * * * * * * * ** * * * * * * * * AKE FULL URL *******************************+*******/
//
// This matches the current root directory with the full path spec of a file, replacing the // root directory with the domain name that will eventually be part of the URL as seen by the // browser. The root directory is that place in the file system where the web server will // look for files at the domain level, i.e. the directory where www.foo.com/mdex.html // w ll be found. //
/************* utility method to create full URL from File at local root *********************/ public String makeFullURL (File nf) { String fullURL="";
String fullfile = normalizeName (nf. getAbsolutePath ()) ; String rootdir = Config. getRootDir () , if (rootdir == null) {
OutMgr.print ("*** ERROR - No root directory specified for configuration file *** ") ; return null; } rootdir = normalizeName (rootdir) , if (fullfile. startsWith (rootdir) ) { fullURL = Config. getDomam () . toLowerCase () ; fullfile = fullfile. substring ( rootdir . lengt 0 ), if { ( 'fullURL.endsWithC'/") ) && ('fullfile startsWith ("/")) ) fullURL += "/", fullURL += fullfile, } else
OutMgr. rint ("*** ERROR - no match for root dir : " + fullfile ); if (fullURL == null) {
OutMgr. print ("*** ERROR - root " + rootdir + " not matched with " + fullfile ); return "ERR0R-"+ fullfile ; } return fullURL; }
/*****+*******************++**+********** PROCESS *****+**************************************/
//
// This method navigates the file/directory structure and calls generateCoherency and genereateOCD // It is responsible for taking a file/directory spec and expanding the directories depth-first, // recursively. The order is determined by the way the file system call returns a list of files // m a directory. //
/**************************** NAVIGATE DIRECTORY TREE TO GENERATE INFO ***********************/ void process (String fd, String fn) { if (_server. halted ( ) ) { if ( 'haltmsg ) { OutMgr .print (" > " +
"Generation halted at " + new Date () .toLocaleStnng ( ) + .. < .. , .
PCT Application Docket A-027, Office of Chas.G. Call, Res. No. 20,406, Appendix- Page 111 of 156 haltmsg=true;
} return; }
//recursively traverse tree
//must have file directory fd argument if (fd == null) return;
File procroot=null;
//adjust for NT vs W98 if ( !fd.endsWιth('7") ) fd += "/"; if (fn != null) procroot = new Fιle(fd + fn) ; //look at file arg to see if directory else procroot = new Fιle(fd); //if fname is null, we consider fd a directory spec if (procroot. isDirectory () ) {//process files String curdir = procroot .toString () ; OutMgr. print (" ");
OutMgr .print ("Processing directory: " + OutMgr . chopPath (curdir) ); String!] flist = procroot . list 0 ; for ( t i = 0; i<flist . length; i++) {
// skip existing oc_ files String tmpf = flist [ι]; if (tmpf .length () > 3) { if ( ϋsOCFιle(tmpf) ) process (curdir, tmpf); } } } else //not a directory, process file { if (fn. lengt () > 3) if (isOCFile(fn) ) return; int dot = fn. lastlndexOf (".") ; if (dot > 0)
{
String ext = fn. substring (dot+1, fn. lengt ()) .trim ( ) ; if (Config. mExtensionList (ext) ) {
String rootdefault = Config. getDefaultFile () ;
String tmpfname = normalizeName (procroot . getAbsolutePath ()) ;
//for default files, allow all unique subobjects //reset global dup checker tables if (tmpfname. indexOf (rootdefault) != -1) (
_OCdupcheck = new Hashtable (); _OCDdupcheck = new Hashtable ( ) ; }
//Generate the coherency information for all but the OCD file String newOCStπng. = generateCoherency (fd, fn) ; String oldOCString = "";
//We now have a new coherency string generated and we want to compare it
PCT Application Docket A-027, Office ofChas.G. Call, Reg. No.20,406, Appendix- Page 112 of 156 //to the coherency data last generated.
//If none are different, we skip producing both the OC and the OCD.
String OCfile = "oc_" + fn; Config. setCurOutFile (OCflie) ; String ocdfile = "ocd_" + fn;
FileFormatMgr old_OC = new FileFormatMg () ; File oldOCIn = new File (fd, OCflie) ; try{
FilelnputStream ocin = new FilelnputStream(oldOCIn) ;
Bufferedlnputstream bis = new BufferedlnputStream(ocin) ; oldOCStr g = old_OC. readCoherency (bis) ; } catch (IOException loe) {
// OutMgr print!" **** WARNING: old OC file not read *** " + oldOCIn. toString () ); } if (newOCStrmg compareTo (oldOCStrmg) == 0) {
OutMgr. print (" **** skipping unchanged page *** " + OutMgr. chopPath (fn) ); return; }
//collect the index and blob m two parallel streams ByteArrayOutputStream ldxbytes = new ByteArrayOutputStream () ; ByteArrayOutputStream blobbytes = new ByteArrayOutputStrea () ; DataOutputStream ldxout = new DataOutputStream ( ldxbytes ) ; DataOutputStream blobout = new DataOutputStrea ( blobbytes ) ; //initialize the index and payload streams by inserting //name and contents of base HTML file being processed. try { t fl = (int) procroot . length () ;
OutMgr. print ( OutMgr . FILENAMES, "processing " + OutMgr. chopPath (tmpfname) );
String basefileURL = makeFullURL (proGroot) ;
//then write file contents to stream byte [ ] barr = new byte[fl];
FilelnputStream srcm = new FilelnputStream (procroot) ; ByteArrayOutputStream baos = new ByteArrayOutputStream () ;
//write header file into start of OCD stream //If compression is on, write header using GZIP if (Config getGZipO) {
GZIPOutputStream gzos = new GZIPOutputStream (baos) ; while (srcin. read (barr) '= -1) //compress header file into stream gzos .write (barr) ; gzos close () ; } else { while (srcin. rea (barr) '= -1) // baos. rite (barr) ; baos . close ( ) ; } barr = baos. toByteArray () ;
OutMgr. rint ( OutMgr. FILENAMES,
"\n" + "compress base file into OCD: " +
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 113 of 156 OutMgr. chopPath (baseflleURL) + " size: " + fl + " compressed: " + barr. length ); ldxout. riteUTF (base lleURL) ; //write filename in UTF format to idx ldxout .writeLong (barr . length) ; //write file size blobout.wrιteUTF(basefιleURL) ; //write filename in UTF format to blob blobout.writeLong (barr. length) ; //write file size blobout .write (barr) ;
_OCDdupcheck.put( baseflleURL, "OCD"); srcin. close 0 ; } catch (FileNotFoundException fnf)
{ OutMgr.print (" **** ERROR adding base HTML to OCD *** " + fnf . toString ( )
; ) catch ( IOException loe ) {return; }
//now generate the OCD compilation if appropriate generateOCD (fd, fn, ldxout, blobout);
//the index and blob streams now contain what goes m the //header and payload section of the OCD file respectively //but have not been written to any file. File ocdf = new Fιle(fd, ocdfile) ;
//Write the OCD file, then the OC file
//TODO: move more of the formatting knowledge to separate class FileFormatMgr try { FileOutputStream ocdfilestr = new FileOutputStream (ocdf) ; FileFormatMgr ocdformatter - new FileFormatMgr () ; ocdformatter . writeHeader (ocdfilestr) ; ldxout.writeUTF (",") ; //delimit end of directory entries ldxbytes .writeTo (ocdfilestr) ; //write directory header blobbytes .writeTo (ocdfllestr) ; //followed by blobs blobout . close ( ) ; ldxout . close ( ) ; ocdfilestr . close ( ) ; } catch (IOException e)
{OutMgr. print (" **** ERROR opening output file **** " + OCfile ); }
Stats._bytesWπtten+=ocdf. length!) Stats._numOutFιles++;
FileFormatMgr formatter = new FileFormatMgr (fd, OCfile); formatter.writeCoherencyFile (newOCStrmg) ;
_server . updateStatLabels ( ) ;
OutMgr.print (OutMgr. INCSTATUS, " Created: " + OutMgr. chopPath (ocdflie)
+ " size: " + ocdf .length () + " bytes "); } ) } } /*********+*******+******** GENERATE OC **** * * * * **** * * * * * ** * * * * ***** * * * **** * * /
II
/************************** GENERATE OC INFO GIVEN FILE/DIR *********************/
String generateCoherency (String dir, String infile)
//βmput dir - directory part of filename to process
//Omput infile - filename part - if null, process entire directory
//
( if ( (infile == null) II (infile. equals ("") ) ) return null; if (ιsOCFιle(mfιle) ) return null;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 114 of 156 Config. setCurlnFile (infile) ;
File f=new Fιle(dιr , mfile), if ( 'f .exists () )
{ //file not there, abort if (notfounds. put (infile, "NotFOUND") == null)
{
OutMgr.print ( " **** WARNING: Input file not found **** " ); OutMgr.print (" " + OutMgr. chopPath ( f .getAbsolutePath ( ) )),
Stats . _notFound++;
} return null; }
String OCResult = "",
BufferedReader fm=null; String stampStrιng=null;
OutMgr. print (" ") ;
OutMgr print ( "Input : " + OutMgr. chopPath (dir+mfile) );
OutMgr. print (OutMgr. INCSTATUS, " Size: " + f.length() ); try { fin = new BufferedReader (new FileReader (f) ) ; //write timestamp for this file itself at top long msStamp=f . lastModifled () ; stampStrmg = new Long (msStamp) .toStrmg {) ; String sd = makeFullURL (f) + " & %" + stampStrmg + " ,"; OCResult += sd; } catch (FileNotFoundException fnf) {OutMgr. print (fnf + " " ); } catch ( IOException loe)
{OutMgr pπntfioe + "\n" ); return null; }
//If OCD generation is on, assume that we have generated an OCD //file for this HTML file if ( Config. getOCDl () )
{
File ocdflie = new File (dir, "ocd_" + mfile) ;
//disable check for OCD existence for now
//if (ocdflie. exists () )
OCResult += makeFullURL (ocdflie) + " S %" + stampStrmg + " ,";
dir = normalizeName (dir) ; String sbit =null; mt numSRCfiles=0; mt ιmgsιze=0; int nestedfιles=0; long maxιmgsιze=0; boolean SRCFlag=false; sbιt= readLegalStrmg (fin) ; while (sbit '= null ) {
SRCFlag=false; if (sbit .equalsIgnoreCase ("src" )
{
SRCFlag=true; sbιt= readLegalStr g (fin) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 115 of 156 while ( (sbit == "" ) && (sbit ' = null ) ) sbιt= readLegalStrmg ( fin) ;
Figure imgf000130_0001
String fullpath = normalizeName (dir + sbit), File nf = new File (fullpath) ; t dot = sbit. lastlndexOf (".") ;
String ext = sbit . substring (dot+1, sbit . length () ) ; if (SRCFlag ss Config. inExtensionList (ext ) ) //Reference to HTML file - recurse { Object found = _OCdupcheck. put (fullpath, "OC") , // eliminate dups -returns null lf not there if (found == null) {
//make sure directory path is all in left arg int lastslash = sbit . lastlndexOf ("/") ; String fname = sbit; String fdir = dir; if (lastslash > -1)
{fname = sbit . substring (lastslash+1) ; fdir = sbit. substring (0, lastslash) ; fdir = dir + fdir; } if ( fdir. endsWith ('/") ) fdir += "/"; OutMgr .print ( "OC: expanding " + fdir + " -- " + fname );
Stats ._embeddedHTML++; nestedfιles++;
String tmpResult = generateCoherency (fdir, fname), if (tmpResult ■ = null)
OCResult += tmpResult; }
}
//first time we've hit this SRC= reference m this file //add the fllename/timestamp pair to the OC string if ( nf.existsO && Config. isSubobject (sbit) ) { Object found = _OCdupcheck.put (fullpath, "OC") ; // eliminate dups -returns null if not there if (found == null) { numSRCfιles++; //if it's a non-html file, tally up its size ιmgsιze+=nf. length () ; if (nf. length () > maximgsize) maximgsize = nf.lengthO; sbit = makeFullURL (nf) ; long msStamp=nf lastModified ( ) ; stampStrmg = new Long (msStamp) . toStrmg () ; if (sbit '= null)
Figure imgf000130_0002
OutMgr. print (OutMgr. FILENAMES, "timestamp: " + OutMgr . chopPath (sbit) sbit += " & %" + stampStrmg +
OCResult += sbit; Stats ._numChecks++; }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 116 of 156 } else //only report missing SRC errors once per HTML file if ( !nf. exists 0 && (! sbit . startsWith ( "http") )) //ignore URL refs for now
{ if ( (notfounds. put (fullpath, "NOTFOUND") == null) && Config. isSubobject (sbit) )
Stats ._notFound++;
OutMgr.print (" **** WARNING: subobject file not found ****
OutMgr. chopPath (nf .getAbsolutePath () ) ) ;
sbit = readLegalΞtring (fin) ; }
//update statistics for GUI
Stats._bytesRead+=f . length () ; Stats._numInFiles++; Stats . _numOutFiles++ ; _server . updateStatLabels ( ) ;
//summarize results for each file processed
OutMgr. print (OutMgr. INCSTATUS, " Image files: " + numSRCfiles ); OutMgr. print (OutMgr . INCSTATUS, " Total Image Size: " + imgsize ); OutMgr. print (OutMgr. INCSTATUS, " Nested HTML Files: " + nestedfiles OutMgr.print (OutMgr. INCSTATUS, " Max Image Size: " + maximgsize );
return OCResult; }
/******************************** GENERATE OCD INFO GIVEN FILE/DIR ******************************/
//TODO:
// this method started as a copy of generateCoherency to preserve the common logic
// but isloate from changes temporarily. Result accumulation is structured differently from gen
OC.
//
// generateCoherency and generateOCD should be
// merged more so they share common logic. In particular the traversal results (subobject table)
// should be saved and passed from the first phase (OCD) to the second (OC)
//
/******************************** GENERATE OCD INFO GIVEN FILE/DIR ******************************/ void generateOCD ( String dir,
String infile, DataOutputStream ios, DataOutputStream dos ) //
//Sinput dir - input file directory //Sinput infile - filename
//Sinput ios - output stream for accumulating index/directory results //Sinput dos - output stream for accumulating data payload //
{ if (Config. getOCDl () == false) return; if ( (infile == null) I I (infile. equals ("") ) ) return ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 117 of 156 if (isOCFile (infile) ) //TODO: - move test for OC file to a common class return;
File f=new File (dir, mfile); if ( if.exists () )
{ //file not there, abort if (notfounds. put (infile, "NotFOUND") == null) { OutMgr . print ( " **** WARNING: Input file not found **** " +
OutMgr. chopPath (f .getAbsolutePath!) ) ); Stats ._notFound++; } return; }
BufferedReader fm=null; try
{ fin = new BufferedReader (new FileReader (f) , 2048) ; } catch (FileNotFoundException fnf)
{ OutMgr. print (fnf.toStr g () );} catch ( IOException loe) {return; }
String sbit =null; boolean SRCFlag=false; sbιt= readLegalStrmg (fin) ; while (sbit != null ) {
SRCFlag=false; if (sbit .equalsIgnoreCase ( "src" ) ) {
SRCFlag=true; sbιt= readLegalStrmg (fin) ; while ((sbit == "") SS (sbit '= null)) sbιt= readLegalStrmg (fin) ;
Figure imgf000132_0001
String fullpath = normalizeName (dir + sbit); File nf = new File (fullpath) ; mt dot = sbit. lastlndexOf (".") ;
String ext = sbit . substring (dot+1, sbit . length () ) ; if (SRCFlag && Config. inExtensionList (ext ) ) //Reference to HTML file - recurse {
//make sure directory path is all in left arg int lastslash = sbit . lastlndexOf ("/") ; String fname = sbit; String fdir = dir; if (lastslash > -1)
{fname = sbit. substring (lastslash+1) ; fdir = sbit . substring (0, lastslash) ; fdir = dir + fdir; } if ( ifdir.endsWithC'/") ) fdir += "/";
Object found = _OCDdupcheck.put (fullpath, "OCD") ; if (found == null) { OutMgr. print ("OCD: expanding " + fdir + " — " + fname );
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 118 of 156 generateOCD (fdir, fname, ios, dos) ; } }
//first time we've hit this SRC= reference m this file
//append records and binary information to OCD_ file for this HTML file //We also need to ensure that an OCD_ entry appears in the OC_ string if ( nf. exists () && Config. inSubob ectExtensionList (ext) ) (
Object found = JDCDdupcheck. put (fullpath, "OCD") ; if (found == null)
{ try{ mt fl = ( int) nf. length () ; sbit = makeFullURL (nf) ;
OutMgr. print (OutMgr. FILENAMES, "add object: " + OutMgr . chopPath (sbit )
+ fl ιos.wrιteUTF(sbιt) ; //write filename m UTF format to ldx ios .writeLong (fl) ; //write file size dos.wπteUTF(sbιt) ; //write filename in UTF format to blob dos. writeLong (fl) ; //write file size
Stats. _bytesWrιtten += sbit . length () *2 + 8;
//then write file contents to stream byte[] barr = new byte[fl];
FilelnputStream srcin = new FilelnputStream (nf) ; while (srcin. rea (barr) '= -1) dos write (barr);
Stats._bytesRead += fl; _server updateStatLabels 0 ; }//end try catch (IOException ex)
{OutMgr.print (" **** WARNING: exception reading file " + OutMgr. chopPath (sbit) + ex + " **** " ) ; } ) }//end creating ocd leaf entry sbit = readLegalStrmg (fin) ; }//end while loop
}//end generateOCD
/******************************+* DELETE OC INFO ******************************/
//TODO: move this method to a class that encapsulates the functionality
// and call it from process () instead of replicating the directory traversal logic
//
/******************************** DELET OC INFO ******************************/ void deleteOCFiles (String fd, String fn) { boolean ok; //recursively traverse tree if (fd == null) return; File procroot=null; //adjust for NT vs W98 if ( ifd.endsWithO'W") ) fd += "\\"; if (fn '= null) procroot = new Fιle(fd + fn) ; //look at file arg to see if directory else procroot = new Fιle(fd);
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 119 of 156 //if (procroot != null) if (procroot . isDirectory ( ) ) {//process files
String curdir = procroot .getAbsolutePat () ;
OutMgr .print ( "Cleaning directory: " + OutMgr. chopPath (curdir)
String!] flist = procroot . list () ; for (int i = 0; i<flist . length; i++) deleteOCFiles (curdir, flist [i] ) ; } else { if ( isOCFile(fn) ) { ok = procroot .exists () ; OutMgr .print (" Deleting " + OutMgr . chopPath (fn) ) ; ok = procroot .delete () ; Stats ._numInFiles++; ) } } //{ { DECLARE_CONTROLS //}}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 120 of 156 import j ava . io . * ; import ava. awt .TextArea; import ava. util.Vector; public class OutMgr { public static boolean TTOUT=true; public static int FILENAMES=1; public static boolean PRINT_FILENAMES=false; public static int DEBUGMSG=2; public static boolean PRINT_DEBUGMSG= false; public static mt INCSTATUS=3; public static boolean PRINT_INCSTATUS= false; private static boolean FILEOUT=false; public static boolean PRINT_FULLNAMES=false; public static boolean LOG_ALWAYS=false; public static boolean LOG_APPEND=false; public static TextArea textout=null; private static PπntStream ps = null; private static int outbytes=0; private static int MaxLen=50; private static String _logfιlename; private static String _warnιngString = " **** WARNING: Previous output truncated. Use logfile to capture full trace. \n\n"; private static Vector _strιngBuf=new Vector (3000) ; public static void setTextArea [ TextArea ta) {textout = ta; } public static void on() {TTOUT=true; } public static void off() {TTOUT=false; } public static String chopPath (String inpath) (if (PRINT_FULLNAMES) return chopPath (inpath, inpath. lengt ( ) ) ; else return chopPat (mpath,MaxLen) ; } public static String chopPath (String inpath, int maxlen) ( int 1 = inpath. lengt () ; int diff = 0; if (1 > maxlen) diff =■= 1-maxlen; else return mpath;
//we need to nip out diff characters from the middle int start - maxlen/3; int end =» maxlen - start;
String firstpart = inpath. substring (0, start) ; String lastpart = mpath. substring (1-end) ; String newpath = firstpart + "..." + lastpart; return newpath; } public static void forceprint (String msg) < if (FILEOUT =- true)
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 121 of 156 ps . print (msg ) ; } public static void setLogfile (String Ifname) {_logfilename = Ifname; } public static void setLogAppend (boolean tf) {LOG_APPEND =tf;) public static void closeLogO {if (ps != null) ps. close () ; } public static void setLogOnO { try
{ ps = new PrintStream(new FileOutputStrea (_logfilename, LOG_APPEND ))
FILEOUT=true;
} catch (IOException e)
{System.out .printl ("error opening file: " + e) ; } ) public static void setLogOf O
{ if (ps != null) ps .close ( ) ;
FILEOUT=false;
) public static boolean fileOutO
{return FILEOUT; } public static void print (int type, String msg) { if ((type == FILENAMES) SS (PRINT_FILENAMES) ) print (msg) ; if ((type == DEBUGMΞG) Si (PRINT_DEBUGMSG) ) print (msg) ; if ((type == INCSTATUS) && (PRINT_INCSTATUS) ) print (msg) ; }
//unconditional print public static void print ( String msg) { textout .appen (msg + "\n") ; outbytes += msg.lengthO; if (outbytes > 26000) { textout. replaceRange (_warningString, 0 , 1000); outbytes= outbytes- (1000 + _warningString. length ()); } if (FILEOUT == true) ps. print ( msg + "\r\n" ) ; }
PCT Application Docket A-027, Office of Chas.G. Call, Reξ So. 20,406, Appendix- Page 122 of 156 import java.awt.*; import Symantec . ltools . awt . util . Calendar; import Symantec. ltools. awt .BorderPanel; public class ProcessingDialog extends Dialog {
Frame _parent; public ProcessingDialog (Frame parent, boolean modal) { super (parent, modal); _parent=parent;
// This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
//{ { INIT_CONTROLS setLayout (null) ; setBackground (java. awt . Color. lightGray) ; setSιze(253,320) ; setVisible (false) ; okButton . setLabel ("OK" ) ; add (okButton) ; okButton. setBounds (46,294,64,20) ; cancelButt . setLabel ("Cancel") ; add(cancelButt) ; cancelButt. setBounds (110, 294, 64,20) ; try { borde Panell . setBevelStyle (Symantec . itools . awt . BorderPanel . BEVEL_RAISED) , ) catch(java. beans . PropertyVetoException e) { } try { borderPanell . setLabel (" Object Packing "); } catch (java. beans . PropertyVetoException e) { } try { borderPanell . setPaddingRight (0) ; } catch (java. beans . PropertyVetoException e) { } try { borderPanell . setPaddmgBottom(O) ; } catch (java.beans . PropertyVetoException e) { } try { borderPanell . setPadd gTop (0) ; } catch (java. beans . PropertyVetoException e) { } try { borderPanell . setPaddmgLeft (0) ; } catch (java. beans . PropertyVetoException e) { } try { borderPanel1. setAlignStyle (Symantec. itools .awt. BorderPanel .ALIGN_LEFT) ; } catch(java. beans . PropertyVetoException e) { } borderPanell . setLayout (null) ; ad (borderPanell) ; borderPanell. setBounds (14, 12,230, 163) ; checkbox7. setLabel ("OCDPPD") ; borderPanell . add (checkbox7 ) ; checkbox7. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkbox7. setBounds (17, 75, 164, 24) ; checkboxδ . setLabel ( "OCD144 " ) ; borderPanell . add (checkboxδ) ; checkbox5. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkbox5. setBounds (17, 59, 180, 2 ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 123 of 156 checkbox4. setLabel ("OCD33") ; borderPanell . add (checkbox4 ) ; checkbox4. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkbox4. setBounds (17, 39, 180,24) ; checkbox3. setLabel ("OCD56") ; borderPanell .add(checkbox3) ; checkbox3. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkbox3. setBounds (17, 23, 180, 24);
OCDICheckbox. setLabel ("0CD_") ; borderPanell. add (OCDICheckbox) ;
OCDICheckbox. setFont (new Font ("Dialog", Font. PLAIN, 12));
OCDICheckbox. setBounds (17, 3, 1 0,24) ; ocdtvlabβl . setLabel ( "OCDTV" ) ; borderPanell .add (ocdtvlabel) ; ocdtvlabel. setBounds (17,95,100,24) ; compressCheckbox . setLabel ( "Compression " ) ; borderPanell .add (compressCheckbox) ; compressCheckbox. setBounds (17, 111, 132, 30); try { borderPanel2. setBevelStyle ( Symantec . itools . awt . BorderPanel . BEVEL_RAISED) ; } catch (java.beans . PropertyVetoException e) { } try { borderPanel2. setLabel (" Special Formats ");
\ catch (java. beans. PropertyVetoException e) { } try { borderPanel2. setPadd gRight (0) ; } catch (java. beans . PropertyVetoException e) { ) try { borderPanel2.setPaddmgBottom(O) ; } catch (java. eans . PropertyVetoException e) { } try { borderPanel2.setPaddmgTop(0) ; } catch (java. beans . PropertyVetoException e) { } try { borderPanel2. setPaddmgLeft (0) ; } catch (java. eans . PropertyVetoException e) { } try { borderPanel2. setAlignStyle (Symantec. itools . awt .BorderPanel.ALIGN_LEFT) ; ) catch (java.beans . PropertyVetoException e) { } borderPanel2. setLayout (null) ; add(borderPanel2) ; borderPanel2. setBounds (12,188,230,100) ; checkboxδ. setLabel (".GIF Graphics") ; borderPanel2.add (checkbox6) ; checkbox6. setFont (new Font ( "Dialog", Font. PLAIN, 12)); checkbox6. setBounds (19, 1, 100,24) ; checkbox8.setLabelC.JPG Graphics") ; borderPanel2.add (checkboxδ) ; checkboxδ. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkboxδ. setBounds (19,25, 100,24) ; checkbox9. setLabel (".ASP Scripts"); borderPanel2.add (checkbox9) ; checkbox9. setFont (new Font ("Dialog", Font. PLAIN, 12)); checkbox9. setBounds (19, 49, 100, 24) ; button2. setLabel ( "Apply" ) ; add(button2) ; button2. setBounds (175,294, 64,20) ; setTitle ( "WWWhoosh Processing" ) ; //}}
OCDICheckbox. setState (Conflg.getOCDl () ) ; compressCheckbox. setState (Config.getGZip ( ) )
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 124 of 156 //{ {REGISTER__LISTENERS
SymWindow aSymW dow = new SymWindow () ; this .addW dowListener (aSymWindow) ; SymAction lSymAction = new SymActio () ; okButton. addActionListener (lSymAction) ; button . addActionListener (lSymAction) ; cancelButt . addActionListener (lSymAction) //}}
} public ProcessingDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSizeO; super .addNotify () ;
// Only do this once, if (fComponentsAdjusted) return;
// Adjust components according to the sets
Insets insets = getlnsetsO; setSize (msets left + insets. right + d. width, sets. top + msets.bottom + d. height)
Component components!] = getComponents () ; for (mt ι = 0; i < components . length; ι++)
{
Point p = components [i] .getLocation () ; p. translate (msets . left, msets. top) ; components [1] .setLocation (p) ; }
// Used for addNotify check. fComponentsAdjusted = true; } public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent 0. getBounds () ; Rectangle abounds = getBounds ( ) ; setLocation (bounds. x + (bounds .width - abounds. width) / 2, bounds. y + (bounds .height - abounds. height) 12 ) ; } super . setVisible (b) ; }
// { { DECLARE_CONTROLS java.aw .Button okButton = new java. awt. Button () ; java.aw .Button cancelButt = new java. awt .Button () ;
Symantec. itools. awt .BorderPanel borderPanell = new Symantec. itools .awt.BorderPanel () ; java.awt .Checkbox checkbox7 = new java. wt .Checkbox () java.awt .Checkbox checkboxδ = new java. awt .Checkbox ( ) java.awt .Checkbox checkbox4 = new java. awt .Checkbox () java. awt. Checkbox checkbox3 = new java. awt .Checkbox ( ) ava.awt . Checkbox OCDICheckbox = new java.awt .Checkbo () ; java.awt . Checkbox ocdtvlabel = new j ava . wt . Checkbox 0 ; java .awt . Checkbox compressCheckbox = new java.awt .Checkbox ( )
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 125 of 156 Symantec. itools. awt .BorderPanel borderPanel2 = new Symantec. itools . awt .BorderPanel () ; java . awt .Checkbox checkbox6 = new java.awt . Checkbox ( ) java . wt . Checkbox checkbox8 = new java.awt . Checkbox ( ) java. awt .Checkbox checkbox9 = new java.awt . Checkbox ( ) java . awt .Button button2 = new java. awt .Button () ;
//}}
// Used for addNotify check, boolean fComponentsAdjusted = false; class SymAction implements java.awt . event . ActionListener { public void actionPerformed (java.awt . event .ActionEvent event) (
Object object = event .getSource () ; if (object == okButton) okButton_ActionPerforme (event) ; else if (object == button2) button2_ActionPerformed (event) ; else if (object == cancelButt) cancelButt_ActionPerformed (event) ;
} } void okButton_ActionPerformed( java .awt .event. ActionEvent event) {
// to do: code goes here. okButton_ActionPerformed_Interactionl (event) ; } void okButton_ActionPerformed_Interactionl (java. awt . event .ActionEvent event) { if (compressCheckbox. getState () ) Config. setGZip (true) ; else
Config. setGZip (false) ; if (OCDICheckbox. getStateO ) Config. setOCDl (true) ; else
Config. setOCDl (false) ; try { this. ispose ( ) ; } catch (Exception e) { }
class SymWindow extends java . awt .event. mdowAdapter { public void windowOpene (java .awt . event .WindowEvent event) {
Object object = event. getSource () ; if (object == ProcessingDialog. his)
ProcessingDialog_WindowOpene (event) ;
public void windowClosing (java. awt. event .WindowEvent event) {
Object object = event . etSource ; if (object == ProcessingDialog .this)
ProcessingDialog_rfindowClosing (event) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 126 of 156 void ProcessιngDιalog_WmdowClosmg (java awt. event. indowEvent event) {
// to do: code goes here.
ConfirmSaveDialog csd = null; try {
// ConfirmSaveDialog Create and show as modal csd = new ConfirmSaveDialog ( _parent, true); csd. setVisible (true) ; } catch (Exception e) { } if (csd.SAVEIT)
Config. setOCDl (OCDICheckbox .getState ( ) ) ; setVisible ( false ) ;
}
void button2_ActιonPerformed ( ava . awt. event .ActionEvent event) { if (compressCheckbox . getState ( ) ) Config. setGZip (true) ; else
Config. setGZip (false) ; if (OCDICheckbox . getState ( ) ) Config. setOCDl (true) ; else
Config. setOCDl (false) ;
void Process gDιalog_WιndowOpened (java.awt. event .WindowEvent event) {
} void cancelButt_ActlonPerformed (java . awt . event.ActionEvent event) {
// to do: code goes here. setVisible (false) ; }
}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 127 of 156 A basic extension of the j ava . awt . Dialog class
*/ import java.awt.*; import java. wt . event .* ; import Symantec. itools . awt .BorderPanel ; public class QuitDialog extends Dialog ( public QuitDialog (Frame parent, boolean modal)
{ super (parent, modal),
//Keep a local reference to the invoking frame frame = parent;
// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
//{{INIT_C0NTR0LS setLayout (null) ; setBackground (java.awt . Color. lightGray) ; setSιze(249,117) ; setVisible (false) ; yesButton. setLabel (" Yes "); add (yesButton) , yesButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); yesButton. setBounds (107, 87, 64, 20) ; noButton. setLabel (" No ") ; add (noButton) ; noButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); noButton. setBounds (171 , 87, 64 , 20) ; try { borderPanell . setBevelStyle ( Symantec . itools . awt . BorderPanel . BEVEL_RAISED) } catch (java.beans . PropertyVetoException e) { } borderPanell. setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (8, 7, 237, 80) ; labell . setText ("Save Config changes before exit'"); labell.setAlignment (java.awt .Label. CENTER) ; borderPanell. add (labell) ; labell. setBounds (5,23,202,23) , setTitle ("Exit WWWhoosh"); //}}
//{{REGISTER JISTENERΞ
SymWindow aSymWindow = new SymWindow ( ) , this.addWmdowListener (aSymWindow) ; SymAction lSymAction = new SymAction () ; noButton. addActionListener (lSymAction) ; yesButton. addActionListener (lSymAction) , //}} } public void addNotify () {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSizeO; super. addNotify ( ) ; if (fComponentsAdjusted) return;
// Adjust components according to the msets
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 128 of 156 setSize (getlnsets . left + getlnsets (). right + d.width, getlnsets (). top + getlnsets () .bottom + d. height);
Component components [] = getComponents ( ) ; for (int ι = 0; i < components . length; ι++) {
Point p = components [I] . getLocation () ; p. translate (getlnsets ( ) .left, getlnsets ( ) .top) ; components [I] . setLocation (p) ; } fComponentsAd usted = true; } public QuitDialo (Frame parent, String title, boolean modal) { this (parent, modal); setTitle (title) ; } **
* Shows or hides the component depending on the boolean flag b.
* Sparam b if true, show the component; otherwise, hide the component.
* Ssee java.awt .Component#ιsVιsιble */ public void setVisible (boolean b) { ιf(b) (
Rectangle bounds = getParent () .getBounds 0 ; Rectangle abounds = getBounds () ; setLocation (bounds .x + (bounds. width - abounds .width) / 2, bounds. y + (bounds .height - abounds height) 12 ) ; Toolkit . getDefaultToolkit ( ) . eep ( ) ; } super . setVisible (b) ; }
// Used for addNotify check, boolean fComponentsAdjusted = false; // Invoking frame Frame frame = null;
// { { DECLARE_CONTROLS java.awt .Button yesButton = new java. awt .Button () ; java.awt .Button noButton = new java.awt .Button () ;
Symantec. itools. awt .BorderPanel borderPanell = new Symantec. itools .awt. BorderPanel I java.awt. Label labell = new java.awt . Label () ;
//}} class SymAction implements ava.awt .event .ActionListener { public void actionPerformed (java awt. event .ActionEvent event) {
Object object = event .getSource () ; if (object == yesButton) yesButton_ActιonPerformed (event) ; else if (object == noButton) noButton_ActιonPerformed (event) ; } } void yesButton_ActιonPerformed (java.awt .event .ActionEvent event) (
// to do: code goes here. yesButton_ActιonPerformed_Interactιonl (event) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 129 of 156 void yesButton_ActιonPerformed_Interactιonl (java. awt .event .ActionEvent event)
{ try { frame. setVisible (false) ; // Hide the invoking frame frame . dispose ( ) ; // Free system resources this. dispose () ; // Free system resources System. exit (0) ; // close the application } catch (Exception e) { }
void noButton_Act onPerformed (java. awt .event .ActionEvent event) {
// to do: code goes here. noButton_ActιonPerformed_Interactιonl (event) ; } void noButton_ActιonPerformed_Interactιonl (java.awt .event .ActionEvent event) { try ( this. dispose () ;
} catch (Exception e) {
} } class SymWindow extends java.awt .event .WindowAdapter { public void windowClosing (java. awt. event.WindowEvent event) {
Object object = event. getSource () ; if (object == QuitDialog. this)
QuιtDιalog_WιndowClosιng (event) ; } } void QuιtDιalog_WmdowClosmg (java.awt .event.WindowEvent event) {
// to do: code goes here.
QuιtDιalog_WmdowClosmg_Interactιonl (event ) ; }
void QuιtDιalog_WιndowClosιng_Interactιonl ( j ava . awt . event . WindowEvent event ) { try { this. dispose () ;
} catch (Exception e) {
} }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 130 of 156 import java . awt. * ; import Symantec. ltools. awt .util. Calendar; import Symantec. itools . awt .BorderPanel; public class SchedulmgDialog extends Dialog { Frame _parent=null; public SchedulmgDialog (Frame parent, boolean modal)
{ super (parent, modal);
_parent=parent;
// This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
//{ { INIT_CONTROLS setLayout (null) ; setBackground ( jav . awt .Color . lightGray) ; setSιze(264,196) ; setVisible (false) ; okButton . setLabel ( "OK" ) ; ad (okButton) ; okButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); okButton. setBounds (60, 168, 64,20) ; buttonl . setLabel ( "Cancel" ) ; add (buttonl) ; buttonl. setFont (new Font ("Dialog", Font. PLAIN, 12)); buttonl. setBounds (122, 168, 64, 20) ; applyButton . setLabel ( "Apply" ) ; add(applyButton) ; applyButton. setFont (new Font ("Dialog", Font. PLAIN, 12)); applyButton. setBounds (185, 168, 64, 20) ; try { borderPanell . setBevelStyle (Symantec. ltools . awt . BorderPanel . BEVEL_RAISED) } catch (java. beans. PropertyVetoException e) { } try { borderPanell. setLabel (" Scheduling ") ; } catch (java.beans. PropertyVetoException e) { } try { borderPanell . setAlignStyle (Symantec. itools . awt .BorderPanel .ALIGN_LEFT) ; } catch (java. beans. PropertyVetoException e) { } borderPanell .setLayout (null) ; ad (borderPanell) ; borderPanell. setBounds (4, 12,256, 156) ; manualCheckbox setLabel ("Manually") ; borderPanell .add (manualCheckbox) ; manualCheckbox. setFont (new Font ("Dialog", Font. PLAIN, 12)); manualCheckbox. setBounds (74,10, 138,21) ; borderPanell. add (textFieldl) ; textFieldl. setBounds (74, 72, 132, 18) ; borderPanell. add (textFιeld2) ; textFιeld2. setBounds (74, 96,132, 18) ; labell. setText ("Start:") ; bo derPanell. ad (labell) ; labell. setBounds (40,68, 29, 20) ; label3. setText ("Stop:") ; borderPanell . add ( label3 ) ; label3. setBounds (41, 92,28, 19) ; label4.setText ("Interval (m ) :") ; borderPanell . add ( label4 ) ; label4. setBounds (0,44, 71, 23) ; minutesText. setText ("1") ; m utesText. setEnabled (false) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 131 of 156 borderPanell . add (minutesText) ; minutesText. setBounds (75,49, 132, 18) ; setTitle ("WWWhoosh Scheduling") ; //}}
//{ {REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow () ; this . addWindowListener (aSymWindow) ; SymAction lSymAction = new SymActionO; okButton. addActionListener (lSymAction) ; buttonl. addActionListener (lSymAction) ; applyButton. addActionListener (lSymAction) Symltem lSymltem = new SymltemO; manualCheckbox. ddlte Listener (lSymltem) ; //}}
public SchedulmgDialog (Frame parent, String title, boolean modal) { this (parent, modal) ; setTitle (title) ; } public void addNotify 0 {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSize 0 ; supe .addNotify ( ) ;
// Only do this once. if ( ComponentsAdjusted) return;
// Adjust components according to the insets
Insets insets = getlnsetsO; setSize (insets . left + insets. right + d. width, msets. top + insets. bottom + d. height);
Component components!] = getCo ponents () ; for (int i = 0; I < components . length; ι++)
{
Point p = components [i] .getLocation () ; p. translate (insets .left, insets .top) ; components [I] . setLocation (p) ; }
// Used for addNotify check. fComponentsAdjusted = true; } public void setVisible (boolean b) { if (b) {
Rectangle bounds = getParent () .getBounds () ; Rectangle abounds = getBounds 0 ; setLocation (bounds .x + (bounds .width - abounds .width) / 2, bounds. y + (bounds .height - abounds .height) 12 ) ;
super. setVisible (b) ;
1
// { { DECLARE_CONTROLS java.awt .Button okButton = new ava.awt .Button () ; java.awt .Button buttonl = new java.awt .Button () ; java.awt .Button applyButton = new java. awt. Butto () ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 132 of 156 Symantec . itools . aw .BorderPanel borderPanell = new Symantec. itools. awt BorderPanel 0 ; java.awt . Checkbox manualCheckbox = new java.awt . Checkbox () ; java.awt .TextField textFieldl = new java. awt. TextField () ; java.awt .TextField textFιeld2 = new java. awt .TextField () ; java.awt .Label labell = new java. awt .Label () ; java.awt .Label label3 = new java awt.Label ; ava.awt .Label label4 = new java awt.LabelO; java.awt .TextField minutesText = new java.awt .TextField 0 ;
//}}
// Used for addNotify check, boolean fComponentsAdjusted = false; class SymAction implements java. awt. event . ActionListener { public void actionPerformed (java.awt . even .ActionEvent event) {
Object object = event .getSource () ; if (object == okButton) okButton_ActιonPerformed (event) ; if (object == buttonl) buttonl_ActιonPerforme (event) ; else if (object == applyButton) applyButton_ActιonPerformed (event) ; } } void okButton_ActιonPerforme ( ava. awt .event .ActionEvent event) { applyButton_ActιonPer ormed (event) ; okButton ActionPerformed Interactionl (event) ;
void okButton_ActιonPerformed_Interactιonl (java.awt .event.ActionEvent event) { try { this .dispose ( ) ;
} catch (Exception e) {
class SymWindow extends java.awt .event .WindowAdapter ( public void WindowOpened (java.awt . event .WindowEvent event) {
Object object = event .getSource () ; if (object ===== SchedulmgDialog. this)
SchedulιngDιalog_WιndowOpened (event) ; } public void windowClosing (java.awt .event .WindowEvent event) {
Object object - event . getSource () ; if (object ===== SchedulmgDialog. this)
SchedulιngDιalog_WmdowClosιng (event) ; } } void SchedulιngDιalog_WmdowClosmg (java. awt.event. WindowEvent event) {
ConfirmSaveDialog csd = null; try {
// ConfirmSaveDialog Create and show as modal csd = new ConfirmSaveDialog ( _parent, true); csd. setVisible (true) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 133 of 156 catch (Exception e) { } if (csd.SAVEIT) {
Config. setContinuous ( 'manualCheckbox. getState () );
Integer genmterval = new Integer (minutesText .getText 0
Config. setGenlnterval (gen terval . intValue ( ) ) ; ) setVisible (false) ,
void buttonl_ActιonPer orme ( ava. awt. event .ActionEvent event) { try {
// ProcessingDialog Hide the ProcessingDialog this. setVisible (false) , this. dispose () ; } catch (Exception e) { }
} void SchedulιngDιalog_WmdowOpened (java.awt. event .WindowEvent event) {
// to do: code goes here. manualCheckbo . setState ( ' Config. getCont uous ( ) ) ; if (Conflg.getCont nuous () ) minutesText . enable ( ) ; } void applyButton_ActιonPerformed ( ava. awt .event.ActionEvent event) {
// to do: code goes here.
Config. setContinuous ( 'manualCheckbox. etState ( ) );
Integer genmterval = new Integer (minutesText .getText ( ) );
Config. setGenlnterval (gen terval. intValue ( ) ) ;
} class Symltem implements java. awt. event . ItemListener { public void ιtemStateChanged(java.awt .event. ItemEvent event) {
Object object = event . getSource 0 ; if (object == manualCheckbox) manualCheckbox ItemStateChanged (event) ;
void manualCheckbox_ItemStateChanged (java.awt . event. ItemEvent event)
if ( manualCheckbox getState ( ) ) minutesText . disable ( ) ; else minutesText . enable ( ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 134 of 156 import java.io.*; import java.util. Date; public class Stats {
// The following function is a placeholder for control initialization. // You should call this function from a constructor or initialization function, public void vcImtO { //{ { INIT_CONTROLS //}} } private static PπntStream outstream = System. out; public static int _maxDepth=10; public static int _curDepth=0; public static int _numInFiles=0; public static int _numOutFιles=0; public static int _numChecks=0; public static int _notFound=0; public static int _bytesRead=0; public static int _bytesWπtten=0; public static int _embeddedHTML=0; public static void clear () {
_embeddedHTML=0 ; _maxDepth=10; _curDepth=0; _numInFiles=0; _numOutFιles=0 ; _numChecks=0; _notFound=0; _bytesRead=0; _bytesWπtten=0 ;
// { { DECLARE_CONTROLS //)}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 135 of 156 *
This simple extension of the j ava . awt . Frame class contains all the elements necessary to act as the mam window of an application.
"I import java.awt.*; import java.util.*; import java.util.zip.*; import java.io.*; import java . awt. image . ImageObserver; import Symantec. itools . awt. StatusBar, import Symantec . itools . awt . BorderPanel ; import Symantec. itools . awt . Label3D; import com. sun. ava. swing. JTabbedPane; import com. sun. ava . swing. JTextArea; import com. Symantec. itools. swing.models. UnsignedNumberDocument; import com. sun. ava. swing. List; import com. sun. ava. swing. JScrollPane, import com. Symantec. itools. swing. orders. BevelBorder; import com. Symantec. itools . swing. orders . EtchedBorder; import com. Symantec. itools . swing. orders . SoftBevelBorder; import com. Symantec. ltools . swing.models. StrmgListModel; ********************************* wwrøhoosh Server *************************************/
//
// Θauthor Mark Palmer
// Θversion 1.9
//
// Modifications:
//
// Build Date Description
//
//
// 1.9 18-Aug-1999 - Hack Text Output area to recycle its memory
//
// - add append-log checkbox and capability, modify INI, buttons
//
//
//
/********************************* WWWhoosh Server GUI **************************************/ public class WWWhooshServer extends Frame { public WWWhooshServer ( ) {
// This code is automatically generated by Visual Cafe when you add // components to the visual environment. It instantiates and initializes // the components. To modify the code, only use code syntax that matches // what Visual Cafe can generate, or Visual Cafe may be unable to back // parse your Java file into its visual environment.
Config. loadLast ( ) ; dateLabel . setText (Config . getDate 0 ) ; domainLabel . setText (Config. getDomain ( ) ) ; configLabel. setText (Config. getFile () ) ;
//{ { INIT_C0NTROLS setLayout (null) ; setBackground (java. awt.Color. lightGray) ; setSιze(496,483) ; setVisible (false) ; button4. setLabel ( "Clear" ) ; add(button4 ) ; button4. setBounds (345,449, 64,20) ; logbutt. setLabel ("Log File"); add(logbutt) ; logbutt. setBounds (409, 449, 64 , 20) ; genButton. setLabel ("Generate") ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 136 of 156 add(genButton) ; genButton. setBounds (406, 115, 64,20) ; stopButt . setLabel ( "Stop" ) ; add(stopButt) ; stopButt. setBounds (3 1, 115, 64, 20) ;
RmButton. setLabel ("Remove") ; add(RmButton) ;
RmButton. setBounds (276, 115, 64,20) ; try { borderPanell . setBevelStyle (Symantec . itools .awt . BorderPanel . BEVEL_RAISED) } catch (java. beans. PropertyVetoException e) { } try { borderPanell. setLabel (" Run Statistics ") ; } catch (java.beans . PropertyVetoException e) { } try { borderPanell . setAlignStyle (Symantec . itools . awt . BorderPanel .ALIGN_LEFT) ; } catch (java. eans . PropertyVetoException e) ( } borderPanell . setLayout (null) ; add (borderPanell) ; borderPanell. setBounds (17,131, 470,108) ; labell3. setText (" Created:"); borderPanell . add (labell3) ; labell3. setFont (new Font ("Dialog", Font. PLAIN, 12)); labell3. setBounds (15,23, 60, 15) ; labelll. setText (" Checks:"); borderPanell .add (labelll) ; labelll. setBounds (14, 102, 60, 24) ; label9. setText (" Files: ") ; borderPanell. add (label9) ; label9. setBounds (14, 8, 60,24) ; labellO. setText (" Errors:"); borderPanell. add(labellθ) ; labellO. setBounds (14, 126, 60,24) ; label4. setText (" Read:"); borderPanell .add (label ) ; label4. setBounds (15, 3, 58, 19) ; labell6. setText (" Bytes Written:"); borderPanell .ad (labell6) ; labell6. setBounds (242, 21, 78, 19) ; labellδ. setText (" Bytes Read:"); borderPanell.add (labell5) ; labell5.setBounds(242,2,73,21) ; bytesOutputLabel. setText ( "size of outputs"); borderPanell. add (bytesOutputLabel) ; bytesOutputLabel. setBounds (329, 24, 99,16) ; errorLabel . setText ( "files not found"); borderPanell. add (errorLabel) ; errorLabel. setBounds (76, 0, 95, 19) ; bytesReadLabel. setText ("total of files input"); borderPanell . add (bytesReadLabel) ; bytesReadLabel. setBounds (329, 7, 99, 16) ; label5. setText ( "Errors : " ) ; borderPanell .add (label5) ; label5. setBounds (19, 39,53,20) ; fileOpenedLabel. setText ("files opened") ; borderPanell . add (fileOpenedLabel ) ; fileOpenedLabel. setBounds (76,3,95,19); numCheckLabel. setText ("graphics files") ; borderPanell . dd (numCheckLabel) ; numCheckLabel. setBounds (329, 41, 99, 16) ; OCCountLabel. setText ("files created") ; borderPanell . ad (OCCountLabel) ;
OCCountLabel. setFont (new Font ("Dialog", Font. PLAIN, 12)); OCCountLabel. setBounds (76,22, 95, 19) ; labell2. setText ("text") ; borderPanell. add(labell2) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 137 of 156 labell2. setBounds (254,30,8, 8) ; labell4. setText ( "Subobjects: ") ; borderPanell. add (labell4) ; labell4. setBounds (245,40,73, 19) ; try { borderPanel2. setBevelStyle (Symantec. itools .awt .BorderPanel .BEVEL_RAISED) ;
} catch (java. beans . PropertyVetoException e) { } try { borderPanel2. setLabel (" Con iguration ") ; } catch (java. beans . PropertyVetoException e) { } try { borderPanel2. setAlignStyle (Symantec . itools . awt . BorderPanel .ALIGN_LEFT) ;
} catch (java. beans. PropertyVetoException e) { } borderPanel2. setLayout (null ) ; add (borderPanel2) ; borderPanel2. setBounds (16, 8, 471,109) ; borderPanel2. add (dateLabel) ; dateLabel. setBounds (321, 4, 132, 16) ; label21. setText (" Checks:"); borderPanel2.add(label21) ; label21. setBounds (14, 102,60,24) ; label22.setText(" Files: ") ; borderPanel2.add(label22) ; label22. setBounds (14,78,60,24); label24. setText (" Errors:"); borderPanel2. add (label24 ) ; label24.setBounds(14,126, 60,24) ; label25. setText ("total unresolved SRC tags"); borderPanel2. add (label25) ; label25. setBounds (74, 126, 180, 22) ; label8.setText(" Output:"); borderPanel2. add (labelδ ) ; labelβ. setBounds (15,23, 56, 18) ; labell.setText(" Input:"); borderPanel2.add (labell) ; labell. setBounds (15, 4, 56, 16) ; outFileLabel . setText ("current output file") ; borderPanel .ad (outFileLabel) ; outFileLabel. setBounds (76, 23, 160, 18) ; inFileLabel . setText ("current input file") ; borderPanel .add (inFileLabel) ; inFileLabel. setBounds (76, 4, 160, 16) ; label3. setText ("Optimization: ") ; borderPanel≤ .add(label3) ; label3. setBounds (242,23, 74, 18) ; label6. setText ("WWWhoosh Level 1"); borderPanel2.add (label 6) ; label6. setBounds (321, 23, 124, 18) ; label2. setText ("Domain: "); borderPanel2.add(label2) ; label2. setBounds (242, 4, 75, 16) ; borderPanel2.add (domainLabel) ; domainLabel. setBounds (321, 4, 124 , 16) ; labell7. setText ("Last Run: ") ; borderPanel2. add ( labell ) ; labell . setBounds (242, 44, 72, 16) ; label7. setText (" Config: ") ; borderPanel2. ad ( label7 ) ; label7. setBounds (15, 43, 56,16) ; configLabel. setText ("configuration file") ; borderPanel2. add (configLabel) ; configLabel . setBounds (76, 43, 157, 16) ; add (textAreal) ; textAreal. setBounds (24, 2 4, 457, 193) ; setTitle ("WWWhoosh Site Optimizer"); setResizable (false) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 138 of 156 / / } }
OutMgr. setTextArea (textAreal) ; OutMgr .on ( ) ;
//{ {INIT_MENUS menul. setLabel ("File") ; menul . add (newMenuItem) ; newMenuItem. setLabel ( "New" ) ; newMenuItem. setShortcut (new MenuShortcut (java.awt event .KeyEvent .VK_N, false) ) ; menul . ad (openMenuItem) ; openMenuItem. setLabel ("Load Config...") ; openMenuItem. setShortcut (new MenuShortcut (java.awt event KeyEvent .VK_0, false) ) ; menul . add (saveMenuItem) ; saveMenuItem. setLabel ("Save Config") ; saveMenuItem. setShortcut (new MenuShortcut (java.awt event .KeyEvent .VK_S, false) ) ; menul . add (saveAsMenuItem) ; saveAsMenuItem. setLabel ("Save Config As..."); menul . add (separatorMenuItem) , separatorMenuItem. setLabel ("-") ; menul . add (exitMenuItem) ; exitMenuItem. setLabel ( "Exit" ) ; mainMenuBar . add (menul ) ; menu2. setLabel ("Edit") ; menu2. add (mputsmenuitem) ; inputsmenuitem. setLabel ("Inputs") ; menu2. add (processingmenuitem) ; process gmenuitem. setLabel ("Processing") ; menu2. add (schedmenuitem) ; schedmenuitem. setLabel ("Scheduling") ; menu2. add (LogLevelMenuItem) ;
LogLevelMenuItem. setLabel ("Logging") ; mainMenuBar . add (menu2 ) , menu3. setLabel ( "Help" ) , menu3.add (aboutMenuItem) ; aboutMenuItem. setLabel ( "About... ") ; mainMenuBar . add (menu3) ,
//$$ mainMenuBar.move (30, 543) ; setMenuBar (mainMenuBar) ,
//}}
//{{REGISTER_LISTENERS
SymWindow aSymWindow = new SymWindow ( ) ; this . addW dowListener (aSymWindow) ;
SymAction lSymAction = new SymActionO; openMenuItem. addActionListener (lSymAction) ; exitMenuItem. addActionListener (lSymAction) ; aboutMenuItem. addActionListener (lSymAction) ; SymComponent aSymComponent = new SymComponent ( ) , inputsmenuitem.addActionListener (lSymAction) ; processmgmenuitem. addActionListener (lSymAction) , schedmenuitem. addActionListener (lSymAction) ; genButton. addActionListener (lSymAction) ; button4.addActionListener (lSymAction) ; domainLabel . addComponentListener (aSymComponent) ; saveMenuItem. ddActionListener (lSymAction) ; RmButton . addActionListener (lSymAction) ; stopButt . addActionListener (lSymAction) ; saveAsMenuItem. addActionListener (lSymAction) ; logbutt . addActionListener (lSymAction) ; LogLevelMenuItem. addActionListener (lSymAction) ; //}) try {
FileOutputStream bid = new FileOutputStream ("Build. java") ; String verstring = "public class Build {public static mt VERSION=2; public static int
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 139 of 156 NUMBER=" + (Build. NUMBER+1) + " ; }"; bid. write (verstring. getBytes () ) ; bid. close () ; } catch (IOException loe)
U ) public WWWhooshServer (String title) { thisO , setTitle (title) ; } private boolean _halt=false; public synchronized void halt() {_halt=true; } public synchronized boolean halted!) { return _halt; }
/**
* Shows or hides the component depending on the boolean flag b.
* Sparam b if true, show the component; otherwise, hide the component.
* Ssee java.awt .Component#ιsVιsιble */ public void setVisible (boolean b) { if (b)
{ setLocation (50, 50);
} supe .setVisible (b) ;
} static public void mam (String args[]) { try
{
//Create a new instance of our application's frame, and make it visible, (new WWWhooshServer () ) .setVisible (true) ;
} catch (Throwable t) {
System. err .println (t) ; t .prmtStackTrace ( ) ;
//Ensure the application exits with an error condition. System. exit (1) ; ) } public void addNotify () {
// Record the size of the window prior to calling parents addNotify. Dimension d = getSιze(); super . addNotify () , if (fComponentsAdjusted) return;
// Adjust components according to the msets setSize (getlnsets () . left + getlnsets (). right + d. idth, getlnsets (). top + getlnsets () .bottom + d. height),
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 140 of 156 Component components [] = getComponents () ; for (int i = 0; i < components .length; i++)
{
Point p = components [l] . etLocation () ; p. translate (getlnsets ( ) . left, getlnsets () .top) ; components [i] . setLocation (p) ; } fComponentsAdjusted = true; )
// Used for addNotify check, boolean fComponentsAdjusted = false; int maxplen = 40; Optimizer _opt=null;
// { { DECLARE_CONTROLS java . awt .Button button4 = new java. awt.ButtonO ; java.awt .Button logbutt = new java. awt.Button 0 ; java . awt .Button genButton = new java. awt .Button () ; java.awt .Button stopButt = new java.awt .ButtonO ; java.awt .Button RmButton = new java. awt .ButtonO ;
Symantec. itools. awt .BorderPanel borderPanell = new Symantec. itools .awt. BorderPanel 0 ; java.awt .Label labell3 = new java.awt. abel 0 ; java . awt .Label labelll = new j va.awt . abel O ; java. awt.Label label9 = new java.awt . Label () ; java.awt .Label labellO = new java.awt . abel () ; java . awt. Label label = new java.awt . Label 0 ; java. awt. Label labellδ = new java.awt. Label 0 ; java.awt .Label labell5 = new java.awt . abel () ; java . wt .Label bytesOutputLabel = new java.awt. abel 0 ; java. awt. Label errorLabel = new java. awt .Label 0 ; java.awt .Label bytesReadLabel = new java.awt . abel ; java .awt. Label labelδ = new java.awt . Label 0 ; java.awt. Label fileOpenedLabel = new java.awt . Label () ; java.awt . Label numCheckLabel = new java. awt .Label 0 ; java.awt . Label OCCountLabel = new j va. awt. Label () ; java.awt . Label labell2 = new java.awt . Label 0 ; java .awt . abel labell4 = new java.awt . Label () ;
Symantec. itools . awt .BorderPanel borderPanel2 = new Symantec . ltools.awt .BorderPanel 0 ; java.awt . Label dateLabel = new java.awt. Label () ; java.awt . abel label21 = new ava.awt . Label 0 java.awt . Label label22 = new java.awt . Label 0 , java.awt . Label label24 = new j va.awt . Label 0 java.awt . Label label25 = new java.awt . Label 0 , java.awt . Label labelθ = new java. awt .Label 0 ; java.awt . Label labell = new java.awt .Label 0 ; java.awt . Label outFileLabel = new java. awt .Label 0 ; java.awt . Label inFileLabel = new j va . awt . Label 0 ; java.awt . Label label3 = new java.awt .Label () ; java.awt . Label label6 = new java. awt. Label 0 ; java.awt . Label label2 = new java. awt .Label 0 ; java.awt . Label domainLabel = new java.awt . Label () ; java.awt . Label labell7 = new java. awt . Label 0 ; j va.awt . Label label7 = new java. awt .Label O ; java.awt . abel configLabel = new java.awt .Label [) ; java.awt .TextArea textAreal = new java.awt .TextArea 0 ;
//}}
// { { DECLARE_MENUS java. awt .MenuBar mainMenuBar = new ava. awt.MenuBar () ; ava . awt . Menu menul = new j ava . awt . Menu () ; java. awt .Menultem newMenuItem = new java. awt .MenuItemO ; java.awt .Menultem openMenuItem = new java. awt.Menultem () ; java. awt .Menultem saveMenuItem = new java .awt .MenuIte O ; java. awt. enultem saveAsMenuItem = new java. wt .MenuItemO ; java. awt .Menultem separatorMenuItem = new java.awt .MenuItemO ; java.awt .Menultem exitMenuItem = new java.awt .MenuItemO ; java . awt .Menu menu2 = new j ava . awt .Menu ( ) ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No.20,406, Appendix- Page 141 of 156 java.awt Menultem inputsmenuitem = new j va. awt .Menultem( ) ; java.awt Menultem processmgmenuitem = new java. awt. enultem () ; java.awt Menultem schedmenuitem = new java. awt .Menultem( ) ; java.awt .Menultem LogLevelMenuItem = new java.awt .MenuItemO ; java.awt .Menu menu3 = new java .awt.Menu () ; ava.awt .Menultem aboutMenuItem = new java. awt .Menultem ( ) ;
//}}
class SymWindow extends java.awt event .WindowAdapter < public void windowClosing (java. awt event. indowEvent event) {
Object object = event .getSource () ; if (object == WWWhooshServer. this)
WWWhooshServer_wιndowClosιng (event) ; } }
class SymAction implements java.awt .event .ActionListener { public void actionPerformed (java.awt .event .ActionEvent event) {
Object object = event. getSource () ; if (object == openMenuItem) openMenuItem_ActιonPerformed (event) ; else if (object == aboutMenuItem) aboutMenuItem_ActιonPerformed (event) ; else if (object == exitMenuItem) exιtMenuItem_ActιonPerformed (event) ; else if (object == inputsmenuitem) ιnputsmenuιtem_ActιonPerformed (event) ; else if (object == processmgmenuitem) processιngmenuιtem_ActιonPerformed (event) ; else if (object == schedmenuitem) schedmenuιtem_ActιonPerformed (event) ; else if (object == genButton) genButton_ActιonPerformed (event) ; else if (object == button4) button4_ActιonPerformed (event) ; if (object == saveMenuItem) saveMenuItem_ActιonPerforme (event) ; else if (object == RmButton)
RmButton_ActlonPerformed (event) ; else if (object == stopButt) stopButt_ActιonPerformed (event) ; else if (object == saveAsMenuItem) saveAsMenuItem_ActιonPerformed (event) ; else if (object == logbutt) logbutt_ActιonPerforme (event) ; else if (object == LogLevelMenuItem)
LogLevelMenuItem_ActιonPerformed (event) ;
void openMenuItem_ActιonPerforme (java . awt . event . ActionEvent event) (
// to do: code goes here. openMenuItem ActionPerformed Interactionl (event) ;
}
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 142 of 156 void aboutMenuItem_ActιonPerformed (java.awt event .ActionEvent event)
{
// to do: code goes here. aboutMenuItem_ActιonPerformed_Interactιonl (event) ; } void exιtMenuItem_ActιonPerformed (java.awt .event.ActionEvent event) {
// to do. code goes here. exιtMenuItem_ActιonPerformed_Interactιonl (event) ; exιtMenuItem_ActιonPerformed_Interactιon2 (event) ; } class SymComponent extends ava.awt .event .ComponentAdapter { public void ComponentShown (java. awt. event .ComponentEvent event) {
Object object = event. getSource , if (object == domainLabel) domamLabel_ComponentShown (event) ;
void inputsmenuιtem_ActιonPerformed (java. awt . event .ActionEvent event) { mρutsmenuιtem_ActιonPerformed_Interactιonl (event) ;
} void processmgmenuιtem_ActιonPerformed (java . awt .event .ActionEvent event) {
// to do: code goes here. processmgmenuιtem_ActιonPerformed_Interactιonl (e ent) ; } void updateStatLabels () { numCheckLabel. setText (Stats ._numChecks + " ") ; errorLabel. setText (Stats._notFound + " " ) ; OCCountLabel. setText (Stats._numOutFιles + " " ); fileOpenedLabel. setText (Stats . numlnFiles + " "); bytesReadLabel. setText (Stats ._bytesRead + " ") ; bytesOutputLabel. setText (Stats._bytesWπtten + " ") ; domainLabel. setText (Config. getDomam () ) ; configLabel. setText (Config. getFile ( ) ) ; inFileLabel . setText (Config . getCurlnFile ( ) ) ; outFileLabel . setText (Config . getCurOutFile ( ) ) ; errorLabel. setText (Stats._notFound + " "), dateLabel. setText (Con lg.getDate ( ) ) ; } void schedmenuιtem_ActιonPerformed (java.awt .event.ActionEvent event) {
// to do: code goes here. schedmenuιtem_ActιonPerformed_Interactιonl (event) ; } void ex tMenuItem_ActιonPerformed_Interactιonl (java.awt. event .ActionEvent event) { if (Con lg.modifled () ) try {
// ConfirmSaveExitDialog Create and show as modal
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 143 of 156 (new ConfirmSaveExitDialog (this, true) ). setVisible (true) ; } catch (Exception e) { } } void genButton_ActιonPerformed(java . awt .event. ActionEvent event)
{ _halt=false;
_opt = new Optimizer (this) ;
_opt .setFileList (Config. getFiles 0 ) ; _opt. start ( ) ; return;
} void button4_ActιonPerformed (java.awt . event .ActionEvent event) { textAreal. setText ("") ;
Stats. clear () ; updateStatLabels ( ) ; repaint ( ) ; } void domamLabel_ComponentShown ( ava .awt. event. ComponentEvent event) { domainLabel. setText (Config. getDomain ( ) ) ; }
void saveMenuItem_ActιonPerformed (java. awt .event.ActionEvent event) {
// to do: code goes here. saveMenuItem_ActιonPerformed_Interactιonl (event) ; I void saveMenuItem_ActιonPerformed_Interactιonl (java. awt. event .ActionEvent event) { try {
Config. save ( ) ;
} catch (Exception e) {
} } void RmButton_ActιonPerformed (java.awt . event .ActionEvent event) {
_opt = new Optimizer (this) ; //_opt. start () ;
OutMgr. print (" > "
+ "Site cleanup started at " + new Date () .toLocaleStnng ( ) + ■• < +"\n\n" ) ;
OutMgr. print (" " ) ; try {
// ConfirmDialog Create and show as modal ConfirmDialog cfd - new ConfirmDialog (this, true); cfd. setVisible (true) ; if (cfd.deleteOKO ) {
String!] flist = Config. getFiles () ; if (flist '- null)
//TODO: handle case where only one file and no directory is specified in Config for (int l = 0; K flist . length; ι++) { File lιstm=new File (flist [i] ) ; if ( i listm. exists ( ) )
OutMgr.pr t (" **** ERROR: Specified input file not found **** " + OutMgr .chopPath (flist [I] ,maxρlen) + " - skipping" );
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 144 of 156 else { if (listin. isDirectory () )
_opt. eleteOCFiles (flist [i] . trimO , null) ; else {
_opt. deleteOCFiles (listin. getParentO , listin. getName { ) ), } ) } } ) catch (Exception e) {} OutMgr.print (" ") ;
OutMgr. print (" > " +
"Site cleanup ended at " + new Date ( ) . toLocaleString ( ) + - < " );
_opt . stop ( ) ; _opt. destroy () ;
synchronized void stopButt_ActionPerformed (java.awt . event .ActionEvent event)
{ halt(); notifyAHO ;
OutMgr.print (" ") ;
OutMgr .print (" > Shutdown: finishing current input
< .. );
OutMgr . closeLog ( ) ; ) void WWWhooshServer_windowClosing (java. awt .event. indowEvent event) {
// to do: code goes here.
WWWhooshServer_windowClosing_Interactionl (event) ;
WWWhooshServer_windowClosing_Interaction2 (event) ; ) void WWWhooshServer_windowClosing_Interactionl (java. awt . event . WindowEvent event) { if (Config.modified () ) try { // ConfirmSaveExitDialog Create and show as modal (new ConfirmSaveExitDialog (this, true) ) .setVisible (true) ; } catch (Exception e) { } } void exitMenuItem_ActionPerformed_Interaction2 (Java . wt .event .ActionEvent event)
{ try { this .dispose () ; // Free system resources
System. exit (0) ; // close the application
} catch (Exception e) { }
} void WWWhooshServer_windowClosing_Interaction2 (java .awt . event .WindowEvent event) { try { this. dispose () ; // Free system resources
System. exit (0) ; // close the application
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 145 of 156 } catch (Exception e) { ) } void saveAsMenuItem_ActιonPerformed (java. awt .event. ActionEvent event)
{ saveAsMenuItem_ActιonPerformed_Interactιonl (event) ;
} vo d saveAsMenuItem_ActιonPerformed_Interactιonl (java.awt .event .ActionEvent event)
{
FileDialog fileDialogl = new java. awt . FileDialog ( (Frame) this) ; fileDialogl . setFile (Config . getFile 0 ) ; fileDialogl. setTitle ("WWWhoosh Specify Config Filename"); fileDialogl . setVisible (true) ; String inFileName = fileDialogl .getFile () ; String dirname = fileDialogl .getDirectory () ; Config. setFile (inFileName) ; Config. setRootDir (dirname) , Config. saveAs (dirname + inFileName); this . updateStatLabels ( ) ; } void openMenuItem_ActιonPerformed_Interactιonl (java. awt. event. ActionEvent event) {
FileDialog fileDialogl = new java. awt . FileDialog ( (Frame) this) , //fileDialogl .setDirectory ( Config. getCurDir () ); fileDialogl . setFile (Config . getFile 0 ) ; fileDialogl. setTitle ("WWWhoosh Specify Config Filename"); fileDialogl . setVisible (true) ; String inFileName = fileDialogl. getFile () ; String dirname = fileDialogl. getDirectory () ; Config. loadFrom (dirname + inFileName); Config. setFile (dirname + inFileName); this . updateStatLabels ( )
void logbutt_ActιonPerformed (java . awt . event .ActionEvent event) { if (OutMgr. fileOutt) ) { logbutt .setBackground (Color. lightGray ) ; OutMgr .print ("Logfile output stopped at " + new Date () .toLocaleStnng () ); logbutt . setLabel ( "Logfile OFF" ) ; OutMgr. setLogOff ( ) ; } else {
OutMgr. setLogOn ( ) ;
//logbutt. setBackground) new Color ( 102,153,153 ) ) ; logbutt . setLabel ( "Logfile ON" ) ; OutMg .print ("Logfile output started at "
+ new Date () .toLocaleStnng () + "\n" ); } } void ιnputsmenuιtem_ActιonPerformed_Interactιonl (java. awt.event .ActionEvent event) { try {
// InputsDialog Create and show as modal (new InputsDialog (this, true) ). setVisible (true) ; } catch (Exception e) {
void processmgmenuitem ActionPerformed Interactionl (java.awt .event .ActionEvent event)
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 146 of 156 { try {
// ProcessingDialog Create and show as modal (new ProcessingDialog (this, true) ). setVisible (true) ; } catch (Exception e) { } } void schedmenuιtem_ActιonPerformed_Interactιonl (java.awt .event .ActionEvent event) { try {
// SchedulmgDialog Create and show as modal (new SchedulmgDialog (this, true) ). setVisible (true) ; } catch (Exception e) {
void aboutMenuItem_ActιonPerformed_Interactιonl (java.awt .event.ActionEvent event) { try {
// AboutServerDialog Create and show as modal (new AboutServerDialog (this, true) ). setVisible (true) ; } catch (Exception e) { } } void LogLevelMenuItem_ActιonPerformed(java. awt .event.ActionEvent event) {
// to do: code goes here.
LogLevelMenuItem_ActιonPerformed_Interactιonl (event) ; } void LogLevelMenuItem_ActιonPerformed_Interactιonl (java.awt . event .ActionEvent event) { try {
// LogLevelDialog Create and show as modal (new LogLevelDialog (this, true) ). setVisible (true) ; } catch (Exception e) { 1 }
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 147 of 156 package WWWhooshCommon; import COM. reitshamer .http OCResponse; import COM. reitshamer. http. OCDResponse; import COM. reitshamer . util *; import java .10. ByteArraylnputStream; import java .10. ByteArrayOutputStream; import java .10. IOException; import java.util. zip.GZIPInputStream; import java. net. Socket; import java.net. InetAddress; import java . util .Hashtable ; import ava. util. Date;
/********************************* OCCACHE *************************************
//
// This class is responsible for maintaining the OC information
// at runtime for the proxy.
// The request-handling logic consults OCCache to keep track
// of timestamps, OC files requested but not found, and OC/OCD files
// already retrieved.
//
/********************************* OCCACHE *************************************/ public class OCCache
{
//private String _etag, private String _domam = "none", private String _thιsfιleURL="", private Hashtable _sockets = new Hashtable 0 //sockets keyed by InetAddress private Hashtable _checks = new Hashtable () //URL and timestamp per subobject private Hashtable _notfound = new Hashtable ( ) //URL and "NF" lf previously not found private Hashtable __processed = new Hashtable ( ) //URL and date if OC has been fetched private Hashtable _OCDCache = new Hashtable 0 ; //OCD file URL and int timestamp or -1 if fetch-m-progress private boolean building = false; private static long socket_create_total_ms=0; private static long socket_count=0; private static Socket _cachedSocket=null;
//record version number of public int getVersionNumber ()
{ return 0;
}
/****************************************************************************/ public void clearCaches () {
_checks . clear ( ) , _OCDCache . clear ( ) ; _processed. clear ( ) ;
Debug.print (2, " OC and OCD caches cleared " ); }
/****************************************************************************/ public Socket getΞocket (String host, t port ) throws ava.net.UnknownHostException, java.10. IOException { if (Debug. useProxy) return new Socket (Debug. outAddress, Debug. outProxy) ; else return new Socket (host, port) ;
/******************************************************************** ******* ,
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 148 of 156 public String getthisFile ( ) {return _thιsfιleURL; }
/****************************************************************************/ //set flag to indicate directory is building to GET threads public synchronized void setBuildmg (boolean b)
{_buιldmg=b; } public synchronized boolean getBuild g 0
{return _buιldιng; }
/****************************************************************************/ //keep track of non-existant and already-fetched OCD files to avoid second GETs //TODO. add eviction behavior (to whole cache, actually) public void putProcessed (String s. Date d)
{_processed.put (s, d) ; Debug.print (2, " remember fetched: " + Debug. chopPat (s) );
}
/***********************************************************************+**** public Date getProcessed (String s)
{
Date tmp = (Date)_processed.get (s) ; return tmp,
)
/****************************************************************************/
//keep track of non-existant and already-fetched OCD files to avoid second GETs public void putNotFound (String s) {_notfound.put(s, "NF") ; Debug.print (2, " remember OC NotFound. " + Debug. chopPath (s) ) ; }
/****************************************************************************/ public Object getNotFound (String s) {Object tmp = _notfound.get (s) ; if (tmp ι= null)
Debug. print (2, Debug. chopPath(s) + " previously not found, skip GET \n") , return tmp; } **************************************************************************** public int sιze()
{return _checks .size () ; } **************************************************************************** public void clearChecks () {_checks . clea ( ) ; } **+************************************************************************* public byte[] uncompressBLOB (byte [] blob) {
ByteArraylnputStream bais = new ByteArraylnputStream(blob) ; ByteArrayOutputStream uncompressedstream = new ByteArrayOutputStrea ( ) ; byte [] fixbuf = new byte [blob. length] ; try {
GZIPInputStream gzis = new GZIPInputStream(baιs) ; mt fullcount= gzis. read (fixbuf) ; while (fullcount '= -1) { uncompressedstream.write (fixbuf, 0, fullcount) ; fullcount= gzis. read(fιxbuf) ; } } catch (IOException loe) {
Debug. forceprint (" **** ERROR uncompressing binary object \n" ) ; } return uncompressedstream. toByteArray ( ) , }
PCT Application Docket A-027, Office of Chas.G. Call, Ree. No. 20,406, Appendix- Page 149 of 156 ****************************************************************************/ public synchronized void putBLOB (String fname, byte [ ] blob) { int cut = fname. indexOf ("/./") ; while ( cut '= -1)
{
String parti = fname. substring (0, cut+1) ;
String part2 = fname . substring (cut+3) ; fname = parti + part2; cut = fname. indexOf ("/./") ;
) cut = fname. indexOf ("/../") ; while ( cut '= -1)
(
String parti = fname .substring (0, cut+1) ;
String part2 = fname. substrin (cut+4) ; fname = parti + part2; cut = fname. mdexOf ("/../") ;
}
//TODO: use a more foolproof stub indicator than zero1 if (blob[0] == 00)
Debug. rint (2, " cache entry: " + Debug. chopPat (fname) ) ; else if (blob[0] == OxlF)
{
Debug. print (1, " uncompressing from: " + blob. length ); blob = uncompressBLOB (blob) ;
Debug. print (1, " to fullsize: " + blob. length ) ;
} else
Debug. rint (2, " caching object: " + Debug . chopPath ( fname ) );
_OCDCache. put (fname, blob);
//wake up threads waiting to read blobs this.notifyAll () ;
} ***********************+****************************************************/
//thread-synched method to retrieve binary data for a SRC object
//will wait if OCD directory build is underway - will wait if fetch
//of named object is underway. public synchronized byte[] getBLOB (String fname)
{
String lowstr = fname. toLowerCase (); //clamp to lowercase for matching purposes if ( getDate (fname) == null ) //if there is no OC entry for this file return null; if (_buιldmg)
Debug. print (1, " directory wait: GET " + Debug. chopPath (lowstr) ); while (_buιldmg) try { waιt(); } catch (InterruptedException lex) {} byte tmp[] = (byte []) jOCDCache. get ( (String) lowstr) ; if (tmp == null) return null; if (tmp[0] == 00)
Debug.prmt (1, " BLOB wait: GET " + Debug. chopPath (lowstr) ) ; while (tmp[0] == 00 ) {try {waitO; } catch (InterruptedException lex)
PCT Application Docket A-027, Office of Chas.G. Call. Ree. No. 20,406, Appendix- Page 150 of 156 {} tmp = (byte [] )_OCDCache. get ( (String) lowstr) ;
} if (tmp == null)
Debug. print (2, " BLOB notfound: " + Debug chopPath (lowstr) ) ; return tmp ; } ****************************************************************************/ public synchronized void clearOCDO {
_OCDCache . clear ( ) ; _buιldmg=false; notifyAHO i ) ****************************************************************************/
//methods to add a timestamp/url pair, remove it, and key it public void putCheck (String s. Date d) { s = s. toLowerCase () , int cut = s. dexOf ("/./") ; while ( cut '= -1) {
String parti - s . substring (0, cut+1) ; String part2 = s . substring (cut+3) ; s - parti + part2; cut = s.mdexOf ("/./") , } cut = s.mdexOf ("/../") , while ( cut '= -1)
{
String parti = s . substring (0, cut+1) ;
String part2 = s . substring (cut+4) ; s = parti + part2; cut = s.mdexOf ("/../") ;
}
//TODO: handle mixed case
Debug. rint (2, "stamp: " + Debug. chopPath (s) ) ;
_checks.put (s, d) ,
}
/**************************************************************************** public void removeCheck (String s) {_checks. remove (s) ; } public Date getDate (String s)
{ String lowers = s. toLowerCase () ;
Date tmp = (Date) _checks . get (lowers) ; if (tmp == null)
Debug. rint (1, " no stamp for " + Debug. chopPath (lowers) ) ; return tmp; } ****************************************************************************/ //bunch of rules to decide whether this URI is an HTML file //based on extension or its being the default file public boolean isHTMLExt (String uπ)
{
//TODO: replace this check to allow any extension from server config t extdot = uπ. lastlndexOf (" . ") ; if (extdot >0) { String ext = uri. substring (extdot) ;
PCT Application Docket A-027, Office of Chas.G. Call. Ree, No. 20,406, Appendix- Page 151 of 156 if (ext . startsWith C . htm" ) ) return true; if (ext.startsWith(".asp") ) return true; return false; }
//detect the "noname" case if ( ( uri. length ( ) ==0 ) I I (uri .equals ("/") ) ||
(uri.endsWithC ") && uri. indexOf (" . ") == -1) ) return true; return false; } ****************************************************************************/ //Decides: Should we find the OCD file'" public boolean needsOCD (String host, String uri, String orιg_tιmestamp) {
// Logic:
// If this is an HTML file GET, AND // If there's no timestamp,
// AND an OCD format exists for this HTML file, // AND the OCD format itself has not yet been fetched // return TRUE, else FALSE
// Case: default URL to HTML file specified if ( i isHTMLExt (uri) ) //ignore non-HTML files return false;
String OCD_url = host + prefIXURI ("ocd_", uri); if ( getProcessed(OCD_url) ' = null ) return false; if (orιg_tιmestamp '= null) return false; 1 for noname files, always get OCD
//TODO: bug: translate to default filename
Date OCD_mfo_avaιlable = (Date) getDate (OCD_url) ;
Date OCD_mfo_fetched = (Date) _OCDCache .get (OCD_url) ; if ( (OCD_url.ιndexOf ("noname") '= -1) && (OCD_mfo_fetched == null) ) return true;
//OCD file is named in OC cache but not yet in OCD cache if (( OCD_mfo_avaιlable "= null) && (OCD_mfo_fetched == null) ) return true; return false; }
/A*************************************************************************** / //Utility method -
//normalize URI - if it needs an ending slash, add one. //if there is no ending filename, extend by asking for "noname.htm" //the URI is then converted to an OC_ request // public String prefixURI (String prefix, String uri) {
String newuri = uri . toLowerCase 0 ; //clamp everything to lower case to help matching newuri = newuri. replace (' \\ ' , '/'); //normalize slash direction int firstslash = uri mdexOf ("/"); int lastslash = uri . lastlndexOf ("/") ; mt lastdot = uri. lastlndexOf (".") ; //find extension, if there is one
String rest = "";
PCT Application Docket A-027, Office of Chas.G Call. Re<». No. 20,406, Appendix- Page 152 of 156 if ((firstslash == 0) && (lastdot > lastslash)) //at least a slash and a dot after rest = uri. substring (lastslash+1) ; //take all after last slash if ( ( uri. length ()==0 ) || (uri .equals ("/") ) II
(uri.endsWithf"/") £& (uri. indexOf (". ") == -1) ) )//if there's no slash, or nothing after it rest = rest + "noname.htm"; //look for the noname file.
//A problem form:
//www. foo. com/adfa. cl?aa=bb
//we need to distinguish this from if ( (rest. mdexOf (".htm") != -1 ) II (rest . indexOf (" .asp" ) != -1 ) )
//we have an HTML file after normalizing
//Note: we need to recognize other extensions { //synthesize OC_ filename from given URI rest = prefix + rest; if (uri.endsWith('7") s& (lastdot > 0) ) // dot, slash newuri = uri .substring (0, lastslash+1) + rest; if ( luri.endsWith ("/") ss (lastdot == -1)) //no dot, no slash newuri = uri + "/" + rest; if ( !uri.endsWith("/") && (lastdot > 0)) // dot, no slash newuri = uri. substring (0, lastslash+1) + rest; if (uri.endsWith ("/") SS (lastdot == -1)) // no dot, slash newuri = uri. substring (0, lastslash+1) + rest; } newuri = newuri. replace (' \\ ','/') ; // clean up those bloody slashes!!! return newuri;
>**************************************+*************************************/ // Build the OC cache from an OC response by parsing its string // public synchronized void buildFrom(OCResponse OCR) {
String checks = OCR.getContentString () ;
//Record date and tag for the OC file we just parsed
//This will tell us if we can avoid fetching it again
String OCdate = OCR. getHeader ( "Last-Modified") ;
buildFromStrmg (checks, OCdate) ; }
//parse an input coherency string into the OC cache
// public void buildFromString (String checks, String OCdate)
{
String fname = null;
String fdate = null; int sindx=0; int after=checks. indexOf ("&", sindx) ; boolean firstfile = true; _thisfileURL=""; while (after != -1) { fname = checks. substring (sindx, after) . replace (' \\ ','/') ;
PCT Application Docket A-027, Office of Chas.G. Call, Reg. No. 20,406, Appendix- Page 153 of 156 smdx=after+l; after=checks .indexOf (", ", sindx ); fdate=checks. substring (sindx, after) . trιm() ; Date d = null; if (fdate.startsWith("%") ) //get date from timestamp as long { Long dstamp = new Long (f ate. substring (1) ) ; d = new Date (dstamp. longValue () ); } else
{d = new Date (fdate) ; } sindx=after+1 ; after=checks . indexOf ( "&", sindx) ; this.putCheck (fname. trim( ) , d) ; if (firstfile)
{
//in case this is the OC noname, record what noname should map to
_thιsfileURL=f ame . trim( ) ; firstfile=false;
} } if (OCdate != null) {
Date OCtime = new Date (OCdate) ; this .putCheck (fname, OCtime); }
Debug. print (2, " cached total of: " + this. size 0 + " checks. " ) ; Counters . afterBuild ( ) ;
} }
/* * * * * * *** * * * * * *** * * * * ** ** * * * * * * ** HEADER ************************************/
//
// Encapsulates the header format of OC and OCD files
//
// package WWWhooshCommon; import java.io.*; import Build; import Config; import OutMgr; import java. util. Date; public class WhooshHeader
{ private long _datapointer=0; private short _version = 0; private short _build = 0; private int _serverID = 0; private long _serverKey = 0; private long _gentime = 0; private short subcount = 0 ; private int _formats = 0; private int _proc_tag = 0;
String _hl = "WWWhoosh (c) MTI \r\n";
String _h2 = "Patents Pending \r\n";
String _h3 = "Version 3.1 \r\n" ;
String _h4 = "12345-56789 \r\n";
String _h5 = new Date (Config. getRunTime ()) .toGMTString () + "\r\n"; public int readFrom (BufferedlnputStream xis) throws IOException {
PCT Application Docket A-027, Office of Chas.G. Call. Ree. No. 20,406, Appendix- Page 154 of 156 //read header and initialized based on version, etc
//Otherwise assume we have prototype-era files and just begin processing DatalnputStream headerstream = new DatalnputStream(xis) ; int byteread=0;
//TODO. do this more efficiently if needed while ( (byteread ' = -1) ss (byteread '= (int) 26) ) byteread = xis.readO; datapointer = headerstream. readLong ( )
_versιon = headerstream. readShort ( ) ;
_buιld = headerstream. readShort ( ) ;
_serverID = headerstream. eadlnt () ;
_serverKey = headerstream. readLong {) ;
_gentιme = headerstream. readLong () ;
_subcount = headerstream. readShort () ;
_formats = headerstream. readlnt () ,
_proc_tag = headerstream. readlnt () , return 142; //TODO hack1 record actual size of header read
)
//write the header portion of an WWWhoosh file to the output stream public void writeTo ( FileOutputStream fos )
{
DataOutputStream dos= new DataOutputStream(fos) , short version = (short) Build.VERSION; //WWWhoosh Version short build = (short) Build. UMBER; //Server BUILD number int serveπd = 134134; //TODO how do we fetch a valid server ID? long l censekey = 111111111; //TODO. generate valid license key short subobjectcount=0; //number of subobjects m base HTML page mt avaιlableFormats=l; //bit per available OCD file mt processmgflags=0; if (Config. getGZip () ) //refers to and describes coherency format processιngflags=l; mt datapomter=42; //self-relative pointer to data try { dos .write (_hl. getBytes () ) ; dos .write (_h2.getBytes () ) dos .write (_h3. getBytes () ) dos .write (_h . getBytes () ) dos .write (_h5. getBytes ( ) ) //TODO - write ctrl-z dos .writeByte (26) ; //begin machine-readable portion dos.writeLong (datapointer) ; 1 8 dos. wπteShort (version) ; //2 dos. writeShort (build) ; 112 dos.writelnt (serveπd) ; 14 dos.writeLong (licensekey) ; IIS dos. riteLong (Config . getRunTime () ) ; //8 //generation timestamp dos. riteShort (subob ectcount) ; //22 dos.writelnt (availableFormats) ; 11 dos .writelnt (processmgflags ) ; 1/ 4
//After this Header comes the "content" part of each OC file e.g coherency //or subobject payload catch (IOException loe) { OutMgr.print!" **** ERROR: Exception writing file header **J
}
} public short getVersionO {
PCT Application Docket A-027, Office of Chas.G. Call, Reε^No. 20,406, Appendix- Page 155 of 156 return _version;
) public boolean compressio ( ) {
//TODO: use bitmask if (_proc_tag == 1) return true; return false; }
PCT Application Docket A-027, Office of Chas.G. Call, Ree. No. 20,406, Appendix- Page 156 of 156

Claims

What is claimed is:
1. The method for processing and transmitting a hypertext data object which comprises, in combination, the steps of: at an Internet server location: scanning the content of a given hypertext data object to identify at least one external data object that is referred to in said hypertext data object, combining said given hypertext data object and said external data object to form a single compound object containing data from said hypertext data object and said external data object, and assigning a unique resource name to said compound object which is derived from the resource name of said given hypertext data object, at an Internet client location: deriving said unique resource name from said resource name of said given hypertext data object, transmitting a request for said single compound data object specified by said unique resource name to said server location, receiving said single compound data object when from said server location in response to said request, and processing said compound data object to render said hypertext data object and said external data object at said client location, whereby the data needed to render said hypertext data object is obtained in a single request-response transaction rather than a plurality of request-response transactions.
2. The method of avoiding unnecessary network request-response exchanges when valid copies of information included by reference in a hypertext data object is already stored in the local cache at a client location, said method comprising, in combination, the steps of: at an Internet server location: analyzing the content of a given hypertext data object to identify at least one external data object that is referred to in said hypertext data object, forming a single compound data object which contains information describing said given hypertext data object and information describing the time at when said external data object was last modified at said server location, and transmitting said single compound data object from said server location to said client location, and at said client location, receiving said compound data object from said server location, and comparing said information describing the time when said external data object was last modified at said server location with the time when a copy of said external data object was last stored in said local cache.
PCT/US2000/025358 1999-09-13 2000-09-13 Methods and apparatus for storing, retrieving and manipulating hypertext data WO2001020485A2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU75836/00A AU7583600A (en) 1999-09-13 2000-09-13 Methods and apparatus for storing, retrieving and manipulating hypertext data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US15351699P 1999-09-13 1999-09-13
US60/153,516 1999-09-13

Publications (2)

Publication Number Publication Date
WO2001020485A2 true WO2001020485A2 (en) 2001-03-22
WO2001020485A3 WO2001020485A3 (en) 2001-05-10

Family

ID=22547542

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2000/025358 WO2001020485A2 (en) 1999-09-13 2000-09-13 Methods and apparatus for storing, retrieving and manipulating hypertext data

Country Status (2)

Country Link
AU (1) AU7583600A (en)
WO (1) WO2001020485A2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1860453B (en) * 2003-09-30 2010-05-26 索尼株式会社 Information processing device and method
WO2010118019A1 (en) * 2009-04-06 2010-10-14 Nokia Corporation Methods and systems for using multipart messaging with preset constraints
US8069406B2 (en) 2005-02-11 2011-11-29 Flash Networks, Inc. Method and system for improving user experience while browsing
US8166198B2 (en) 2006-03-28 2012-04-24 Flahs Networks, Ltd. Method and system for accelerating browsing sessions
US8606876B2 (en) 2004-02-11 2013-12-10 Flash Networks Ltd. Method and system for accelerating data communication that is using multipart
US9336323B2 (en) 2006-08-04 2016-05-10 Flash Networks, Inc. Method and system for accelerating surfing the internet
US9602613B2 (en) 2006-08-03 2017-03-21 Flash Networks, Ltd Method and system for accelerating browsing sessions

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5946697A (en) * 1997-04-22 1999-08-31 Microsoft Corporation Rapid transfer of HTML files

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5946697A (en) * 1997-04-22 1999-08-31 Microsoft Corporation Rapid transfer of HTML files

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
KRISHNAMURTHY B ET AL: "Piggyback server invalidation for proxy cache coherency" 7TH INTERNATIONAL WORLD WIDE WEB CONFERENCE, BRISBANE, QLD., AUSTRALIA, 14-18 APRIL 1998, vol. 30, no. 1-7, pages 185-193, XP004121428 Computer Networks and ISDN Systems, April 1998, Elsevier, Netherlands ISSN: 0169-7552 *
KRISHNAMURTHY B ET AL: "Study of piggyback cache validation for proxy caches in the World-Wide Web" PROCEEDINGS OF THE USENIX SYMPOSIUM ON INTERNET TECHNOLOGIES AND SYSTEMS, PROCEEDINGS OF THE USENIX SYMPOSIUM ON INTERNET TECHNOLOGIES AND SYSTEMS, MONTEREY, CA, USA, 8-11 DEC. 1997, pages 1-12, XP002161773 1997, Berkeley, CA, USA, USENIX Assoc, USA ISBN: 1-880446-91-X *
MOGUL J C ET AL: "Potential benefits of delta encoding and data compression for HTTP" ACM SIGCOMM 97 CONFERENCE. APPLICATIONS, TECHNOLOGIES, ARCHITECTURES, AND PROTOCOLS FOR COMPUTER COMMUNICATION, CANNES, FRANCE, 14-18 SEPT. 1997, vol. 27, no. 4, pages 181-194, XP002161774 Computer Communication Review, Oct. 1997, ACM, USA ISSN: 0146-4833 *
WILLS C E ET AL: "Towards a better understanding of Web resources and server responses for improved caching" PROCEEDINGS OF THE EIGHT INTERNATIONAL WORLD WIDE WEB CONFERENCE, TORONTO, ONT., CANADA, 11-14 MAY 1999, vol. 31, pages 1-17, XP002161772 Computer Networks, 17 May 1999, Elsevier, Netherlands ISSN: 1389-1286 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1860453B (en) * 2003-09-30 2010-05-26 索尼株式会社 Information processing device and method
US8606876B2 (en) 2004-02-11 2013-12-10 Flash Networks Ltd. Method and system for accelerating data communication that is using multipart
US8069406B2 (en) 2005-02-11 2011-11-29 Flash Networks, Inc. Method and system for improving user experience while browsing
US8166198B2 (en) 2006-03-28 2012-04-24 Flahs Networks, Ltd. Method and system for accelerating browsing sessions
US9602613B2 (en) 2006-08-03 2017-03-21 Flash Networks, Ltd Method and system for accelerating browsing sessions
US9336323B2 (en) 2006-08-04 2016-05-10 Flash Networks, Inc. Method and system for accelerating surfing the internet
WO2010118019A1 (en) * 2009-04-06 2010-10-14 Nokia Corporation Methods and systems for using multipart messaging with preset constraints

Also Published As

Publication number Publication date
AU7583600A (en) 2001-04-17
WO2001020485A3 (en) 2001-05-10

Similar Documents

Publication Publication Date Title
US8856263B2 (en) Systems and methods thereto for acceleration of web pages access using next page optimization, caching and pre-fetching techniques
US7644414B2 (en) Application program interface for network software platform
US7970946B1 (en) Recording and serializing events
US20140052811A1 (en) Dynamic content assembly on edge-of network servers in a content delivery network
US9547726B2 (en) Virtual file-sharing network
KR100612711B1 (en) Gathering enriched web server activity data of cached web content
US7246263B2 (en) System and method for portal infrastructure tracking
US20030229665A1 (en) Systems, methods and computer programs for implementing and accessing web services
US20070101061A1 (en) Customized content loading mechanism for portions of a web page in real time environments
US20030115365A1 (en) Transcoding information in a first markup language into a second markup language
US20060271642A1 (en) Method for multipart encoding
US20040216127A1 (en) Method and apparatus for accelerating web services
US20010042081A1 (en) Markup language paring for documents
JP2003514279A (en) Shared Internet storage resource, user interface system and method thereof
US8949462B1 (en) Removing personal identifiable information from client event information
US20020073197A1 (en) Method and apparatus for customizing performance of a browser for a given network connection
US9092448B2 (en) System and method for portal infrastructure tracking
Choi et al. An efficient embedded Web server for Web-based network element management
WO2001020485A2 (en) Methods and apparatus for storing, retrieving and manipulating hypertext data
US20070192324A1 (en) Method and device for advanced cache management in a user agent
Aoki et al. Web operation recorder and player
TW531998B (en) Method and system of enforcing the dispatching of IP datagrams on a plurality of servers according to a defined policy
Gu et al. Automatic detection of shared fragments in large collections of web pages and its applications
Eilers IseHarvest: TCP packet data re-assembler framework for network traffic content
Hellerøy A Server-Side Feature Detection System for an Enterprise Web CMS

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A2

Designated state(s): AE AL AM AT AU AZ BA BB BG BR BY CA CH CN CR CU CZ DE DK DM EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MK MN MW MX NO NZ PL PT RO RU SE SG SI SK SL TJ TM TR TT TZ UA UG US UZ VN YU ZA ZW

AL Designated countries for regional patents

Kind code of ref document: A2

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN GW ML MR NE SN TD TG

AK Designated states

Kind code of ref document: A3

Designated state(s): AE AL AM AT AU AZ BA BB BG BR BY CA CH CN CR CU CZ DE DK DM EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MK MN MW MX NO NZ PL PT RO RU SE SG SI SK SL TJ TM TR TT TZ UA UG US UZ VN YU ZA ZW

AL Designated countries for regional patents

Kind code of ref document: A3

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
REG Reference to national code

Ref country code: DE

Ref legal event code: 8642

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP