com.ecwid.mailchimp
Class MailChimpClient

java.lang.Object
  extended by com.ecwid.mailchimp.MailChimpClient
All Implemented Interfaces:
Closeable

public class MailChimpClient
extends Object
implements Closeable

MailChimp API wrapper.

Author:
Vasily Karyaev

Constructor Summary
MailChimpClient()
          Constructs a MailChimpClient object accessing MailChimp API service point through the default connection manager (currently HttpClientConnectionManager).
MailChimpClient(MailChimpConnectionManager connection)
          Constructs a MailChimpClient object accessing MailChimp API service point through the specified connection manager.
 
Method Summary
 void close()
          Release resources associated with the connection to MailChimp API service point.
<R> R
execute(MailChimpMethod<R> method)
          Execute MailChimp API method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailChimpClient

public MailChimpClient()
Constructs a MailChimpClient object accessing MailChimp API service point through the default connection manager (currently HttpClientConnectionManager).


MailChimpClient

public MailChimpClient(MailChimpConnectionManager connection)
Constructs a MailChimpClient object accessing MailChimp API service point through the specified connection manager.

Use this constructor if the default connection manager (currently HttpClientConnectionManager) is not suitable. For instance, in GAE environment you should use JavaNetURLConnectionManager instead.

Parameters:
connection - connection manager to be used to access the service point
Method Detail

execute

public <R> R execute(MailChimpMethod<R> method)
          throws IOException,
                 MailChimpException
Execute MailChimp API method.

Parameters:
method - MailChimp API method to be executed
Returns:
execution result
Throws:
IOException
MailChimpException

close

public void close()
Release resources associated with the connection to MailChimp API service point.

Specified by:
close in interface Closeable


Copyright © 2012-2014 Ecwid, Inc. All Rights Reserved.