Package com.atlan.net
Interface AtlanResponseGetter
- All Known Implementing Classes:
LiveAtlanResponseGetter
public interface AtlanResponseGetter
Interface through which API interaction wrapping is handled.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends AtlanResponseInterface>
Trequest
(AtlanClient client, ApiResource.RequestMethod method, String url, InputStream upload, String filename, Class<T> clazz, RequestOptions options, String requestId) Send a request to an Atlan API, to upload a file.<T extends AtlanResponseInterface>
Trequest
(AtlanClient client, ApiResource.RequestMethod method, String url, InputStream upload, String filename, Class<T> clazz, Map<String, String> extras, RequestOptions options, String requestId) Send a request to an Atlan API, to upload a file.void
request
(AtlanClient client, ApiResource.RequestMethod method, String url, String body, RequestOptions options, String requestId) Send a request to Atlan API, when no response is expected.<T extends AtlanResponseInterface>
Trequest
(AtlanClient client, ApiResource.RequestMethod method, String url, String body, Class<T> clazz, RequestOptions options, String requestId) Send a request to an Atlan API, when a response is expected.<T extends AtlanResponseInterface>
Trequest
(AtlanClient client, ApiResource.RequestMethod method, String url, Map<String, Object> map, Class<T> clazz, RequestOptions options, String requestId) Makes a request to Atlan's API, to form-urlencode parameters.requestPlainText
(AtlanClient client, ApiResource.RequestMethod method, String url, String body, RequestOptions options, String requestId) Send a request to an Atlan API, when a response is expected.<T extends AtlanEventStreamResponseInterface>
TrequestStream
(AtlanClient client, ApiResource.RequestMethod method, String url, String body, Class<T> clazz, RequestOptions options, String requestId) Send a request to an Atlan API, when an event-stream response is expected.
-
Method Details
-
request
void request(AtlanClient client, ApiResource.RequestMethod method, String url, String body, RequestOptions options, String requestId) throws AtlanException Send a request to Atlan API, when no response is expected.- Parameters:
client
- connectivity details for the tenant to which to send the requestmethod
- type of requesturl
- endpoint for the requestbody
- payload to send as the body of the requestoptions
- any one-off options for this specific requestrequestId
- unique identifier for this specific request- Throws:
AtlanException
- on any API interaction problem, indicating the type of problem encountered
-
request
<T extends AtlanResponseInterface> T request(AtlanClient client, ApiResource.RequestMethod method, String url, String body, Class<T> clazz, RequestOptions options, String requestId) throws AtlanException Send a request to an Atlan API, when a response is expected.- Type Parameters:
T
- the type of the response of the request- Parameters:
client
- connectivity to Atlanmethod
- to use for the requesturl
- of the endpoint (with all path and query parameters) for the requestbody
- payload for the request, if anyclazz
- the expected response object type from the requestoptions
- any alternative options to use for the request, or null to use default optionsrequestId
- unique identifier (GUID) of a single request to Atlan- Returns:
- the response of the request
- Throws:
AtlanException
- on any API interaction problem, indicating the type of problem encountered
-
requestPlainText
String requestPlainText(AtlanClient client, ApiResource.RequestMethod method, String url, String body, RequestOptions options, String requestId) throws AtlanException Send a request to an Atlan API, when a response is expected. This handles the response as plain text, rather than JSON.- Parameters:
client
- connectivity to Atlanmethod
- to use for the requesturl
- of the endpoint (with all path and query parameters) for the requestbody
- payload for the request, if anyoptions
- any alternative options to use for the request, or null to use default optionsrequestId
- unique identifier (GUID) of a single request to Atlan- Returns:
- the response of the request
- Throws:
AtlanException
- on any API interaction problem, indicating the type of problem encountered
-
requestStream
<T extends AtlanEventStreamResponseInterface> T requestStream(AtlanClient client, ApiResource.RequestMethod method, String url, String body, Class<T> clazz, RequestOptions options, String requestId) throws AtlanException Send a request to an Atlan API, when an event-stream response is expected.- Type Parameters:
T
- the type of the response of the request- Parameters:
client
- connectivity to Atlanmethod
- to use for the requesturl
- of the endpoint (with all path and query parameters) for the requestbody
- payload for the request, if anyclazz
- the expected response object type from the requestoptions
- any alternative options to use for the request, or null to use default optionsrequestId
- unique identifier (GUID) of a single request to Atlan- Returns:
- the response of the request
- Throws:
AtlanException
- on any API interaction problem, indicating the type of problem encountered
-
request
default <T extends AtlanResponseInterface> T request(AtlanClient client, ApiResource.RequestMethod method, String url, InputStream upload, String filename, Class<T> clazz, RequestOptions options, String requestId) throws AtlanException Send a request to an Atlan API, to upload a file.- Type Parameters:
T
- the type of the response of the request- Parameters:
client
- connectivity to Atlanmethod
- to use for the rqeuesturl
- of the endpoint (with all path and query parameters) for the requestupload
- file to be uploadedfilename
- name of the file the InputStream is readingclazz
- the expected response object type from the requestoptions
- any alternative options to use for the request, or null to use default optionsrequestId
- unique identifier (GUID) of a single request to Atlan- Returns:
- the response of the request
- Throws:
AtlanException
- on any API interaction problems, indicating the type of problem encountered
-
request
<T extends AtlanResponseInterface> T request(AtlanClient client, ApiResource.RequestMethod method, String url, InputStream upload, String filename, Class<T> clazz, Map<String, String> extras, RequestOptions options, String requestId) throws AtlanExceptionSend a request to an Atlan API, to upload a file.- Type Parameters:
T
- the type of the response of the request- Parameters:
client
- connectivity to Atlanmethod
- to use for the requesturl
- of the endpoint (with all path and query parameters) for the requestupload
- file to be uploadedfilename
- name of the file the InputStream is readingclazz
- the expected response object type from the requestextras
- (optional) additional form-encoded parameters to sendoptions
- any alternative options to use for the request, or null to use default optionsrequestId
- unique identifier (GUID) of a single request to Atlan- Returns:
- the response of the request
- Throws:
AtlanException
- on any API interaction problems, indicating the type of problem encountered
-
request
<T extends AtlanResponseInterface> T request(AtlanClient client, ApiResource.RequestMethod method, String url, Map<String, Object> map, Class<T> clazz, RequestOptions options, String requestId) throws AtlanExceptionMakes a request to Atlan's API, to form-urlencode parameters.- Type Parameters:
T
- the type of the response of the request- Parameters:
client
- connectivity to Atlanmethod
- to use for the requesturl
- of the endpoint (with all path and query parameters) for the requestmap
- of key-value pairs to be form-urlencodedclazz
- the expected response object type from the requestoptions
- any alternative options to use for the request, or null to use default optionsrequestId
- unique identifier (GUID) of a single request to Atlan- Returns:
- the response of the request
- Throws:
AtlanException
- on any API interaction problems, indicating the type of problem encountered
-