public class Session
extends java.lang.Object
Constructor and Description |
---|
Session(java.net.URL url,
java.lang.String login,
java.lang.String password,
boolean trustSelfSigned,
int maxConnections) |
Session(java.net.URL url,
java.lang.String oAuthConsumerKey,
java.lang.String oAuthConsumerSecret,
java.lang.String oAuthToken,
java.lang.String oAuthTokenSecret,
boolean trustSelfSigned,
int maxConnections) |
Modifier and Type | Method and Description |
---|---|
void |
asynchronousExecute(org.apache.http.client.methods.HttpGet httpGet,
Handler<java.lang.Void> handler) |
void |
asynchronousExecute(org.apache.http.client.methods.HttpPost httpPost,
java.util.Map<java.lang.String,java.lang.Object> parameters,
Handler<java.lang.Void> handler) |
static org.apache.http.impl.client.HttpClientBuilder |
createHttpClientBuilder(boolean trustSelfSigned,
int maxConnections,
int connectionTimeout,
int socketTimeout) |
org.apache.http.HttpResponse |
execute(org.apache.http.client.methods.HttpPost httpPost,
java.util.Map<java.lang.String,java.lang.Object> parameters) |
<T> T |
execute(org.apache.http.client.methods.HttpPost httpPost,
java.util.Map<java.lang.String,java.lang.Object> parameters,
Handler<? extends T> handler) |
org.apache.http.HttpResponse |
execute(org.apache.http.HttpRequest httpRequest) |
<T> T |
execute(org.apache.http.HttpRequest httpRequest,
Handler<? extends T> handler) |
<T> T |
execute(org.apache.http.HttpRequest httpRequest,
Handler<? extends T> handler,
org.apache.http.protocol.HttpContext httpContext) |
org.apache.http.HttpResponse |
execute(org.apache.http.HttpRequest httpRequest,
org.apache.http.protocol.HttpContext httpContext) |
static org.apache.http.client.HttpClient |
getAnonymousHttpClient() |
int |
getDownloadRate() |
java.util.concurrent.ExecutorService |
getExecutorService() |
org.apache.http.client.HttpClient |
getHttpClient() |
static org.apache.http.conn.routing.HttpRoutePlanner |
getHttpRoutePlanner() |
int |
getUploadRate() |
void |
incrementDownloadedBytes(int bytes) |
void |
incrementUploadedBytes(int bytes) |
void |
setToken(java.lang.String token) |
void |
startTrackTransferRate() |
void |
stopTrackTransferRate() |
public Session(java.net.URL url, java.lang.String login, java.lang.String password, boolean trustSelfSigned, int maxConnections)
public Session(java.net.URL url, java.lang.String oAuthConsumerKey, java.lang.String oAuthConsumerSecret, java.lang.String oAuthToken, java.lang.String oAuthTokenSecret, boolean trustSelfSigned, int maxConnections)
public static org.apache.http.impl.client.HttpClientBuilder createHttpClientBuilder(boolean trustSelfSigned, int maxConnections, int connectionTimeout, int socketTimeout)
public static org.apache.http.client.HttpClient getAnonymousHttpClient()
public static org.apache.http.conn.routing.HttpRoutePlanner getHttpRoutePlanner()
public void asynchronousExecute(org.apache.http.client.methods.HttpGet httpGet, Handler<java.lang.Void> handler) throws java.lang.Exception
java.lang.Exception
public void asynchronousExecute(org.apache.http.client.methods.HttpPost httpPost, java.util.Map<java.lang.String,java.lang.Object> parameters, Handler<java.lang.Void> handler) throws java.lang.Exception
java.lang.Exception
public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpPost httpPost, java.util.Map<java.lang.String,java.lang.Object> parameters) throws java.lang.Exception
java.lang.Exception
public <T> T execute(org.apache.http.client.methods.HttpPost httpPost, java.util.Map<java.lang.String,java.lang.Object> parameters, Handler<? extends T> handler) throws java.lang.Exception
java.lang.Exception
public org.apache.http.HttpResponse execute(org.apache.http.HttpRequest httpRequest) throws java.lang.Exception
java.lang.Exception
public <T> T execute(org.apache.http.HttpRequest httpRequest, Handler<? extends T> handler) throws java.lang.Exception
java.lang.Exception
public <T> T execute(org.apache.http.HttpRequest httpRequest, Handler<? extends T> handler, org.apache.http.protocol.HttpContext httpContext) throws java.lang.Exception
java.lang.Exception
public org.apache.http.HttpResponse execute(org.apache.http.HttpRequest httpRequest, org.apache.http.protocol.HttpContext httpContext) throws java.lang.Exception
java.lang.Exception
public int getDownloadRate()
public java.util.concurrent.ExecutorService getExecutorService()
public org.apache.http.client.HttpClient getHttpClient()
public int getUploadRate()
public void incrementDownloadedBytes(int bytes)
public void incrementUploadedBytes(int bytes)
public void setToken(java.lang.String token)
public void startTrackTransferRate()
public void stopTrackTransferRate()