Package com.atlan.net

Interface AtlanResponseGetter

All Known Implementing Classes:
LiveAtlanResponseGetter

public interface AtlanResponseGetter
Interface through which API interaction wrapping is handled.
  • 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 request
      method - type of request
      url - endpoint for the request
      body - payload to send as the body of the request
      options - any one-off options for this specific request
      requestId - 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 Atlan
      method - to use for the request
      url - of the endpoint (with all path and query parameters) for the request
      body - payload for the request, if any
      clazz - the expected response object type from the request
      options - any alternative options to use for the request, or null to use default options
      requestId - 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 Atlan
      method - to use for the request
      url - of the endpoint (with all path and query parameters) for the request
      body - payload for the request, if any
      options - any alternative options to use for the request, or null to use default options
      requestId - 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 Atlan
      method - to use for the request
      url - of the endpoint (with all path and query parameters) for the request
      body - payload for the request, if any
      clazz - the expected response object type from the request
      options - any alternative options to use for the request, or null to use default options
      requestId - 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 Atlan
      method - to use for the rqeuest
      url - of the endpoint (with all path and query parameters) for the request
      upload - file to be uploaded
      filename - name of the file the InputStream is reading
      clazz - the expected response object type from the request
      options - any alternative options to use for the request, or null to use default options
      requestId - 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 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 Atlan
      method - to use for the request
      url - of the endpoint (with all path and query parameters) for the request
      upload - file to be uploaded
      filename - name of the file the InputStream is reading
      clazz - the expected response object type from the request
      extras - (optional) additional form-encoded parameters to send
      options - any alternative options to use for the request, or null to use default options
      requestId - 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 AtlanException
      Makes 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 Atlan
      method - to use for the request
      url - of the endpoint (with all path and query parameters) for the request
      map - of key-value pairs to be form-urlencoded
      clazz - the expected response object type from the request
      options - any alternative options to use for the request, or null to use default options
      requestId - 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