Class MdsQuery


  • public class MdsQuery
    extends java.lang.Object
    This Class queries the GT2 based Monitoring and Discovery Service (MDS) and stores the remote sites information into a single data class.
    Version:
    $Revision$
    Author:
    Gaurang Mehta gmehta@isi.edu, Karan Vahi vahi@isi.edu
    • Constructor Detail

      • MdsQuery

        public MdsQuery()
        C'tor for the class.
      • MdsQuery

        public MdsQuery​(java.lang.String host,
                        int port)
        Valid C'tor for the class to create a MdsQuery object. Sets the SECURITY_ATHENTICATION with simple authentication. Sets the PROVIDER_URL to the MDS host and port. Sets the INTITIAL CONTEXT FACTORY.
        Parameters:
        host - the hostname of the machine on which a GRIS or GIIS is running.
        port - the Port number on which a GRIS or GIIS is running.
    • Method Detail

      • setLdapConnectionEnv

        public void setLdapConnectionEnv​(java.lang.String index,
                                         java.lang.String value)
        Enables a user to set new or overide existing connection settings to the MDS.
        Parameters:
        index - Holds the index string for the connection environment.
        value - Holds the value corresponding to the index fro the connnection environment.
      • setLdapSearchConstraints

        public void setLdapSearchConstraints()
      • connectMds

        public javax.naming.ldap.LdapContext connectMds()
                                                 throws javax.naming.NamingException
        Create and return a MDS LdapContext.
        Returns:
        LdapContext
        Throws:
        javax.naming.NamingException
      • searchMDS

        public javax.naming.NamingEnumeration searchMDS​(javax.naming.ldap.LdapContext mdsctx,
                                                        java.lang.String baseDN,
                                                        java.lang.String filter)
        Still Thinking how to eable this option.
      • StoreGvdsMdsInfo

        public PoolConfig StoreGvdsMdsInfo​(javax.naming.NamingEnumeration results,
                                           java.lang.String baseDN,
                                           PoolConfig poolconfig)
                                    throws javax.naming.NamingException,
                                           java.lang.Exception
        Throws:
        javax.naming.NamingException
        java.lang.Exception
      • displayResults

        public void displayResults​(javax.naming.NamingEnumeration results,
                                   java.lang.String baseDN)
                            throws javax.naming.NamingException
        Displays the result on stdout instead of putting it in data classes.
        Parameters:
        results - Takes a NamingEnumeration returned by the MDS search
        baseDN - Takes the baseDN provided to the MDS search.
        Throws:
        javax.naming.NamingException