|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface for rewriting links. Distinguishes between inline source references, which tend to contain data and do not need to be redirected through the WBI server (and indeed probably should not for performance reasons), and clickable links, which should be rewritten to "keep the user on the WBI server". This interface is part of the KeepOnServerEditor package. In order to work reentrantly (threadsafely), KeepOnServerEditor will construct a new instance of your linkrewriter to handle each request (it's a stateful object -- think about get/setBase()). Thus the class of your LinkRewriter implementation is passed as an argument to the KeepOnServerEditor, as well as some initialization data in the form of an Object. If you have data that varies with the transaction, consider sticking it in the transaction data (@see RequestInfo)
KeepOnServerEditor| Method Summary | |
java.lang.String |
getBase(ResponseToRequest rtr)
The |
void |
initialize(java.lang.Object init)
Initialize a LinkRewriter instance |
java.lang.String |
rewriteLink(ResponseToRequest rtr,
java.lang.String l)
Rewrite followable links. |
java.lang.String |
rewriteSource(ResponseToRequest rtr,
java.lang.String l)
Rewrite source urls. |
void |
setBase(java.lang.String base)
The |
| Method Detail |
public void initialize(java.lang.Object init)
init - Initialization data (e.g., String, Hashtable, custom class, etc)
public java.lang.String rewriteLink(ResponseToRequest rtr,
java.lang.String l)
rtr - the ResponseToRequest (RequentEvent or ServiceResult) might be useful to get additional information about the transactionl - the link to be rewritten, e.g., http://www.almaden.ibm.com or /foo/bar.html
public java.lang.String rewriteSource(ResponseToRequest rtr,
java.lang.String l)
rtr - the ResponseToRequest (ServiceResult or RequestEvent) might be usefl to get additional information about the transactionl - the link to be rewrittenpublic java.lang.String getBase(ResponseToRequest rtr)
public void setBase(java.lang.String base)
base - The explicit base
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||