public interface TransportProvider
Modifier and Type | Method and Description |
---|---|
void |
close()
Release all resources acquired by this provider
|
byte[] |
delete(java.lang.String path,
java.lang.String acceptType)
Send a DELETE request to the server
|
byte[] |
get(java.lang.String path,
java.lang.String acceptType)
Send a GET request to the server
|
boolean |
head(java.lang.String path)
Send a HEAD request to the server
|
byte[] |
post(java.lang.String path,
byte[] content,
java.lang.String contentType,
java.lang.String acceptType)
Send a POST request to the server
|
byte[] |
put(java.lang.String path,
byte[] content,
java.lang.String contentType)
Send a PUT request to the server
|
void |
setDebugLevel(int debugLevel)
Set the extent to which debug messages are produced
|
void |
setProxyCredentials(Credentials proxyCredentials)
Set the credentials for a proxy requiring authentication
|
void |
setProxyLocation(java.net.URI proxyLocation)
Route requests through a proxy server.
|
void |
setServiceCredentials(Credentials serviceCredentials)
Set the service credentials
|
void |
setServiceLocation(java.net.URI serviceLocation)
Set the service endpoint location
|
void |
setUserAgent(java.lang.String userAgent)
Set the content of the User-Agent header to be passed to the server.
|
void setServiceLocation(java.net.URI serviceLocation) throws AnaplanAPITransportException
serviceLocation
- the service endpoint locationAnaplanAPITransportException
void setServiceCredentials(Credentials serviceCredentials) throws AnaplanAPITransportException
serviceCredentials
- the service credentialsAnaplanAPITransportException
void setProxyLocation(java.net.URI proxyLocation) throws AnaplanAPITransportException
proxyLocation
- the location of the proxy serverAnaplanAPITransportException
void setProxyCredentials(Credentials proxyCredentials) throws AnaplanAPITransportException
proxyCredentials
- the proxy credentialsAnaplanAPITransportException
void setUserAgent(java.lang.String userAgent) throws AnaplanAPITransportException
userAgent
- The User-Agent header valueAnaplanAPITransportException
void setDebugLevel(int debugLevel) throws AnaplanAPITransportException
debugLevel
- the debug level; 0 (the default) means no outputAnaplanAPITransportException
byte[] get(java.lang.String path, java.lang.String acceptType) throws AnaplanAPITransportException
path
- The path relative to the service endpoint locationacceptType
- The Accept header to indicate the format of content
expected in the reponse bodyAnaplanAPITransportException
- a communication or protocol error occuredboolean head(java.lang.String path) throws AnaplanAPITransportException
path
- The path relative to the service endpoint locationAnaplanAPITransportException
- a communication or protocol error occuredbyte[] post(java.lang.String path, byte[] content, java.lang.String contentType, java.lang.String acceptType) throws AnaplanAPITransportException
path
- The path relative to the service endpoint locationcontent
- The content to send in the request bodycontentType
- The value for the Content-Type header to indicate
the format of the content in the request bodyacceptType
- The Accept header to indicate the format of content
expected in the reponse bodyAnaplanAPITransportException
- a communication or protocol error occuredbyte[] put(java.lang.String path, byte[] content, java.lang.String contentType) throws AnaplanAPITransportException
path
- The path relative to the service endpoint locationcontent
- The content to send in the request bodycontentType
- The value for the Content-Type header to indicate
the format of the content in the request bodyAnaplanAPITransportException
- a communication or protocol error occuredbyte[] delete(java.lang.String path, java.lang.String acceptType) throws AnaplanAPITransportException
path
- The path relative to the service endpoint locationacceptType
- The Accept header to indicate the format of content
expected in the reponse bodyAnaplanAPITransportException
- a communication or protocol error occuredvoid close()