|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.paypal.base.HttpConnection
public abstract class HttpConnection
Base HttpConnection class
| Field Summary | |
|---|---|
protected HttpConfiguration |
config
Subclasses must set the http configuration in the createAndconfigureHttpConnection() method. |
protected HttpURLConnection |
connection
Subclasses must create and set the connection in the createAndconfigureHttpConnection() method. |
| Constructor Summary | |
|---|---|
HttpConnection()
|
|
| Method Summary | |
|---|---|
abstract void |
createAndconfigureHttpConnection(HttpConfiguration clientConfiguration)
create and configure HttpsURLConnection object |
String |
execute(String url,
String payload,
Map<String,String> headers)
Executes HTTP request |
protected String |
read(BufferedReader reader)
|
protected void |
setHttpHeaders(Map<String,String> headers)
Set headers for HttpsURLConnection object |
abstract void |
setupClientSSL(String certPath,
String certKey)
Set ssl parameters for client authentication |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HttpConfiguration config
protected HttpURLConnection connection
| Constructor Detail |
|---|
public HttpConnection()
| Method Detail |
|---|
public String execute(String url,
String payload,
Map<String,String> headers)
throws InvalidResponseDataException,
IOException,
InterruptedException,
HttpErrorException,
ClientActionRequiredException
url - payload - headers -
InvalidResponseDataException
IOException
InterruptedException
HttpErrorException
ClientActionRequiredException
public abstract void setupClientSSL(String certPath,
String certKey)
throws SSLConfigurationException
certPath - certKey -
SSLConfigurationException
public abstract void createAndconfigureHttpConnection(HttpConfiguration clientConfiguration)
throws IOException
clientConfiguration -
MalformedURLException
IOException
protected String read(BufferedReader reader)
throws IOException
IOExceptionprotected void setHttpHeaders(Map<String,String> headers)
headers -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||