Interface Connection
- All Superinterfaces:
AutoCloseable,Closeable,LoggingCapable,ObfuscationCapable
- All Known Subinterfaces:
PooledConnection
- All Known Implementing Classes:
DefaultConnection
Represents a connection to the Worldline Acquiring platform server. Thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases any system resources associated with this object.<R> Rdelete(URI uri, List<RequestHeader> requestHeaders, ResponseHandler<R> responseHandler) Send a DELETE request to the Worldline Acquiring platform.<R> Rget(URI uri, List<RequestHeader> requestHeaders, ResponseHandler<R> responseHandler) Send a GET request to the Worldline Acquiring platform.<R> Rpost(URI uri, List<RequestHeader> requestHeaders, MultipartFormDataObject multipart, ResponseHandler<R> responseHandler) Send a multipart/form-data POST request to the Worldline Acquiring platform.<R> Rpost(URI uri, List<RequestHeader> requestHeaders, String body, ResponseHandler<R> responseHandler) Send a POST request to the Worldline Acquiring platform.<R> Rput(URI uri, List<RequestHeader> requestHeaders, MultipartFormDataObject multipart, ResponseHandler<R> responseHandler) Send a multipart/form-data PUT request to the Worldline Acquiring platform.<R> Rput(URI uri, List<RequestHeader> requestHeaders, String body, ResponseHandler<R> responseHandler) Send a PUT request to the Worldline Acquiring platform.Methods inherited from interface com.worldline.acquiring.sdk.java.logging.LoggingCapable
disableLogging, enableLoggingMethods inherited from interface com.worldline.acquiring.sdk.java.logging.ObfuscationCapable
setBodyObfuscator, setHeaderObfuscator
-
Method Details
-
close
Releases any system resources associated with this object. Should be called when this object is about to go out of scope.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
get
Send a GET request to the Worldline Acquiring platform.- Parameters:
uri- The URI to call, including any necessary query parameters.requestHeaders- An optional list of request headers.responseHandler- A handler for the response.- Throws:
CommunicationException- when an exception occurred communicating with the Worldline Acquiring platform
-
delete
Send a DELETE request to the Worldline Acquiring platform.- Parameters:
uri- The URI to call, including any necessary query parameters.requestHeaders- An optional list of request headers.responseHandler- A handler for the response.- Throws:
CommunicationException- when an exception occurred communicating with the Worldline Acquiring platform
-
post
<R> R post(URI uri, List<RequestHeader> requestHeaders, String body, ResponseHandler<R> responseHandler) Send a POST request to the Worldline Acquiring platform.- Parameters:
uri- The URI to call, including any necessary query parameters.requestHeaders- An optional list of request headers.body- The optional body to send.responseHandler- A handler for the response.- Throws:
CommunicationException- when an exception occurred communicating with the Worldline Acquiring platform
-
post
<R> R post(URI uri, List<RequestHeader> requestHeaders, MultipartFormDataObject multipart, ResponseHandler<R> responseHandler) Send a multipart/form-data POST request to the Worldline Acquiring platform.The content type of the request will be be part of the given request header list. If the connection creates its own content type, it should be
multipart.getContentType(). Otherwise, authentication failures will occur.- Parameters:
uri- The URI to call, including any necessary query parameters.requestHeaders- An optional list of request headers.multipart- The multipart/form-data request to send.responseHandler- A handler for the response.- Throws:
CommunicationException- when an exception occurred communicating with the Worldline Acquiring platform
-
put
<R> R put(URI uri, List<RequestHeader> requestHeaders, String body, ResponseHandler<R> responseHandler) Send a PUT request to the Worldline Acquiring platform.- Parameters:
uri- The URI to call, including any necessary query parameters.requestHeaders- An optional list of request headers.body- The optional body to send.responseHandler- A handler for the response.- Throws:
CommunicationException- when an exception occurred communicating with the Worldline Acquiring platform
-
put
<R> R put(URI uri, List<RequestHeader> requestHeaders, MultipartFormDataObject multipart, ResponseHandler<R> responseHandler) Send a multipart/form-data PUT request to the Worldline Acquiring platform.The content type of the request will be be part of the given request header list. If the connection creates its own content type, it should be
multipart.getContentType(). Otherwise, authentication failures will occur.- Parameters:
uri- The URI to call, including any necessary query parameters.requestHeaders- An optional list of request headers.multipart- The multipart/form-data request to send.responseHandler- A handler for the response.- Throws:
CommunicationException- when an exception occurred communicating with the Worldline Acquiring platform
-