com.ibm.wbi.protocol.http.beans
Class PageMovedGenerator
com.ibm.wbi.Meg
|
+--com.ibm.wbi.Generator
|
+--com.ibm.wbi.protocol.http.HttpGenerator
|
+--com.ibm.wbi.protocol.http.beans.FourStepHttpGenerator
|
+--com.ibm.wbi.protocol.http.beans.PageMovedGenerator
- public class PageMovedGenerator
- extends FourStepHttpGenerator
A Generator that produces an HTTP response directing the browser to load
the document at a different URL. The new URL will appear in the user
interface as well.
There are two properties that can be set: DestinationURL and Type.
The DestinationURL indicates the URL that the browser should be directed
to. The Type indicates whether the redirection should be considered
temporary or permanent.
|
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright information |
static int |
PERMANENT
Permanent page type. |
static int |
TEMPORARY
Temporary page type. |
|
Constructor Summary |
PageMovedGenerator()
The default constructor. |
PageMovedGenerator(java.lang.String url)
Construct an instance with the given DestinationURL and of
TEMPORARY type. |
PageMovedGenerator(java.lang.String url,
int t)
Construct an instance with the given DestinationURL and Type. |
| Methods inherited from class com.ibm.wbi.protocol.http.HttpGenerator |
add, addCookie, getContentType, getHttpResponse, getHttpResponseString, getResponseCode, getResponseText, isCache, produceHeader, set, setCache, setContentLength, setContentType, setResponseCode, setResponseText, setServer, writeHeader |
| Methods inherited from class com.ibm.wbi.Meg |
forwardRequest, getCondition, getEnabled, getMegProperty, getMegProperty, getMegPropertyKeys, getName, getPlugin, getPriority, getSystemContext, initialize, initialize, isEnabled, isMegApplicable, loadMegResources, run, setCondition, setEnabled, setMegProperty, setName, setPriority, setSystemContext, setup, setup, setup, setup |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright information
TEMPORARY
public static final int TEMPORARY
- Temporary page type.
PERMANENT
public static final int PERMANENT
- Permanent page type.
PageMovedGenerator
public PageMovedGenerator()
- The default constructor. The DestinationURL defaults to null and
the Type defaults to
TEMPORARY.
PageMovedGenerator
public PageMovedGenerator(java.lang.String url)
- Construct an instance with the given DestinationURL and of
TEMPORARY type.
- Parameters:
url - The URL to which the browser should be redirected.
PageMovedGenerator
public PageMovedGenerator(java.lang.String url,
int t)
- Construct an instance with the given DestinationURL and Type.
- Parameters:
url - The URL to which the browser should be redirectedt - The type of redirection, either TEMPORARY or PERMANENT.
setDestinationUrl
public void setDestinationUrl(java.lang.String url)
- Set the DestinationUrl property.
- Parameters:
url - The URL to which the browser should be redirected.
setRedirectType
public void setRedirectType(int t)
- Set the Type property.
- Parameters:
t - The type of redirection, either TEMPORARY or PERMANENT.
getDestinationUrl
public java.lang.String getDestinationUrl()
- Access the DestinationUrl property.
- Returns:
- The DestinationURL.
getRedirectType
public int getRedirectType()
- Access the Type property.
- Returns:
- Either TEMPORARY or PERMANENT.
getHeader
protected java.lang.String getHeader(RequestEvent e)
- Get the header.
- Overrides:
getHeader in class FourStepHttpGenerator
- Parameters:
e - The request event.- Returns:
- The header.