org.opentox.toxotis.client.http
Class GetHttpClient

java.lang.Object
  extended by org.opentox.toxotis.client.AbstractClient
      extended by org.opentox.toxotis.client.http.AbstractHttpClient
          extended by org.opentox.toxotis.client.http.GetHttpClient
All Implemented Interfaces:
Closeable, IClient, IGetClient

public class GetHttpClient
extends AbstractHttpClient
implements IGetClient

A client that performs GET requests.

Author:
Pantelis Sopasakis, Charalampos Chomenides

Field Summary
 
Fields inherited from class org.opentox.toxotis.client.AbstractClient
bufferSize
 
Fields inherited from interface org.opentox.toxotis.client.IGetClient
METHOD
 
Fields inherited from interface org.opentox.toxotis.client.IClient
httpProtocol, httpSecureProtocol, URL_ENCODING
 
Constructor Summary
GetHttpClient()
          Create a new instance of GetHttpClient
GetHttpClient(VRI uri)
          Instantiates a GET client with a given target URI.
 
Method Summary
protected  HttpURLConnection initializeConnection(URI uri)
          Initiate a connection to the remote location identified by the provided URI and using the already specified header parameters.
 
Methods inherited from class org.opentox.toxotis.client.AbstractClient
addHeaderParameter, authorize, close, connect, getConnection, getConnectionInputStream, getConnectionLock, getHeaderValues, getMediaType, getReadLock, getRemoteStream, getResponseCode, getResponseContentType, getResponseHeader, getResponseOntModel, getResponseOntModel, getResponseText, getResponseUriList, getUri, setConnection, setMediaType, setMediaType, setUri, setUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opentox.toxotis.client.IClient
addHeaderParameter, authorize, close, getConnectionLock, getMediaType, getReadLock, getRemoteStream, getResponseCode, getResponseContentType, getResponseHeader, getResponseOntModel, getResponseOntModel, getResponseText, getResponseUriList, getUri, setMediaType, setMediaType, setUri, setUri
 

Constructor Detail

GetHttpClient

public GetHttpClient()
Create a new instance of GetHttpClient


GetHttpClient

public GetHttpClient(VRI uri)
Instantiates a GET client with a given target URI.

Parameters:
uri - The URI of the resource where the client should perform the request.
Method Detail

initializeConnection

protected HttpURLConnection initializeConnection(URI uri)
                                          throws ConnectionException,
                                                 InternalServerError
Description copied from class: AbstractClient
Initiate a connection to the remote location identified by the provided URI and using the already specified header parameters.

Specified by:
initializeConnection in class AbstractClient
Parameters:
uri - The location to which the HTTP connection should be made.
Returns:
An instance of HttpURLConnection that is used to perform the remote HTTP request.
Throws:
ConnectionException
InternalServerError


Copyright © 2011-2012 OpenTox. All Rights Reserved.