scone.proxy
Class HtmlTokenEditor
java.lang.Object
HttpEditor
scone.proxy.HtmlTokenEditor
- Direct Known Subclasses:
- AddPreambleEditor, BodyEventAdder, BodyEventAdder, FormSubmitEventAdder, FormSubmitEventAdder, JavaScriptAdder, JavaScriptAdder, LinkEventAdder, LinkEventAdder, Magnifier, ParsingMeg, StatusBarWizard, TimeStoreScriptAdder, TimeStoreScriptAdder
public abstract class HtmlTokenEditor
- extends HttpEditor
The HtmlTokenEditor is a WBI MEG that allows for manipulating
HTML documents in the HTTP-Response of the proxy.
It may be declared like this:
MyHtmlTokenEditor mhte = new MyHtmlTokenEditor();
mhte.setup(HTDOCCONDITION,priority);
addMeg(mhte);
Now MyHtmlTokenEditor's handleRequest(SconePipe) method will be called
whenever the proxy sends an HTML document to the client.
Field Summary |
static java.lang.String |
COPYRIGHT
|
protected RequestEvent |
e
|
Method Summary |
void |
handleRequest(RequestEvent e)
the MEG's handleRequest() method. |
void |
setResponseHeaderField(java.lang.String name,
java.lang.String value)
this method adds fields to the HTTP response header. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
e
protected RequestEvent e
HtmlTokenEditor
public HtmlTokenEditor()
handleRequest
public final void handleRequest(RequestEvent e)
throws RequestRejectedException,
java.io.IOException
- the MEG's handleRequest() method. Do not use it.
- Throws:
RequestRejectedException
java.io.IOException
setResponseHeaderField
public void setResponseHeaderField(java.lang.String name,
java.lang.String value)
- this method adds fields to the HTTP response header.
It must be called before any of the streams is requested from the pipe!
- Parameters:
name
- the field's namevalue
- the value