edu.isi.pegasus.planner.catalog.site.impl.old

## Class MdsQuery

- java.lang.Object
- - edu.isi.pegasus.planner.catalog.site.impl.old.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

### Field Summary

Fields
`private static int` `Avg_Bandwidth`
`private static int` `Avg_Bandwidth_range1`
`private static int` `Avg_Bandwidth_range2`
`private static int` `Avg_Bandwidth_range3`
`private static int` `Avg_Bandwidth_range4`
`private java.lang.String` `DEFAULT_CTX`
`private static int` `Dest_Subnet_Id`
`private java.util.Hashtable` `env`
`private static int` `Gvds_Pool_Gridlaunch`
`private static int` `Gvds_Pool_Id`
`private static int` `Gvds_Pool_Lrc`
`private static int` `Gvds_Pool_Profile`
`private static int` `Gvds_Pool_Storage`
`private static int` `Gvds_Pool_Universe`
`private static int` `Gvds_Pool_WorkDir`
`private static int` `Host_Subnet_Id`
`private java.util.ArrayList` `m_identifiers`
`private static int` `Max_Bandwidth`
`private static int` `Mds_Computer_Isa`
`private static int` `Mds_Computer_Total_Free_NodeCount`
`private static int` `Mds_Computer_Total_NodeCount`
`private static int` `Mds_Gram_Job_Queue_MaxCount`
`private static int` `Mds_Gram_Job_Queue_MaxCpuTime`
`private static int` `Mds_Gram_Job_Queue_MaxJobsInQueue`
`private static int` `Mds_Gram_Job_Queue_MaxRunningJobs`
`private static int` `Mds_Memory_Ram_FreeSizeMB`
`private static int` `Mds_Memory_Ram_Total_SizeMB`
`private static int` `Mds_Os_Name`
`private static int` `Mds_Service_Gram_SchedulerType`
`private static int` `Mds_Subnetid`
`private java.lang.String` `mdsbaseDN`
`private java.lang.String` `mdshost`
`private int` `mdsport`
`private static int` `Min_Bandwidth`

### Constructor Summary

Constructors
Constructor and Description
`MdsQuery()` C'tor for the class.
`MdsQuery(java.lang.String host, int port)` Valid C'tor for the class to create a MdsQuery object.

### Method Summary

All Methods Instance Methods Concrete Methods
`javax.naming.ldap.LdapContext` `connectMds()` Create and return a MDS LdapContext.
`void` `displayResults(javax.naming.NamingEnumeration results, java.lang.String baseDN)` Displays the result on stdout instead of putting it in data classes.
`javax.naming.NamingEnumeration` `searchMDS(javax.naming.ldap.LdapContext mdsctx, java.lang.String baseDN, java.lang.String filter)` Still Thinking how to eable this option.
`void` `setLdapConnectionEnv(java.lang.String index, java.lang.String value)` Enables a user to set new or overide existing connection settings to the MDS.
`void` `setLdapSearchConstraints()`
`PoolConfig` `StoreGvdsMdsInfo(javax.naming.NamingEnumeration results, java.lang.String baseDN, PoolConfig poolconfig)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### mdshost

    private java.lang.String mdshost

#### mdsport

    private int mdsport

#### mdsbaseDN

    private java.lang.String mdsbaseDN

#### DEFAULT_CTX

    private java.lang.String DEFAULT_CTX

#### env

    private java.util.Hashtable env

#### Gvds_Pool_Id

    private static final int Gvds_Pool_Id

See Also:
  Constant Field Values

#### Gvds_Pool_Universe

    private static final int Gvds_Pool_Universe

See Also:
  Constant Field Values

#### Gvds_Pool_WorkDir

    private static final int Gvds_Pool_WorkDir

See Also:
  Constant Field Values

#### Gvds_Pool_Lrc

    private static final int Gvds_Pool_Lrc

See Also:
  Constant Field Values

#### Gvds_Pool_Gridlaunch

    private static final int Gvds_Pool_Gridlaunch

See Also:
  Constant Field Values

#### Gvds_Pool_Storage

    private static final int Gvds_Pool_Storage

See Also:
  Constant Field Values

#### Gvds_Pool_Profile

    private static final int Gvds_Pool_Profile

See Also:
  Constant Field Values

#### Mds_Computer_Total_Free_NodeCount

    private static final int Mds_Computer_Total_Free_NodeCount

See Also:
  Constant Field Values

#### Mds_Computer_Total_NodeCount

    private static final int Mds_Computer_Total_NodeCount

See Also:
  Constant Field Values

#### Mds_Gram_Job_Queue_MaxCount

    private static final int Mds_Gram_Job_Queue_MaxCount

See Also:
  Constant Field Values

#### Mds_Gram_Job_Queue_MaxCpuTime

    private static final int Mds_Gram_Job_Queue_MaxCpuTime

See Also:
  Constant Field Values

#### Mds_Gram_Job_Queue_MaxRunningJobs

    private static final int Mds_Gram_Job_Queue_MaxRunningJobs

See Also:
  Constant Field Values

#### Mds_Gram_Job_Queue_MaxJobsInQueue

    private static final int Mds_Gram_Job_Queue_MaxJobsInQueue

See Also:
  Constant Field Values

#### Mds_Memory_Ram_Total_SizeMB

    private static final int Mds_Memory_Ram_Total_SizeMB

See Also:
  Constant Field Values

#### Mds_Memory_Ram_FreeSizeMB

    private static final int Mds_Memory_Ram_FreeSizeMB

See Also:
  Constant Field Values

#### Mds_Service_Gram_SchedulerType

    private static final int Mds_Service_Gram_SchedulerType

See Also:
  Constant Field Values

#### Mds_Computer_Isa

    private static final int Mds_Computer_Isa

See Also:
  Constant Field Values

#### Mds_Os_Name

    private static final int Mds_Os_Name

See Also:
  Constant Field Values

#### Mds_Subnetid

    private static final int Mds_Subnetid

See Also:
  Constant Field Values

#### Host_Subnet_Id

    private static final int Host_Subnet_Id

See Also:
  Constant Field Values

#### Dest_Subnet_Id

    private static final int Dest_Subnet_Id

See Also:
  Constant Field Values

#### Avg_Bandwidth_range1

    private static final int Avg_Bandwidth_range1

See Also:
  Constant Field Values

#### Avg_Bandwidth_range2

    private static final int Avg_Bandwidth_range2

See Also:
  Constant Field Values

#### Avg_Bandwidth_range3

    private static final int Avg_Bandwidth_range3

See Also:
  Constant Field Values

#### Avg_Bandwidth_range4

    private static final int Avg_Bandwidth_range4

See Also:
  Constant Field Values

#### Avg_Bandwidth

    private static final int Avg_Bandwidth

See Also:
  Constant Field Values

#### Max_Bandwidth

    private static final int Max_Bandwidth

See Also:
  Constant Field Values

#### Min_Bandwidth

    private static final int Min_Bandwidth

See Also:
  Constant Field Values

#### m_identifiers

    private java.util.ArrayList m_identifiers

### 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`