public class TectonClient
extends java.lang.Object
Note: Each method throws TectonServiceException when it receives an error response from the API and a TectonClientException when an error or exception is encountered by the client. The message included in the exception will provide more information about the error.
Constructor and Description |
---|
TectonClient(java.lang.String url,
java.lang.String apiKey)
Constructor for a simple Tecton Client
|
TectonClient(java.lang.String url,
java.lang.String apiKey,
TectonClientOptions tectonClientOptions)
Constructor for a Tecton Client with custom configurations
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases all resources (connection pool, threads) held by the Tecton Client.
|
GetFeaturesResponse |
getFeatures(GetFeaturesRequest getFeaturesRequest)
Makes a request to the /get-features endpoint and returns the response in the form of a
GetFeaturesResponse object |
GetFeaturesBatchResponse |
getFeaturesBatch(GetFeaturesBatchRequest batchRequest)
Makes a batch request to retrieve a list of feature vector and metadata for a given workspace
and feature service
|
GetFeatureServiceMetadataResponse |
getFeatureServiceMetadata(GetFeatureServiceMetadataRequest getFeatureServiceMetadataRequest)
Makes a request to the /metadata endpoint and returns the response in the form of a
GetFeatureServiceMetadataResponse object |
boolean |
isClosed()
Returns true if the Tecton Client has been closed, false otherwise
|
public TectonClient(java.lang.String url, java.lang.String apiKey)
url
- The Tecton Base UrlapiKey
- API Key for authenticating with the FeatureService API. See Authenticating
with an API key for more informationpublic TectonClient(java.lang.String url, java.lang.String apiKey, TectonClientOptions tectonClientOptions)
url
- The Tecton Base UrlapiKey
- API Key for authenticating with the FeatureService API. See Authenticating
with an API key for more informationtectonClientOptions
- A TectonClientOptions
object with custom comfigurationspublic GetFeaturesResponse getFeatures(GetFeaturesRequest getFeaturesRequest) throws TectonClientException, TectonServiceException
GetFeaturesResponse
objectgetFeaturesRequest
- A GetFeaturesRequest
object with the request parametersGetFeaturesResponse
object representing the response from the HTTP APITectonClientException
- when the client is already closed or encounters an error while
building the request or parsing the responseTectonServiceException
- when the client receives an error response from the HTTP APIpublic GetFeatureServiceMetadataResponse getFeatureServiceMetadata(GetFeatureServiceMetadataRequest getFeatureServiceMetadataRequest) throws TectonClientException, TectonServiceException
GetFeatureServiceMetadataResponse
objectgetFeatureServiceMetadataRequest
- A GetFeatureServiceMetadataRequest
object with
the request parametersGetFeatureServiceMetadataResponse
object representing the response from the
HTTP APITectonClientException
- when the client is already closed or encounters an error while
building the request or parsing the responseTectonServiceException
- when the client receives an error response from the HTTP APIpublic GetFeaturesBatchResponse getFeaturesBatch(GetFeaturesBatchRequest batchRequest) throws TectonClientException, TectonServiceException
batchRequest
- The GetFeaturesRequest
object with the request parametersGetFeaturesBatchResponse
object wih the list of feature vector and metadata (if
requested)TectonClientException
- when the client is already closed or the client encounters an
error while building the request or parsing the responseTectonServiceException
- when the client receives an error response from the HTTP APIpublic void close()
public boolean isClosed()