public class BaseClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected URL |
_host |
protected String |
authString |
protected com.google.gson.Gson |
gson |
protected String |
password |
protected String |
username |
| Constructor and Description |
|---|
BaseClient(String uri,
String encodedUsernamePassword) |
BaseClient(String uri,
String username,
String password) |
BaseClient(URL uri,
String encodedUsernamePassword) |
BaseClient(URL uri,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
checkPath(String path) |
protected com.google.gson.Gson |
getDecoder() |
protected void |
init(URL uri,
String encodedUsernamePassword) |
protected void |
init(URL uri,
String user,
String password) |
protected HttpURLConnection |
initializeConnection(URL url) |
protected HttpURLConnection |
initializeConnectionForAttachments(URL url,
String boundary) |
protected String |
issueDelete(String path) |
protected String |
issueGet(String path) |
protected String |
issueGetWithAttachments(String path) |
protected String |
issuePost(String path,
String data) |
protected String |
issuePostWithFileAttachment(String path,
String data,
ArrayList<AttachmentAndType> attachmentData) |
protected String |
issuePut(String path,
String data) |
protected String |
issuePutWithFileAttachment(String path,
String data,
ArrayList<AttachmentAndType> attachmentData) |
protected String |
readFromConnection(HttpURLConnection conn) |
protected URL _host
protected com.google.gson.Gson gson
protected String username
protected String password
protected String authString
public BaseClient(String uri, String username, String password) throws MalformedURLException
MalformedURLExceptionpublic BaseClient(URL uri, String username, String password) throws MalformedURLException
MalformedURLExceptionpublic BaseClient(String uri, String encodedUsernamePassword) throws MalformedURLException
MalformedURLExceptionpublic BaseClient(URL uri, String encodedUsernamePassword) throws MalformedURLException
MalformedURLExceptionprotected com.google.gson.Gson getDecoder()
protected void init(URL uri, String user, String password) throws MalformedURLException
MalformedURLExceptionprotected void init(URL uri, String encodedUsernamePassword) throws MalformedURLException
MalformedURLExceptionprotected String readFromConnection(HttpURLConnection conn) throws IOException
IOExceptionprotected HttpURLConnection initializeConnection(URL url) throws IOException
IOExceptionprotected HttpURLConnection initializeConnectionForAttachments(URL url, String boundary) throws IOException
IOExceptionprotected String issuePost(String path, String data) throws IOException
IOExceptionprotected String issuePostWithFileAttachment(String path, String data, ArrayList<AttachmentAndType> attachmentData) throws IOException, NoSuchAlgorithmException
IOExceptionNoSuchAlgorithmExceptionprotected String issuePut(String path, String data) throws IOException
IOExceptionprotected String issuePutWithFileAttachment(String path, String data, ArrayList<AttachmentAndType> attachmentData) throws IOException, NoSuchAlgorithmException
IOExceptionNoSuchAlgorithmExceptionprotected String issueDelete(String path) throws IOException
IOExceptionprotected String issueGet(String path) throws IOException
IOExceptionprotected String issueGetWithAttachments(String path) throws IOException
IOExceptionCopyright © 2017. All rights reserved.