Interface Connection

All Superinterfaces:
CMetadata, ContentLocation, DeployedDataPackage, MdObjectBase, MdObjectBaseUtil, MdObjectBaseXML, PrimaryType, Remote, Root
All Known Subinterfaces:
COMConnection, OpenClientConnection, SASClientConnection, TCPIPConnection

public interface Connection extends ContentLocation
Represents the information required to connect to a server. It is associated with the deployed component, i.e. server, that can be accessed using the connection information. It may also be associated with the deployed components that can use the connection information to access the server..

Attributes of Connection are:

Associations of Connection are:

Usage

To create an instance of this Connection, use the factory create methods.
Example: create a Connection with name "Connection_Object", in repository "AAAAAAAA".
 // create a store to contain your objects for this change. If you do not have an existing object
 // or store to use.  You may obtain the store from another object by using Object.getObjectStore().
 MdFactory factory; //where "factory" is a valid MdFactory instance
 MdObjectStore objectStore = factory.createObjectStore();
 Connection myObject = (Connection) factory.createComplexMetadataObject(objectStore, "Connection_Object", MetadataObjects.CONNECTION, "AAAAAAAA");
 myObject.updateMetadataAll();  // Write object to server
 objectStore.dispose();  // dispose of the object store if it is no longer needed
 

Behavior

  • Attributes and associations for this object can be retrieved by using the methods in MdOMIUtil.
  • When changes are made to the object, either by setting an attribute or adding objects to a particular association, they can be persisted to the metadata server with the updateMetadataAll method.
  • If an object needs to be deleted, the delete method can be used. This will flag the object as being deleted on the client, and will require an update call to persist the change to the server.

Dependencies

This class depends on objects being contained in an MdObjectStore. Object stores should be disposed of when they are no longer needed as this will help clean up memory. Disposing an object store will dispose of all objects contained within that store.

Since:
9.0
  • Field Details

    • ATTRIBUTE_AUTHENTICATIONTYPE_NAME

      static final String ATTRIBUTE_AUTHENTICATIONTYPE_NAME
      Constant used for the name of the AuthenticationType attribute.

      AuthenticationType: This attribute indicates the type of authentication needed to connect to this server. It has an enumerated set of values: none user/password password certificate

      See Also:
    • ATTRIBUTE_COMMUNICATIONPROTOCOL_NAME

      static final String ATTRIBUTE_COMMUNICATIONPROTOCOL_NAME
      Constant used for the name of the CommunicationProtocol attribute.

      CommunicationProtocol: This attribute indicates the communication protocol: TCP, APPC and any others that may be supported.

      See Also:
    • ATTRIBUTE_APPLICATIONPROTOCOL_NAME

      static final String ATTRIBUTE_APPLICATIONPROTOCOL_NAME
      Constant used for the name of the ApplicationProtocol attribute.

      ApplicationProtocol: This attribute represents the application level protocol being used on this connection. It can have values like CONNECT, SHARE, Bridge, etc. It allows the list of connections to be queried by the type of usage expected, regardless of communication protocol.

      See Also:
    • ASSOCIATION_DOMAIN_NAME

      static final String ASSOCIATION_DOMAIN_NAME
      Constant used for the name of the Domain association.

      Domain: The name of the authorization domain that maintains the user identities and credentials used to connect to the deployed component accessed through this connection object.  

      See Also:
    • ASSOCIATION_PASSTHRUPASSWORD_NAME

      static final String ASSOCIATION_PASSTHRUPASSWORD_NAME
      Constant used for the name of the PassthruPassword association.

      PassthruPassword: The SAS password to use with the Remote SQL Passthru option PT2DBPW=.  

      See Also:
    • ASSOCIATION_PROVIDERS_NAME

      static final String ASSOCIATION_PROVIDERS_NAME
      Constant used for the name of the Providers association.

      Providers: The deployed components that can use the connection information to access another component. For example, this is the list of DBMS clients, like a JDBC application, that can use the connection information to access a DBMS.  

      See Also:
    • ASSOCIATION_SAPW_NAME

      static final String ASSOCIATION_SAPW_NAME
      Constant used for the name of the SAPW association.

      SAPW: The SAS password used for the RLS SASPW= option.  

      See Also:
    • ASSOCIATION_DATASOURCES_NAME

      static final String ASSOCIATION_DATASOURCES_NAME
      Constant used for the name of the DataSources association.

      DataSources: The data source name that uses this connection. 

      See Also:
    • ASSOCIATION_SOURCE_NAME

      static final String ASSOCIATION_SOURCE_NAME
      Constant used for the name of the Source association.

      Source: The deployed software component that can be accessed through this connection object. 

      See Also:
  • Method Details

    • initializeRequiredObjects

      void initializeRequiredObjects() throws RemoteException
      (S) This initializes the Required Objects(Roles) which are:
      Source
      Specified by:
      initializeRequiredObjects in interface ContentLocation
      Specified by:
      initializeRequiredObjects in interface DeployedDataPackage
      Specified by:
      initializeRequiredObjects in interface MdObjectBaseUtil
      Specified by:
      initializeRequiredObjects in interface PrimaryType
      Specified by:
      initializeRequiredObjects in interface Root
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • initializePredObjects

      void initializePredObjects() throws RemoteException
      (S) Adds the Associated objects to the predObjects which are:
      Domain
      PassthruPassword
      Providers
      SAPW
      Specified by:
      initializePredObjects in interface ContentLocation
      Specified by:
      initializePredObjects in interface DeployedDataPackage
      Specified by:
      initializePredObjects in interface MdObjectBase
      Specified by:
      initializePredObjects in interface PrimaryType
      Specified by:
      initializePredObjects in interface Root
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getAuthenticationType

      String getAuthenticationType() throws RemoteException
      Gets the String value of AuthenticationType
      Returns:
      The AuthenticationType
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getAuthenticationTypeState

      int getAuthenticationTypeState() throws RemoteException
      Gets the Metadata State of AuthenticationType
      Returns:
      The State.
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getAuthenticationTypeMaxLength

      int getAuthenticationTypeMaxLength() throws RemoteException
      Gets the maximum length of AuthenticationType
      Returns:
      The max size
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getCommunicationProtocol

      String getCommunicationProtocol() throws RemoteException
      Gets the String value of CommunicationProtocol
      Returns:
      The CommunicationProtocol
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getCommunicationProtocolState

      int getCommunicationProtocolState() throws RemoteException
      Gets the Metadata State of CommunicationProtocol
      Returns:
      The State.
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getCommunicationProtocolMaxLength

      int getCommunicationProtocolMaxLength() throws RemoteException
      Gets the maximum length of CommunicationProtocol
      Returns:
      The max size
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getApplicationProtocol

      String getApplicationProtocol() throws RemoteException
      Gets the String value of ApplicationProtocol
      Returns:
      The ApplicationProtocol
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getApplicationProtocolState

      int getApplicationProtocolState() throws RemoteException
      Gets the Metadata State of ApplicationProtocol
      Returns:
      The State.
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getApplicationProtocolMaxLength

      int getApplicationProtocolMaxLength() throws RemoteException
      Gets the maximum length of ApplicationProtocol
      Returns:
      The max size
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
    • getDomains

      AssociationList getDomains() throws RemoteException, MdException
      Gets the AssociationList of Domains
      Returns:
      Returns the AssociationList of Domains which can be of type:
      AuthenticationDomain
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException
    • getDomain

      AuthenticationDomain getDomain() throws RemoteException, MdException
      Gets the AuthenticationDomain for Domain
      Returns:
      The AuthenticationDomain ( null if not set) of Domainwhich can be of type:
      AuthenticationDomain
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getPassthruPasswords

      AssociationList getPassthruPasswords() throws RemoteException, MdException
      Gets the AssociationList of PassthruPasswords
      Returns:
      Returns the AssociationList of PassthruPasswords which can be of type:
      SASPassword
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException
    • getPassthruPassword

      SASPassword getPassthruPassword() throws RemoteException, MdException
      Gets the SASPassword for PassthruPassword
      Returns:
      The SASPassword ( null if not set) of PassthruPasswordwhich can be of type:
      SASPassword
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getProviders

      AssociationList getProviders() throws RemoteException, MdException
      Gets the AssociationList of Providers
      Returns:
      Returns the AssociationList of Providers which can be of type:
      DeployedComponent
      ConfiguredComponent
      ServiceComponent
      ServerComponent
      LogicalServer
      ServerContext
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getSAPWs

      AssociationList getSAPWs() throws RemoteException, MdException
      Gets the AssociationList of SAPWs
      Returns:
      Returns the AssociationList of SAPWs which can be of type:
      SASPassword
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException
    • getSAPW

      SASPassword getSAPW() throws RemoteException, MdException
      Gets the SASPassword for SAPW
      Returns:
      The SASPassword ( null if not set) of SAPWwhich can be of type:
      SASPassword
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getDataSources

      AssociationList getDataSources() throws RemoteException, MdException
      Gets the Association list of DataSources
      Returns:
      The AssociationList of DataSources which can be of type:
      DataSourceName
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getSources

      AssociationList getSources() throws RemoteException, MdException
      Gets the Association list of Sources
      Returns:
      The AssociationList of Sources which can be of type:
      DeployedComponent
      ConfiguredComponent
      ServiceComponent
      ServerComponent
      LogicalServer
      ServerContext
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getSource

      DeployedComponent getSource() throws RemoteException, MdException
      Gets the DeployedComponent for Source
      Returns:
      The DeployedComponent ( null if not set ) of Source which can be of type:
      DeployedComponent
      ConfiguredComponent
      ServiceComponent
      ServerComponent
      LogicalServer
      ServerContext
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getDomains

      AssociationList getDomains(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of Domains
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the AssociationList of Domains which can be of type:
      AuthenticationDomain
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getPassthruPasswords

      AssociationList getPassthruPasswords(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of PassthruPasswords
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the AssociationList of PassthruPasswords which can be of type:
      SASPassword
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getProviders

      AssociationList getProviders(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of Providers
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the AssociationList of Providers which can be of type:
      DeployedComponent
      ConfiguredComponent
      ServiceComponent
      ServerComponent
      LogicalServer
      ServerContext
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getSAPWs

      AssociationList getSAPWs(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of SAPWs
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the AssociationList of SAPWs which can be of type:
      SASPassword
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getDataSources

      AssociationList getDataSources(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of DataSources
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the DataSources which can be of type:
      DataSourceName
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • getSources

      AssociationList getSources(boolean fGoToServer) throws RemoteException, MdException
      Gets the Associationlist of Sources
      Parameters:
      fGoToServer - boolean Get the value from the server.
      Returns:
      Returns the Sources which can be of type:
      DeployedComponent
      ConfiguredComponent
      ServiceComponent
      ServerComponent
      LogicalServer
      ServerContext
      Throws:
      RemoteException - If error connecting/communicating to/with remote object.
      MdException - If error getting/setting part of the object.
    • setAuthenticationType

      void setAuthenticationType(String inAuthenticationType) throws RemoteException
      Sets the AuthenticationType value and sets the state to MetadataState.LOCAL.
      Parameters:
      inAuthenticationType - String
      Throws:
      RemoteException - If error communicating with remote object.
    • setAuthenticationType

      void setAuthenticationType(String inAuthenticationType, int state) throws RemoteException
      Sets the AuthenticationType Metadata State.
      Parameters:
      inAuthenticationType - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setAuthenticationTypeState

      void setAuthenticationTypeState(int state) throws RemoteException
      Sets the Metadata State of AuthenticationType.
      Parameters:
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setCommunicationProtocol

      void setCommunicationProtocol(String inCommunicationProtocol) throws RemoteException
      Sets the CommunicationProtocol value and sets the state to MetadataState.LOCAL.
      Parameters:
      inCommunicationProtocol - String
      Throws:
      RemoteException - If error communicating with remote object.
    • setCommunicationProtocol

      void setCommunicationProtocol(String inCommunicationProtocol, int state) throws RemoteException
      Sets the CommunicationProtocol Metadata State.
      Parameters:
      inCommunicationProtocol - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setCommunicationProtocolState

      void setCommunicationProtocolState(int state) throws RemoteException
      Sets the Metadata State of CommunicationProtocol.
      Parameters:
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setApplicationProtocol

      void setApplicationProtocol(String inApplicationProtocol) throws RemoteException
      Sets the ApplicationProtocol value and sets the state to MetadataState.LOCAL.
      Parameters:
      inApplicationProtocol - String
      Throws:
      RemoteException - If error communicating with remote object.
    • setApplicationProtocol

      void setApplicationProtocol(String inApplicationProtocol, int state) throws RemoteException
      Sets the ApplicationProtocol Metadata State.
      Parameters:
      inApplicationProtocol - String
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setApplicationProtocolState

      void setApplicationProtocolState(int state) throws RemoteException
      Sets the Metadata State of ApplicationProtocol.
      Parameters:
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setDomains

      void setDomains(AssociationList list) throws RemoteException
      Sets the Domains list to be list. Object of which can be of type:
      AuthenticationDomain
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setDomains

      void setDomains(AssociationList list, int state) throws RemoteException
      Sets the Domains list to be list. Object of which can be of type:
      AuthenticationDomain
      Parameters:
      list - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setDomain

      void setDomain(AuthenticationDomain inObject) throws RemoteException
      Sets the Domains list 0th element to be inObject.
      Parameters:
      inObject - AuthenticationDomain
      Throws:
      RemoteException - If error communicating with remote object.
    • setPassthruPasswords

      void setPassthruPasswords(AssociationList list) throws RemoteException
      Sets the PassthruPasswords list to be list. Object of which can be of type:
      SASPassword
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setPassthruPasswords

      void setPassthruPasswords(AssociationList list, int state) throws RemoteException
      Sets the PassthruPasswords list to be list. Object of which can be of type:
      SASPassword
      Parameters:
      list - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setPassthruPassword

      void setPassthruPassword(SASPassword inObject) throws RemoteException
      Sets the PassthruPasswords list 0th element to be inObject.
      Parameters:
      inObject - SASPassword
      Throws:
      RemoteException - If error communicating with remote object.
    • setProviders

      void setProviders(AssociationList list) throws RemoteException
      Sets the Providers list to be list. Objects of which can be of type:
      DeployedComponent
      ConfiguredComponent
      ServiceComponent
      ServerComponent
      LogicalServer
      ServerContext
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setProviders

      void setProviders(AssociationList inObjects, int state) throws RemoteException
      Sets the entire AssociationList to match the passed in Vector, sets the state of the AssociationList
      Parameters:
      inObjects - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setSAPWs

      void setSAPWs(AssociationList list) throws RemoteException
      Sets the SAPWs list to be list. Object of which can be of type:
      SASPassword
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setSAPWs

      void setSAPWs(AssociationList list, int state) throws RemoteException
      Sets the SAPWs list to be list. Object of which can be of type:
      SASPassword
      Parameters:
      list - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setSAPW

      void setSAPW(SASPassword inObject) throws RemoteException
      Sets the SAPWs list 0th element to be inObject.
      Parameters:
      inObject - SASPassword
      Throws:
      RemoteException - If error communicating with remote object.
    • setDataSources

      void setDataSources(AssociationList list) throws RemoteException
      Sets the DataSources list to be list. Objects of which can be of type:
      DataSourceName
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setDataSources

      void setDataSources(AssociationList inObjects, int state) throws RemoteException
      Sets the entire DataSources list to match the passed in AssociationList, sets the state of the DataSources
      Parameters:
      inObjects - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setSources

      void setSources(AssociationList list) throws RemoteException
      Sets the Sources list to be list. Objects of which can be of type:
      DeployedComponent
      ConfiguredComponent
      ServiceComponent
      ServerComponent
      LogicalServer
      ServerContext
      Parameters:
      list - AssociationList
      Throws:
      RemoteException - If error communicating with remote object.
    • setSources

      void setSources(AssociationList list, int state) throws RemoteException
      Sets the Sources list to be list. Objects of which can be of type:
      DeployedComponent
      ConfiguredComponent
      ServiceComponent
      ServerComponent
      LogicalServer
      ServerContext
      Parameters:
      list - AssociationList
      state - int
      Throws:
      RemoteException - If error communicating with remote object.
    • setSource

      void setSource(DeployedComponent inObject) throws RemoteException
      Sets the Sources list 0th element to be inObject.
      Parameters:
      inObject - DeployedComponent
      Throws:
      RemoteException - If error communicating with remote object.