net.netheos.pcsapi.request
Class HttpRequestor

java.lang.Object
  extended by net.netheos.pcsapi.request.HttpRequestor
All Implemented Interfaces:
Callable<CResponse>, Requestor<CResponse>

public class HttpRequestor
extends Object
implements Requestor<CResponse>

A simple requestor which execute a http request.


Constructor Summary
HttpRequestor(org.apache.http.client.methods.HttpUriRequest request, CPath path, HttpExecutor executor)
          Create a new requestor
 
Method Summary
 CResponse call()
           
 CPath getPath()
          Get the file path used in the request
 org.apache.http.client.methods.HttpUriRequest getRequest()
          Get the http request used in this executor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequestor

public HttpRequestor(org.apache.http.client.methods.HttpUriRequest request,
                     CPath path,
                     HttpExecutor executor)
Create a new requestor

Parameters:
request - The http request (HttpGet, HttpPost ...) to execute
path - The requested file path (may be null)
executor - The object used to execute the request
Method Detail

getRequest

public org.apache.http.client.methods.HttpUriRequest getRequest()
Get the http request used in this executor

Returns:
The request

getPath

public CPath getPath()
Description copied from interface: Requestor
Get the file path used in the request

Specified by:
getPath in interface Requestor<CResponse>
Returns:
The file path or null if the request do not uses it

call

public CResponse call()
               throws CStorageException
Specified by:
call in interface Callable<CResponse>
Throws:
CStorageException


Copyright © 2014. All Rights Reserved.