Package org.htmlunit
Class AbstractPage
- java.lang.Object
-
- org.htmlunit.AbstractPage
-
- All Implemented Interfaces:
java.io.Serializable,Page
- Direct Known Subclasses:
TextPage,UnexpectedPage
public class AbstractPage extends java.lang.Object implements Page
A basicPageimplementation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractPage(WebResponse webResponse, WebWindow enclosingWindow)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up this page.WebWindowgetEnclosingWindow()Returns the window that this page is sitting inside.java.net.URLgetUrl()Returns the URL of this page.WebResponsegetWebResponse()Returns the web response that was originally used to create this page.voidinitialize()Initializes this page.booleanisHtmlPage()Returns true if this page is an HtmlPage.
-
-
-
Constructor Detail
-
AbstractPage
public AbstractPage(WebResponse webResponse, WebWindow enclosingWindow)
Creates an instance.- Parameters:
webResponse- the response from the serverenclosingWindow- the window that holds the page
-
-
Method Detail
-
initialize
public void initialize()
Initializes this page.- Specified by:
initializein interfacePage
-
getWebResponse
public WebResponse getWebResponse()
Returns the web response that was originally used to create this page.- Specified by:
getWebResponsein interfacePage- Returns:
- the web response that was originally used to create this page
-
getEnclosingWindow
public WebWindow getEnclosingWindow()
Returns the window that this page is sitting inside.- Specified by:
getEnclosingWindowin interfacePage- Returns:
- the enclosing frame or null if this page isn't inside a frame
-
getUrl
public java.net.URL getUrl()
Returns the URL of this page.
-
isHtmlPage
public boolean isHtmlPage()
Description copied from interface:PageReturns true if this page is an HtmlPage.- Specified by:
isHtmlPagein interfacePage- Returns:
- true or false
-
-