Class RESTClientConnector

All Implemented Interfaces:
RESTClientCalls, AuditLoggingComponent, SecureConnectorExtension, VirtualConnectorExtension
Direct Known Subclasses:
JDKRESTClientConnector, SpringRESTClientConnector

public abstract class RESTClientConnector extends ConnectorBase implements RESTClientCalls, SecureConnectorExtension, AuditLoggingComponent
RESTClientConnector provides the base class for REST Client connectors.
  • Field Details

    • REQUEST_TIMEOUT_PROPERTY

      public static final String REQUEST_TIMEOUT_PROPERTY
      Name of the connection configuration property that sets how long a REST call may wait for its response, in seconds. Zero means no limit.
      See Also:
    • REQUEST_TIMEOUT_SYSTEM_PROPERTY

      public static final String REQUEST_TIMEOUT_SYSTEM_PROPERTY
      Name of the JVM system property that sets the same limit for every REST client connector that does not set it in its connection.
      See Also:
    • DEFAULT_REQUEST_TIMEOUT_SECONDS

      public static final long DEFAULT_REQUEST_TIMEOUT_SECONDS
      How long a REST call waits for its response unless configured otherwise: long enough for the slowest legitimate calls, such as loading a large archive, but finite. Without a limit a call to a server that never answers - one that has deadlocked, for example - waits for ever, and so does whatever made it.
      See Also:
  • Constructor Details

    • RESTClientConnector

      public RESTClientConnector()
      Default constructor
  • Method Details

    • getRequestTimeoutSeconds

      public long getRequestTimeoutSeconds()
      Return how long a REST call may wait for its response, in seconds: the requestTimeoutSeconds configuration property of the connection if it is set, otherwise the egeria.rest.client.request.timeout.seconds system property, otherwise DEFAULT_REQUEST_TIMEOUT_SECONDS. Zero (or a negative or unreadable value) means no limit.
      Returns:
      number of seconds, or 0 for no limit
    • getConnectorComponentDescription

      public ComponentDescription getConnectorComponentDescription()
      Return the component description that is used by this connector in the audit log.
      Specified by:
      getConnectorComponentDescription in interface AuditLoggingComponent
      Returns:
      id, name, description, wiki page URL.
    • setAuditLog

      public void setAuditLog(AuditLog auditLog)
      Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.
      Specified by:
      setAuditLog in interface AuditLoggingComponent
      Parameters:
      auditLog - audit log object