Class GridFTPServer


  • public class GridFTPServer
    extends java.lang.Object
    This is a data class that is used to store information about a grid ftp server.

    The various attributes that can be associated with the the server are displayed in the following table.

    Attribute NameAttribute Description
    url the url string pointing to gridftp server, consisting of the host and the port.
    globus version the version of the Globus Toolkit that was used to install the server.
    storage mount point the storage mount point for the server.
    total size the total storage space at the grid ftp server.
    free size the free space at the grid ftp server.
    Version:
    $Revision$
    Author:
    Gaurang Mehta gmehta@isi.edu, Karan Vahi vahi@isi.edu
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int FREE_SIZE
      The constant to be passed to the accessor functions to get or set the free size.
      static int GLOBUS_VERSION
      The constant to be passed to the accessor functions to get or set the globus version of the grid ftp server.
      static int GRIDFTP_URL
      The constant to be passed to the accessor functions to get or set the url.
      static java.lang.String[] GRIDFTPINFO
      Array storing the names of the attributes that are stored with the grid ftp server.
      private java.util.List mBandWidths  
      private java.lang.String mFreeSize
      The free space at the grid ftp server.
      private java.lang.String mGlobusVersion
      The version of Globus Toolkit that was used to install the grid ftp server.
      private java.lang.String mStorageDir
      The storage mount point for the grid ftp server.
      private java.lang.String mTotalSize
      The total storage space at the grid ftp server.
      private java.lang.String mURL
      The url string of the gridftp that contains the host and the port.
      static int STORAGE_DIR
      The constant to be passed to the accessor functions to get or set the storage directory of the grid ftp server.
      static int TOTAL_SIZE
      The constant to be passed to the accessor functions to get or set the total size.
    • Constructor Summary

      Constructors 
      Constructor Description
      GridFTPServer()
      The default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Checks if an object is similar to the one referred to by this class.
      java.util.List getGridFTPBandwidthInfo()
      Returns a list of GridFTPBandwidth objects that contain the bandwidths by which a site is connected to other sites.
      java.lang.String getInfo​(int key)
      Returns the attribute value of a particular attribute of the server.
      void setGridFTPBandwidthInfo​(GridFTPBandwidth bandwidth)
      It fills information in the mBandWidths ArrayList.
      void setInfo​(int key, java.lang.String value)
      Sets an attribute associated with the grid ftp server.
      java.lang.String toMultiLine()
      Returns the textual description of the contents of GridFTPServer object in the multiline format.
      java.lang.String toString()
      Returns the textual description of the contents of LRC object.
      java.lang.String toXML()
      Returns the XML description of the contents of LRC object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • GRIDFTPINFO

        public static final java.lang.String[] GRIDFTPINFO
        Array storing the names of the attributes that are stored with the grid ftp server.
      • GRIDFTP_URL

        public static final int GRIDFTP_URL
        The constant to be passed to the accessor functions to get or set the url.
        See Also:
        Constant Field Values
      • STORAGE_DIR

        public static final int STORAGE_DIR
        The constant to be passed to the accessor functions to get or set the storage directory of the grid ftp server.
        See Also:
        Constant Field Values
      • GLOBUS_VERSION

        public static final int GLOBUS_VERSION
        The constant to be passed to the accessor functions to get or set the globus version of the grid ftp server.
        See Also:
        Constant Field Values
      • TOTAL_SIZE

        public static final int TOTAL_SIZE
        The constant to be passed to the accessor functions to get or set the total size.
        See Also:
        Constant Field Values
      • FREE_SIZE

        public static final int FREE_SIZE
        The constant to be passed to the accessor functions to get or set the free size.
        See Also:
        Constant Field Values
      • mURL

        private java.lang.String mURL
        The url string of the gridftp that contains the host and the port.
      • mStorageDir

        private java.lang.String mStorageDir
        The storage mount point for the grid ftp server. This is the absolute path on the file system being accessed through the grid ftp server.
      • mGlobusVersion

        private java.lang.String mGlobusVersion
        The version of Globus Toolkit that was used to install the grid ftp server.
      • mTotalSize

        private java.lang.String mTotalSize
        The total storage space at the grid ftp server. In what units??
      • mFreeSize

        private java.lang.String mFreeSize
        The free space at the grid ftp server. In what units??
      • mBandWidths

        private java.util.List mBandWidths
    • Constructor Detail

      • GridFTPServer

        public GridFTPServer()
        The default constructor.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Checks if an object is similar to the one referred to by this class. We compare the primary key to determine if it is the same or not.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object
        Returns:
        true if the primary key (universe,jobmanager-type,pool) match. else false.
      • setInfo

        public void setInfo​(int key,
                            java.lang.String value)
                     throws java.lang.Exception
        Sets an attribute associated with the grid ftp server.
        Parameters:
        key - the attribute key, which is one of the predefined keys.
        value - value of the attribute.
        Throws:
        java.lang.Exception - if illegal key defined.
      • setGridFTPBandwidthInfo

        public void setGridFTPBandwidthInfo​(GridFTPBandwidth bandwidth)
                                     throws java.lang.Exception
        It fills information in the mBandWidths ArrayList.
        Parameters:
        bandwidth - the object that is stored in the hash, containing the information about the gridftp bandwidth between the host and the destination.
        Throws:
        java.lang.Exception
      • getGridFTPBandwidthInfo

        public java.util.List getGridFTPBandwidthInfo()
                                               throws java.lang.Exception
        Returns a list of GridFTPBandwidth objects that contain the bandwidths by which a site is connected to other sites.
        Returns:
        list of GridFTPBandwidth objects.
        Throws:
        java.lang.Exception
      • getInfo

        public java.lang.String getInfo​(int key)
        Returns the attribute value of a particular attribute of the server.
        Parameters:
        key - the key/attribute name.
        Returns:
        the attribute value
        Throws:
        java.lang.RuntimeException - if illegal key defined.
      • toMultiLine

        public java.lang.String toMultiLine()
        Returns the textual description of the contents of GridFTPServer object in the multiline format.
        Returns:
        the textual description in multiline format.
      • toString

        public java.lang.String toString()
        Returns the textual description of the contents of LRC object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the textual description.
      • toXML

        public java.lang.String toXML()
        Returns the XML description of the contents of LRC object.
        Returns:
        the xml description.