Using the Java Clients¶
Egeria's Java clients support calls to Egeria's operational services. They are used by Runtime Manager OMVS to retrieve information about the running Egeria infrastructure and can be used by other monitoring programs. There are python alternatives for these interfaces.
Each client is located in the -client module of the service it calls:
| Client | Module | Purpose |
|---|---|---|
| Administration Services Clients | admin-services-client |
Configure the OMAG Server Platform and OMAG Servers. There is a client for each type of server, for example MetadataAccessStoreConfigurationClient, ViewServerConfigurationClient, IntegrationDaemonConfigurationClient and EngineHostConfigurationClient, plus OMAGServerPlatformConfigurationClient and ConfigurationManagementClient. |
| Platform Services Client | platform-services-client |
Query the platform's registered services and known/active servers, start servers (activateWithStoredConfig, activateWithSuppliedConfig), shut them down (shutdownServer, shutdownAllServers, shutdownAndUnregisterServer), shut down the platform, and maintain the platform's security connection and user accounts. |
| Server Operations Client | server-operations-client |
Query the status, active configuration and active services of a running server, and load open metadata archives into it. |
| Engine Host Client | engine-host-services-client |
Retrieve summaries of the governance engines running in an engine host (getGovernanceEngineSummary, getGovernanceEngineSummaries) and refresh their configuration (refreshConfig). |
| Integration Daemon Client | integration-daemon-services-client |
Query, refresh and restart the integration connectors running in an integration daemon, update their configuration, and publish OpenLineage events, data contracts and data products to it. |
| Repository Services Clients | repository-services-client |
Call the repository services, for example AuditLogServicesClient to retrieve the audit log, and MetadataHighwayServicesClient to query cohort membership. |
Creating a client¶
Each Java client has two constructors. Both set up the connection to the OMAG Server Platform and obtain a bearer token for the calls using a secrets store connector. They differ in how the secrets store is supplied:
- The first constructor takes the details of the secrets store and creates the secrets store connector itself.
- The second constructor takes a
Map<String, SecretsStoreConnector>of secrets store connectors that have already been created.
Using the PlatformServicesClient as an example, the parameters are:
platformName- the descriptive name of the OMAG Server Platform for error logging. Clients that call a specific server, such asServerOperationsClientorEngineHostClient, take theserverNamehere instead.platformRootURL- the platform url root of the OMAG Server Platform.secretStoreProvider- the class name of the secrets store connector's provider.secretStoreLocation- the location (network address or file name) of the secrets store.secretStoreCollection- the name of the collection of secrets to use to connect to the platform.secretsStoreConnectorMap- (second constructor) the secrets store connectors to use, in place of the three parameters above.delegatingUserId- the userId of the external user making the request, when the caller is acting on behalf of someone else. It may be null.auditLog- logging destination for audit log messages.
The constructor throws InvalidParameterException if there is an issue setting up the client-side components based on the supplied parameters.
Calling a platform with a self-signed certificate
The HTTP Helper turns off certificate checking in development environments.
Working with open metadata from Java¶
Programs that need to create and retrieve open metadata in Java use the Open Metadata Framework (OMF). Its OpenMetadataClient interface (package org.odpi.openmetadata.frameworks.openmetadata.client) is implemented by the EgeriaOpenMetadataStoreClient in the omf-metadata-client module, and the specialized handlers in the org.odpi.openmetadata.frameworks.openmetadata.handlers package (for example AssetHandler, CollectionHandler and GlossaryTermHandler) are built on top of an OpenMetadataClient. These are the classes that Egeria's own view services and connectors use. Applications written in other languages call the equivalent REST APIs of the view services.
Raise an issue or comment below