Interface MagdaConnection
public interface MagdaConnection
A document-level interface for exchanging request documents for response documents.
-
Method Summary
Modifier and TypeMethodDescriptionsendDocument(Document xml) Sends a request document and a receives an according response document.org.apache.commons.lang3.tuple.Pair<com.fasterxml.jackson.databind.JsonNode, Integer> sendRestRequest(MagdaRestRequest request, MagdaRegistrationInfo registrationInfo) Sends a REST request and receives an according Json response documentorg.apache.commons.lang3.tuple.Pair<com.fasterxml.jackson.databind.JsonNode, Integer> sendRestRequest(String path, String query, String method, String requestBody)
-
Method Details
-
sendDocument
Sends a request document and a receives an according response document.- Parameters:
xml- the request document.- Returns:
- the response document.
- Throws:
MagdaConnectionException- when the connection to the MAGDA server that handles the request fails.
-
sendRestRequest
org.apache.commons.lang3.tuple.Pair<com.fasterxml.jackson.databind.JsonNode,Integer> sendRestRequest(MagdaRestRequest request, MagdaRegistrationInfo registrationInfo) throws MagdaConnectionException, URISyntaxException Sends a REST request and receives an according Json response document- Parameters:
request- a DTO describing the REST request- Returns:
- the response document and status code.
- Throws:
MagdaConnectionExceptionURISyntaxException
-
sendRestRequest
org.apache.commons.lang3.tuple.Pair<com.fasterxml.jackson.databind.JsonNode,Integer> sendRestRequest(String path, String query, String method, String requestBody) throws MagdaConnectionException - Throws:
MagdaConnectionException
-