Class Connection
A type that describes a URL connection attempt of PDFreactor during a conversion.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether the response was retrieved from a cache.If a resource cache is used, indicates a status message concerning the cache status of this resource.long
The amount of content bytes downloaded or read from this connection.long
The duration in milliseconds how long this connection remained open.getError()
The error message if the connection could not be established.The request method used by the underlying HTTP request (like "GET", "POST", etc.) ornull
if this is not an HTTP connection or the connection could not be established.The protocol of the URL connection.long
The amount of content bytes uploaded or written to this connection.The request headers.The type of resource (style sheet, image, etc.) transferred over this connection.The response headers.int
The response code for HTTP connections or 0 for all other connections.The response message for the response code ornull
if the response code is 0 or the message could not be determined.long
The time stamp of this connection.getUrl()
The URL.boolean
Whether a URL connection could be established by PDFreactor.
-
Method Details
-
getUrl
The URL.
-
getProtocol
The protocol of the URL connection.
-
getError
The error message if the connection could not be established.
-
getMethod
The request method used by the underlying HTTP request (like "GET", "POST", etc.) or
null
if this is not an HTTP connection or the connection could not be established. -
getStatusCode
public int getStatusCode()The response code for HTTP connections or 0 for all other connections.
-
getStatusMessage
The response message for the response code or
null
if the response code is 0 or the message could not be determined. -
isConnected
public boolean isConnected()Whether a URL connection could be established by PDFreactor. If this is
false
, seegetError()
for details. -
getTimestamp
public long getTimestamp()The time stamp of this connection.
-
getRequestHeaders
The request headers.
Note: If a header has multiple values, there will be one
Configuration.KeyValuePair
for each value with the header name as key. -
getResponseHeaders
The response headers.
Note: If a header has multiple values, there will be one
Configuration.KeyValuePair
for each value with the header name as key. -
getDuration
public long getDuration()The duration in milliseconds how long this connection remained open.
-
getCached
public boolean getCached()Whether the response was retrieved from a cache.
-
getCacheStatus
If a resource cache is used, indicates a status message concerning the cache status of this resource.
-
getContentSize
public long getContentSize()The amount of content bytes downloaded or read from this connection.
-
getRequestContentSize
public long getRequestContentSize()The amount of content bytes uploaded or written to this connection.
-
getResourceType
The type of resource (style sheet, image, etc.) transferred over this connection.
-