|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ecwid.mailchimp.connection.HttpClientConnectionManager
public class HttpClientConnectionManager
Implementation of MailChimpConnectionManager
which uses Apache HttpClient library to access MailChimp API service point.
Constructor Summary | |
---|---|
HttpClientConnectionManager()
Constructor. |
|
HttpClientConnectionManager(int connectTimeout,
int readTimeout)
Constructor. |
Method Summary | |
---|---|
void |
close()
|
int |
getConnectTimeout()
|
int |
getReadTimeout()
|
String |
post(String url,
String payload)
Make a POST request to MailChimp API service point. |
void |
setConnectTimeout(int connectTimeout)
|
void |
setReadTimeout(int readTimeout)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpClientConnectionManager()
HttpClientConnectionManager(int, int)
with both parameters set to 15000 (15 seconds).
public HttpClientConnectionManager(int connectTimeout, int readTimeout)
connectTimeout
- the timeout (in milliseconds) when trying to connect to the remote serverreadTimeout
- the timeout (in milliseconds) when when waiting for the response from the remote serverMethod Detail |
---|
public String post(String url, String payload) throws IOException
MailChimpConnectionManager
post
in interface MailChimpConnectionManager
url
- URL to post data topayload
- data to post
IOException
- if an I/O error occurred during the communication,
or if the service point response was unsuccessful (>= 300 status code)public void close()
close
in interface Closeable
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
public int getReadTimeout()
public void setReadTimeout(int readTimeout)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |