com.ibm.wbi.http.beans
Class NewUrlRequestEditor

com.ibm.wbi.plugin.Meg
  |
  +--com.ibm.wbi.plugin.RequestEditor
        |
        +--com.ibm.wbi.http.plugin.HttpRequestEditor
              |
              +--com.ibm.wbi.http.beans.NewUrlRequestEditor

public class NewUrlRequestEditor
extends HttpRequestEditor

A basic Request Editor which forwards to a new URL, replacing the requested URL with the new one. (It does not change anything else in the request, e.g. any posted data). It has one property that can be set: NewURL. This property is used to specify the URL from which to get the document.

Note the difference between this class and PageMovedGenerator. A PageMovedGenerator sends a response back to the client, redirecting it to a new URL. In this case, the client knows that it has been sent elsewhere. So, for example, relative links in the document will be interpreted from the new URL. If the NewURLRequestEditor is used, the client simply receives the content from the new URL, but does not know where the document came from.

See Also:
PageMovedGenerator

Field Summary
static java.lang.String COPYRIGHT
          IBM copyright information
 
Fields inherited from class com.ibm.wbi.http.plugin.HttpRequestEditor
COPYRIGHT
 
Fields inherited from class com.ibm.wbi.plugin.RequestEditor
COPYRIGHT
 
Fields inherited from class com.ibm.wbi.plugin.Meg
COPYRIGHT, EDITOR, GENERATOR, MONITOR, REQUEST_EDITOR, UNDEFINED
 
Constructor Summary
NewUrlRequestEditor()
          The default constructor.
 
Method Summary
 java.lang.String getNewUrl()
          Access the NewURL property.
 void handleRequest(RequestEvent e)
          The method used by the proxy to edit the request to point to the new URL.
 void setNewUrl(java.lang.String nu)
          Set the New URL property.
 
Methods inherited from class com.ibm.wbi.http.plugin.HttpRequestEditor
getOriginalHttpRequest, setFinalHttpRequest
 
Methods inherited from class com.ibm.wbi.plugin.RequestEditor
getMegType, processRejectedRequest
 
Methods inherited from class com.ibm.wbi.plugin.Meg
forwardRequest, getCondition, getEnabled, getName, getPlugin, getPriority, isEnabled, setCondition, setEnabled, setName, setPriority, setup, setup, setup, setup, threadManagerRun
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
IBM copyright information
Constructor Detail

NewUrlRequestEditor

public NewUrlRequestEditor()
The default constructor. The NewURL property is set to null.
Method Detail

getNewUrl

public java.lang.String getNewUrl()
Access the NewURL property.
Returns:
The NewURL

setNewUrl

public void setNewUrl(java.lang.String nu)
Set the New URL property.
Parameters:
nu - The NewURL

handleRequest

public void handleRequest(RequestEvent e)
                   throws RequestRejectedException
The method used by the proxy to edit the request to point to the new URL.
Parameters:
e - The request event.
Throws:
RequestRejectedException - To reject request.
Overrides:
handleRequest in class HttpRequestEditor