Class ConnectionHandler<B>


public class ConnectionHandler<B> extends ReferenceableHandler<B>
ConnectionHandler manages Connection objects. These describe the network addresses where services are running. They are used by connection objects to describe the service that the connector should call. They are linked to servers to show their network address where the services that they are hosting are running.
Most OMASs that work with Connection objects use the Open Connector Framework (OCF) Bean since this can be passed to the OCF Connector Broker to create an instance of a connector to the attached asset. Therefore, this handler has a default bean and converter which is the one that works with the OCF bean. The call can either use these values or override with their own bean/converter implementations.
ConnectionHandler runs server-side in the OMAG Server Platform and retrieves Connection entities through the OMRSRepositoryConnector via the generic handler and repository handler.
  • Constructor Details

    • ConnectionHandler

      public ConnectionHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, AuditLog auditLog)
      Construct the handler information needed to interact with the repository services
      Parameters:
      converter - specific converter for this bean class
      beanClass - name of bean class that is represented by the generic class B
      serviceName - name of this service
      serverName - name of the local server
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      localServerUserId - userId for this server
      securityVerifier - open metadata security services verifier
      auditLog - destination for audit log events.
  • Method Details

    • getConnectionForAsset

      public B getConnectionForAsset(String userId, String assetGUID, String assetGUIDParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
      Retrieve the list of connection objects attached to the requested asset object. This includes the endpoint and connector type.
      Parameters:
      userId - calling user
      assetGUID - unique identifier of the asset object
      assetGUIDParameterName - parameter name supplying assetGUID
      forLineage - return elements marked with the Memento classification?
      forDuplicateProcessing - do not merge elements marked as duplicates?
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - calling method
      Returns:
      Connection bean
      Throws:
      InvalidParameterException - the parameters are invalid
      UserNotAuthorizedException - the user is not authorized to issue this request
      PropertyServerException - problem accessing the property server