public interface Communicator extends Closeable, LoggingCapable
It contains all the logic to transform a request object to a HTTP request and a HTTP response to a response object.
Thread-safe.
| Modifier and Type | Method and Description |
|---|---|
void |
closeExpiredConnections() |
void |
closeIdleConnections(long idleTime,
TimeUnit timeUnit) |
<O> O |
delete(String relativePath,
List<RequestHeader> requestHeaders,
ParamRequest requestParameters,
Class<O> responseType,
CallContext context)
Corresponds to the HTTP DELETE method.
|
<O> O |
get(String relativePath,
List<RequestHeader> requestHeaders,
ParamRequest requestParameters,
Class<O> responseType,
CallContext context)
Corresponds to the HTTP GET method.
|
Authenticator |
getAuthenticator() |
Connection |
getConnection() |
Marshaller |
getMarshaller() |
MetaDataProvider |
getMetaDataProvider() |
<O> O |
post(String relativePath,
List<RequestHeader> requestHeaders,
ParamRequest requestParameters,
Object requestBody,
Class<O> responseType,
CallContext context)
Corresponds to the HTTP POST method.
|
<O> O |
put(String relativePath,
List<RequestHeader> requestHeaders,
ParamRequest requestParameters,
Object requestBody,
Class<O> responseType,
CallContext context)
Corresponds to the HTTP PUT method.
|
disableLogging, enableLogging<O> O get(String relativePath, List<RequestHeader> requestHeaders, ParamRequest requestParameters, Class<O> responseType, CallContext context)
relativePath - The path to call, relative to the base URI.requestHeaders - An optional list of request headers.requestParameters - An optional set of request parameters.responseType - The type of response to return.context - The optional call context to use.CommunicationException - when an exception occurred communicating with the Online Payments platformResponseException - when an error response was received from the Online Payments platformApiException - when an error response was received from the Online Payments platform which contained a list of errors<O> O delete(String relativePath, List<RequestHeader> requestHeaders, ParamRequest requestParameters, Class<O> responseType, CallContext context)
relativePath - The path to call, relative to the base URI.requestHeaders - An optional list of request headers.requestParameters - An optional set of request parameters.responseType - The type of response to return.context - The optional call context to use.CommunicationException - when an exception occurred communicating with the Online Payments platformResponseException - when an error response was received from the Online Payments platformApiException - when an error response was received from the Online Payments platform which contained a list of errors<O> O post(String relativePath, List<RequestHeader> requestHeaders, ParamRequest requestParameters, Object requestBody, Class<O> responseType, CallContext context)
relativePath - The path to call, relative to the base URI.requestHeaders - An optional list of request headers.requestParameters - An optional set of request parameters.requestBody - The optional request body to send.responseType - The type of response to return.context - The optional call context to use.CommunicationException - when an exception occurred communicating with the Online Payments platformResponseException - when an error response was received from the Online Payments platformApiException - when an error response was received from the Online Payments platform which contained a list of errors<O> O put(String relativePath, List<RequestHeader> requestHeaders, ParamRequest requestParameters, Object requestBody, Class<O> responseType, CallContext context)
relativePath - The path to call, relative to the base URI.requestHeaders - An optional list of request headers.requestParameters - An optional set of request parameters.requestBody - The optional request body to send.responseType - The type of response to return.context - The optional call context to use.CommunicationException - when an exception occurred communicating with the Online Payments platformResponseException - when an error response was received from the Online Payments platformApiException - when an error response was received from the Online Payments platform which contained a list of errorsConnection getConnection()
Authenticator getAuthenticator()
MetaDataProvider getMetaDataProvider()
Marshaller getMarshaller()
void closeIdleConnections(long idleTime,
TimeUnit timeUnit)
void closeExpiredConnections()
Copyright © 2023 Worldline Online Payments Direct. All rights reserved.