Class RESTClientConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.adapters.connectors.restclients.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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longHow 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.static final StringName of the connection configuration property that sets how long a REST call may wait for its response, in seconds.static final StringName of the JVM system property that sets the same limit for every REST client connector that does not set it in its connection.Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
auditLog, connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the component description that is used by this connector in the audit log.longReturn 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, otherwiseDEFAULT_REQUEST_TIMEOUT_SECONDS.voidsetAuditLog(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnect, disconnectConnectors, equals, fromCamelToCanonicalCase, fromCanonicalToCamelCase, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayValue, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getSecretsCollectionName, getSecretsLocation, getSecretsProvider, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logExceptionRecord, logRecord, logRecord, start, throwMissingConfigurationProperty, throwMissingElement, throwMissingEndpointAddress, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, refreshStatistics, setStatisticProperty, setStatisticTimestampMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.odpi.openmetadata.adapters.connectors.restclients.RESTClientCalls
callDeleteRESTCall, callDeleteRESTCallNoParams, callGetRESTCall, callGetRESTCallNoParams, callPatchRESTCall, callPostRESTCall, callPostRESTCallNoParams, callPutRESTCall, callPutRESTCallNoParamsMethods inherited from interface org.odpi.openmetadata.frameworks.connectors.SecureConnectorExtension
initializeSecretsStoreConnector
-
Field Details
-
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
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_SECONDSHow 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, otherwiseDEFAULT_REQUEST_TIMEOUT_SECONDS. Zero (or a negative or unreadable value) means no limit.- Returns:
- number of seconds, or 0 for no limit
-
getConnectorComponentDescription
Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescriptionin interfaceAuditLoggingComponent- Returns:
- id, name, description, wiki page URL.
-
setAuditLog
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:
setAuditLogin interfaceAuditLoggingComponent- Parameters:
auditLog- audit log object
-