This package contains the classes related to the proxy. IBM's WBI is used as a proxy and scone is a WBI-plugin.

Scone basically analyzes the streams which flow through the proxy: The AccessTrackingMeg identifies users and logs their actions. The TokenHandlerMeg and its StandardHtmlTokenHandler (see TokenHandlerController for the TokenHandler-Framework) analyze HTML documents and create corresponding net-objects (see the scone.netobjects package documentation).

Scone also may contain SconePlugin objects and offers them the following services:

- HtmlTokenHandler objects may be registered to analyze or alter HTML documents
- SconePlugin objects may add new Strings to the AddPreambleHtmlTokenHandler object already registered at the TokenHandlerMeg
- The GeneralResourceGenerator maps URIs to local filesystem paths and returns the desired file. SconePlugin objects may add new mappings
- SconePlugin objects may register themselves at the caches of scone.netobjects to be notified when new objects have been extracted from HTML documents

SconePlugin objects are registered via the file scone/config/plugins.ini

This package also includes the Retriever class. This class can be used to fetch any document from the internet. It is designed especially for fetching and analyzing HTML documents.

example:

plugins.ini:
``

    //leave exactly one space after plugin: !
    plugin: scone.ObserverTest

scone/ObserverTest.java:

    package scone;

    import java.util.*;
    import scone.netobjects.*;
    import scone.proxy.*;

    public class ObserverTest implements Observer, SconePluginInterface{

      public ObserverTest(){}

      //diese Methode ruft Scone bei allen plugins auf!
      public void init(Scone scone){
        //diesen Observer anmelden
        NetNodeCache.putObserver(this);
        HtmlNodeCache.putObserver(this);

        //alle 30 sekunden notifien
        HtmlNodeCache.setObservePeriod(1000*30);
      }

      //wir koennen davon ausgehen, dass o irgendein cache ist
      //und arg eine enumeration von netobjects...
      public void update(Observable o, Object arg){
        System.out.println("ObserverTest!");

        //yes, the NetNodeCache notifies us!
        if(o instanceof NetNodeCache){
          //just print all new NetNode objects to the screen
          for (Enumeration e = (Enumeration)arg; e.hasMoreElements() ;) {
            System.out.println("New NetNode: "+((NetNode)e.nextElement()).getUri());
          }
        }else{
          if(o instanceof HtmlNodeCache){
            //just print all new HtmlNode objects to the screen
            for (Enumeration e = (Enumeration)arg; e.hasMoreElements() ;) {
              System.out.println("New HtmlNode: "+((HtmlNode)e.nextElement()).getTitle());
            }
          }
        }
      }
    }