public final class Driver extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Driver.DriverBuilder |
Modifier | Constructor and Description |
---|---|
protected |
Driver() |
Modifier and Type | Method and Description |
---|---|
static Driver.DriverBuilder |
builder() |
DriverConfiguration |
getConfiguration()
Get current driver configuration.
|
ContentTypeHelper |
getContentTypeHelper() |
EventManager |
getEventManager()
Get current event manager for this driver instance.
|
RequestExecutor |
getRequestExecutor() |
UrlRewriter |
getUrlRewriter() |
org.apache.http.client.methods.CloseableHttpResponse |
proxy(String relUrl,
IncomingRequest incomingRequest,
Renderer... renderers)
Retrieves a resource from the provider application and transforms it using the Renderer passed as a parameter.
|
org.apache.http.client.methods.CloseableHttpResponse |
render(String pageUrl,
IncomingRequest incomingRequest,
Renderer... renderers)
Perform rendering on a single url content, and append result to "writer".
|
String |
toString() |
public static Driver.DriverBuilder builder()
public EventManager getEventManager()
public org.apache.http.client.methods.CloseableHttpResponse render(String pageUrl, IncomingRequest incomingRequest, Renderer... renderers) throws IOException, HttpErrorPage
pageUrl
- Address of the page containing the templateincomingRequest
- originating request objectrenderers
- the renderers to use in order to transform the outputIOException
- If an IOException occurs while writing to the writerHttpErrorPage
- If an Exception occurs while retrieving the templatepublic org.apache.http.client.methods.CloseableHttpResponse proxy(String relUrl, IncomingRequest incomingRequest, Renderer... renderers) throws IOException, HttpErrorPage
relUrl
- the relative URL to the resourceincomingRequest
- the requestrenderers
- the renderers to use to transform the outputIOException
- If an IOException occurs while writing to the responseHttpErrorPage
- If the page contains incorrect tagspublic DriverConfiguration getConfiguration()
This method is not intended to get a WRITE access to the configuration.
This may be supported in future versions (testing is needed). For the time being, changing configuration settings after getting access through this method is UNSUPPORTED and SHOULD NOT be used.
public RequestExecutor getRequestExecutor()
public ContentTypeHelper getContentTypeHelper()
public UrlRewriter getUrlRewriter()
Copyright © 2008–2018. All rights reserved.