public class HttpCommunicator extends Object
| Constructor and Description |
|---|
HttpCommunicator(NerrvanaPluginSettings settings) |
| Modifier and Type | Method and Description |
|---|---|
String |
calculateSignature(List<org.apache.http.NameValuePair> params)
Calculates 'signature' for the parameters to be sent to Nerrvana.
|
String |
calculateSignature(List<org.apache.http.NameValuePair> params,
String charset) |
Testrun |
createTestrun(String space_id,
String name,
String descr,
List<Platform> platforms,
String executable_file,
boolean bValidation,
int nodes_count)
Calls Nerrvana API to create
Nerrvana test run
All function parameters are obtained from @see NerrvanaPluginSettings
object, which, in turn obtains them from plugin settings.
|
org.apache.http.HttpEntity |
get(String resource,
List<org.apache.http.NameValuePair> params)
HTTP GET shortcut
|
NerrvanaExecution |
getExecutionStatus(String exec_id)
Calls Nerrvana API to get status of the execution by id
|
org.apache.http.HttpEntity |
post(String resource,
List<org.apache.http.NameValuePair> params)
HTTP POST shortcut
|
void |
traceParams(org.apache.http.params.HttpParams params)
Function for log/debug
|
void |
traceResponseHeaders(org.apache.http.HttpResponse response)
Function for log/debug
|
public static final String[] PARAMS
public HttpCommunicator(NerrvanaPluginSettings settings)
public String calculateSignature(List<org.apache.http.NameValuePair> params) throws Exception
Calculates 'signature' for the parameters to be sent to Nerrvana.
Signature then is appended to the call parameters as last name/value pair
params - list of name/value pairs of the HTTP callExceptionpublic String calculateSignature(List<org.apache.http.NameValuePair> params, String charset) throws Exception
Exceptionpublic void traceResponseHeaders(org.apache.http.HttpResponse response)
throws Exception
response - Exceptionpublic void traceParams(org.apache.http.params.HttpParams params)
throws Exception
params - Exceptionpublic org.apache.http.HttpEntity get(String resource, List<org.apache.http.NameValuePair> params) throws Exception
resource - address of the HTTP serverparams - list of name/value pairsExceptionpublic org.apache.http.HttpEntity post(String resource, List<org.apache.http.NameValuePair> params) throws Exception
resource - address of the HTTP serverparams - list of name/value pairsExceptionpublic NerrvanaExecution getExecutionStatus(String exec_id) throws Exception
exec_id - ID of the NerrvanaExecution to get status ofExceptionpublic Testrun createTestrun(String space_id, String name, String descr, List<Platform> platforms, String executable_file, boolean bValidation, int nodes_count) throws Exception
Calls Nerrvana API to create Nerrvana test run
All function parameters are obtained from @see NerrvanaPluginSettings object, which, in turn obtains them from plugin settings.space_id - name - descr - platforms - executable_file - bValidation - nodes_count - ExceptionCopyright © 2004-2013 Deep Shift Labs. All Rights Reserved.