Class FullContact

java.lang.Object
com.fullcontact.apilib.enrich.FullContact
All Implemented Interfaces:
java.lang.AutoCloseable

public class FullContact
extends java.lang.Object
implements java.lang.AutoCloseable
The FullContact class represents FullContact client. It supports V3 Person Enrich, Company Enrich, Company Search and Resolve. It uses in-built java11 HttpClient for sending all requests. All requests are converted to JSON and sent via POST method asynchronously
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  FullContact.FullContactBuilder
    Builder class for building FullContact client.
  • Constructor Summary

    Constructors 
    Constructor Description
    FullContact​(com.fullcontact.apilib.auth.CredentialsProvider credentialsProvider, java.util.Map<java.lang.String,​java.lang.String> headers, long connectTimeoutMillis, com.fullcontact.apilib.retry.RetryHandler retryHandler)
    FullContact client constructor used to initialise the client
  • Method Summary

    Modifier and Type Method Description
    static com.fullcontact.apilib.models.Request.CompanyRequest.CompanyRequestBuilder buildCompanyRequest()  
    static com.fullcontact.apilib.models.Request.PersonRequest.PersonRequestBuilder buildPersonRequest()  
    static com.fullcontact.apilib.models.Request.ResolveRequest.ResolveRequestBuilder buildResolveRequest()  
    void close()
    This method is used to call shutdown on the ScheduledThreadPoolExecutor and close the FullContact client.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.CompanyResponse> enrich​(com.fullcontact.apilib.models.Request.CompanyRequest companyRequest)
    Method for Company Enrich without any custom RetryHandler, It converts the request to json, send the Asynchronous request using HTTP POST method.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.CompanyResponse> enrich​(com.fullcontact.apilib.models.Request.CompanyRequest companyRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler)
    Method for Company Enrich.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.PersonResponse> enrich​(com.fullcontact.apilib.models.Request.PersonRequest personRequest)
    Method for Person Enrich without any custom RetryHandler, It converts the request to json, send the Asynchronous request using HTTP POST method.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.PersonResponse> enrich​(com.fullcontact.apilib.models.Request.PersonRequest personRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler)
    Method for Person Enrich.
    void finalize()
    This method will be called by GC to close the client.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityDelete​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest)
    Method for Deleting mapped Record.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityDelete​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler)
    Method for Deleting mapped Record.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityMap​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest)
    Method for Resolve Identity Map.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityMap​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler)
    Method for Resolve Identity Map.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityResolve​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest)
    Method for Identity Resolve.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityResolve​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler)
    Method for Resolve Identity Map.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.CompanySearchResponseList> search​(com.fullcontact.apilib.models.Request.CompanyRequest companyRequest)
    Method for Company Search without any custom RetryHandler, It converts the request to json, send the Asynchronous request using HTTP POST method.
    java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.CompanySearchResponseList> search​(com.fullcontact.apilib.models.Request.CompanyRequest companyRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler)
    Method for Company Search.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FullContact

      public FullContact​(com.fullcontact.apilib.auth.CredentialsProvider credentialsProvider, java.util.Map<java.lang.String,​java.lang.String> headers, long connectTimeoutMillis, com.fullcontact.apilib.retry.RetryHandler retryHandler)
      FullContact client constructor used to initialise the client
      Parameters:
      credentialsProvider - for auth
      headers - custom client headers
      connectTimeoutMillis - connection timout for all requests
      retryHandler - RetryHandler specified for client
  • Method Details

    • buildPersonRequest

      public static com.fullcontact.apilib.models.Request.PersonRequest.PersonRequestBuilder buildPersonRequest()
      Returns:
      Person Request Builder for Person Enrich request
    • buildCompanyRequest

      public static com.fullcontact.apilib.models.Request.CompanyRequest.CompanyRequestBuilder buildCompanyRequest()
      Returns:
      Company Request Builder for Company Enrich and Company Search requests
    • buildResolveRequest

      public static com.fullcontact.apilib.models.Request.ResolveRequest.ResolveRequestBuilder buildResolveRequest()
      Returns:
      Resolve Request Builder for Resolve
    • enrich

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.PersonResponse> enrich​(com.fullcontact.apilib.models.Request.PersonRequest personRequest) throws com.fullcontact.apilib.FullContactException
      Method for Person Enrich without any custom RetryHandler, It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified at FullContact Client level.
      Parameters:
      personRequest - original request sent by client
      Returns:
      completed CompletableFuture with PersonResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown
      See Also:
      CompletableFuture
    • enrich

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.PersonResponse> enrich​(com.fullcontact.apilib.models.Request.PersonRequest personRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler) throws com.fullcontact.apilib.FullContactException
      Method for Person Enrich. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retry condition.
      Parameters:
      personRequest - original request sent by client
      Returns:
      completed CompletableFuture with PersonResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown
      See Also:
      CompletableFuture
    • enrich

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.CompanyResponse> enrich​(com.fullcontact.apilib.models.Request.CompanyRequest companyRequest) throws com.fullcontact.apilib.FullContactException
      Method for Company Enrich without any custom RetryHandler, It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified at FullContact Client level.
      Parameters:
      companyRequest - original request sent by client
      Returns:
      completed CompletableFuture with CompanyResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown or request fails validation
      See Also:
      CompletableFuture
    • enrich

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.CompanyResponse> enrich​(com.fullcontact.apilib.models.Request.CompanyRequest companyRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler) throws com.fullcontact.apilib.FullContactException
      Method for Company Enrich. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retry condition.
      Parameters:
      companyRequest - original request sent by client
      Returns:
      completed CompletableFuture with CompanyResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown or request fails validation
      See Also:
      CompletableFuture
    • search

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.CompanySearchResponseList> search​(com.fullcontact.apilib.models.Request.CompanyRequest companyRequest) throws com.fullcontact.apilib.FullContactException
      Method for Company Search without any custom RetryHandler, It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified at FullContact Client level.
      Parameters:
      companyRequest - original request sent by client
      Returns:
      completed CompletableFuture with CompanySearchResponseList
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown or request fails validation
      See Also:
      CompletableFuture
    • search

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.CompanySearchResponseList> search​(com.fullcontact.apilib.models.Request.CompanyRequest companyRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler) throws com.fullcontact.apilib.FullContactException
      Method for Company Search. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retry condition.
      Parameters:
      companyRequest - original request sent by client
      Returns:
      completed CompletableFuture with CompanySearchResponseList
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown or request fails validation
      See Also:
      CompletableFuture
    • identityMap

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityMap​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest) throws com.fullcontact.apilib.FullContactException
      Method for Resolve Identity Map. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified at FullContact Client level.
      Parameters:
      resolveRequest - original request sent by client
      Returns:
      completed CompletableFuture with ResolveResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown or request fails validation
      See Also:
      CompletableFuture
    • identityMap

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityMap​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler) throws com.fullcontact.apilib.FullContactException
      Method for Resolve Identity Map. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified.
      Parameters:
      resolveRequest - original request sent by client
      Returns:
      completed CompletableFuture with ResolveResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown or request fails validation
      See Also:
      CompletableFuture
    • identityResolve

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityResolve​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest) throws com.fullcontact.apilib.FullContactException
      Method for Identity Resolve. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified at FullContact Client level.
      Parameters:
      resolveRequest - original request sent by client
      Returns:
      completed CompletableFuture with ResolveResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown
      See Also:
      CompletableFuture
    • identityResolve

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityResolve​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler) throws com.fullcontact.apilib.FullContactException
      Method for Resolve Identity Map. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified.
      Parameters:
      resolveRequest - original request sent by client
      Returns:
      completed CompletableFuture with ResolveResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown
      See Also:
      CompletableFuture
    • identityDelete

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityDelete​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest) throws com.fullcontact.apilib.FullContactException
      Method for Deleting mapped Record. It calls 'identity.delete' endpoint in Resolve. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified at FullContact Client level.
      Parameters:
      resolveRequest - original request sent by client
      Returns:
      completed CompletableFuture with ResolveResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown
      See Also:
      CompletableFuture
    • identityDelete

      public java.util.concurrent.CompletableFuture<com.fullcontact.apilib.models.Response.ResolveResponse> identityDelete​(com.fullcontact.apilib.models.Request.ResolveRequest resolveRequest, com.fullcontact.apilib.retry.RetryHandler retryHandler) throws com.fullcontact.apilib.FullContactException
      Method for Deleting mapped Record. It calls 'identity.delete' endpoint in Resolve. It converts the request to json, send the Asynchronous request using HTTP POST method. It also handles retries based on retryHandler specified.
      Parameters:
      resolveRequest - original request sent by client
      Returns:
      completed CompletableFuture with ResolveResponse
      Throws:
      com.fullcontact.apilib.FullContactException - exception if client is shutdown
      See Also:
      CompletableFuture
    • close

      public void close()
      This method is used to call shutdown on the ScheduledThreadPoolExecutor and close the FullContact client.
      Specified by:
      close in interface java.lang.AutoCloseable
    • finalize

      public void finalize()
      This method will be called by GC to close the client.