|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.DefaultPageCreator
public class DefaultPageCreator
The default implementation of PageCreator. Designed to be extended for easier handling of new content types. Just check the content type in createPage() and call super(createPage()) if your custom type isn't found. There are also protected createXXXXPage() methods for creating the Page types HtmlUnit already knows about for your custom content types.
Constructor Summary | |
---|---|
DefaultPageCreator()
Create an instance. |
Method Summary | |
---|---|
protected HtmlPage |
createHtmlPage(WebResponse webResponse,
WebWindow webWindow)
Create a HtmlPage for this WebResponse |
protected JavaScriptPage |
createJavaScriptPage(WebResponse webResponse,
WebWindow webWindow)
Create a JavaScriptPage for this WebResponse |
Page |
createPage(WebResponse webResponse,
WebWindow webWindow)
Create a Page object for the specified web response. |
protected TextPage |
createTextPage(WebResponse webResponse,
WebWindow webWindow)
Create a TextPage for this WebResponse |
protected UnexpectedPage |
createUnexpectedPage(WebResponse webResponse,
WebWindow webWindow)
Create an UnexpectedPage for this WebResponse |
protected XmlPage |
createXmlPage(WebResponse webResponse,
WebWindow webWindow)
Create an XmlPage for this WebResponse |
protected String |
determinePageType(String contentType)
Determines the kind of page to create from the content type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPageCreator()
Method Detail |
---|
public Page createPage(WebResponse webResponse, WebWindow webWindow) throws IOException
createPage
in interface PageCreator
webResponse
- The response from the serverwebWindow
- The window that this page will be loaded into.
IOException
- If an io problem occursprotected HtmlPage createHtmlPage(WebResponse webResponse, WebWindow webWindow) throws IOException
webResponse
- The page's sourcewebWindow
- The WebWindow to place the HtmlPage in
IOException
- If the page could not be createdprotected JavaScriptPage createJavaScriptPage(WebResponse webResponse, WebWindow webWindow)
webResponse
- The page's sourcewebWindow
- The WebWindow to place the JavaScriptPage in
protected TextPage createTextPage(WebResponse webResponse, WebWindow webWindow)
webResponse
- The page's sourcewebWindow
- The WebWindow to place the TextPage in
protected UnexpectedPage createUnexpectedPage(WebResponse webResponse, WebWindow webWindow)
webResponse
- The page's sourcewebWindow
- The WebWindow to place the UnexpectedPage in
protected XmlPage createXmlPage(WebResponse webResponse, WebWindow webWindow) throws IOException
webResponse
- The page's sourcewebWindow
- The WebWindow to place the TextPage in
IOException
- If the page could not be createdprotected String determinePageType(String contentType)
contentType
- The content type to evaluate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |