Example of Using Observer Interface for Raw HTML

Demonstration

This example demonstrates using the Observer interface to watch for HTML being received in the JavaCGIBridge object. Unlike the previous observer interface example which watched parsed records, this observer interface watches raw html. Each byte is considered when the RawHTMLNotifyInterval is setup. By default, this is set to -1 and you can change it in the applet interface.

-1 means that the applet gets notified only at the end of all HTML being sent. Furthermore, the update() method is setup in the applet so that it only populates the TextArea with the HTML text from its first event. Thus, at -1, all the HTML will be displayed. But at an interval of 20, only the first 20 characters will be displayed.

Example Observer Interface for Raw HTML Bytes

View The Source To Example9Applet.java

View The Source To JavaCGI Bridge.java

View The JavaCGIBridge JavaDoc File

View The Source To JavaCGIBridgeNotify.java

View The JavaCGIBridgeNotify JavaDoc File

View The Source To JavaCGIBridgeTimeOutException.java

View The JavaCGIBridgeTimeOutException JavaDoc File

View The Source To get_100_records.cgi

Plain CGI script retrieving 100 records

Run get_100_records.cgi CGI/Perl Script

Gunther Birznieks <gunther@clark.net>