com.cloudbees.api
Class BeesClientBase
java.lang.Object
com.cloudbees.api.BeesClientBase
- Direct Known Subclasses:
- BeesClient
public class BeesClientBase
- extends Object
|
Method Summary |
InputStream |
executeCometRequest(String url)
|
String |
executeRequest(String url)
|
protected String |
executeUpload(String uploadURL,
Map<String,String> params,
Map<String,File> files,
UploadProgress writeListener)
|
protected StringBuilder |
getApiUrl(String method)
|
BeesClientConfiguration |
getBeesClientConfiguration()
Exposed for subtypes. |
String |
getRequestURL(String method,
Map<String,String> methodParams)
|
String |
getRequestURL(String method,
Map<String,String> methodParams,
boolean asActionParam)
|
protected String |
getResponseString(InputStream ins)
|
static String |
getSignature(String data,
String secret)
|
boolean |
isVerbose()
|
static String |
md5(String message)
|
protected void |
processError(String response,
int code)
|
void |
setVerbose(boolean verbose)
|
protected void |
trace(String message)
|
protected void |
traceResponse(String message)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
format
protected String format
BeesClientBase
public BeesClientBase(BeesClientConfiguration beesClientConfiguration)
BeesClientBase
public BeesClientBase(String serverApiUrl,
String apiKey,
String secret,
String format,
String version)
getBeesClientConfiguration
public BeesClientConfiguration getBeesClientConfiguration()
- Exposed for subtypes. Treat the configuration as immutable object,
since changes will not be reflected to the current running state.
isVerbose
public boolean isVerbose()
setVerbose
public void setVerbose(boolean verbose)
getRequestURL
public String getRequestURL(String method,
Map<String,String> methodParams)
throws Exception
- Throws:
Exception
getRequestURL
public String getRequestURL(String method,
Map<String,String> methodParams,
boolean asActionParam)
throws Exception
- Throws:
Exception
getApiUrl
protected StringBuilder getApiUrl(String method)
getSignature
public static String getSignature(String data,
String secret)
throws Exception
- Throws:
Exception
md5
public static String md5(String message)
executeRequest
public String executeRequest(String url)
throws Exception
- Throws:
Exception
getResponseString
protected String getResponseString(InputStream ins)
throws IOException
- Throws:
IOException
executeCometRequest
public InputStream executeCometRequest(String url)
throws Exception
- Throws:
Exception
processError
protected void processError(String response,
int code)
throws BeesClientException
- Throws:
BeesClientException
trace
protected void trace(String message)
traceResponse
protected void traceResponse(String message)
executeUpload
protected String executeUpload(String uploadURL,
Map<String,String> params,
Map<String,File> files,
UploadProgress writeListener)
throws Exception
- Throws:
Exception
Copyright © 2011-2012. All Rights Reserved.