Class Connection

java.lang.Object
com.realobjects.pdfreactor.contentobserver.Connection

public class Connection extends Object

A type that describes a URL connection attempt of PDFreactor during a conversion.

  • Method Details

    • getUrl

      public String getUrl()

      The URL.

    • getProtocol

      public String getProtocol()

      The protocol of the URL connection.

    • getError

      public String getError()

      The error message if the connection could not be established.

    • getMethod

      public String 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

      public String 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, see getError() for details.

    • getTimestamp

      public long getTimestamp()

      The time stamp of this connection.

    • getRequestHeaders

      public Configuration.KeyValuePair[] 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

      public Configuration.KeyValuePair[] 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

      public String 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

      public ResourceType getResourceType()

      The type of resource (style sheet, image, etc.) transferred over this connection.