|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
AddPreambleEditor | Adds a preamble to a Html-Document. |
FixContentTypeEditor2 | |
GeneralResourceGenerator | This meg is able to return documents to the browser. |
HtmlTokenEditor | The HtmlTokenEditor is a WBI MEG that allows for manipulating HTML documents in the HTTP-Response of the proxy. |
NewServerRequestEditor | This meg is able to return documents to the browser. |
NewServerResponseEditor | |
NoCacheMeg | The NoCacheMeg is a WBI MEG that adds "NoCache" command in the header of the response of a server. |
PageTimeoutMeg | The PageTimeoutMeg is a WBI MEG that adds timeout commands to the header of the server response. |
ParsingMeg | transforms tokens into database objects. |
Proxy | the proxy class of the Scone framework. |
ServerScoutLinkRewriter | |
ServerSide | This plugin enables the proxy to run as a web server |
This package contains the classes related to the proxy. IBM's WBI is used as a proxy and scone is a WBI-plugin.
Scone also may contain SconePlugin objects and offers them the following services:
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());
}
}
}
}
}
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |