edu.isi.pegasus.planner.catalog.site.impl.old.classes
Class GridFTPServer

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.site.impl.old.classes.GridFTPServer

public class GridFTPServer
extends 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: 2571 $
Author:
Gaurang Mehta gmehta@isi.edu, Karan Vahi vahi@isi.edu

Field Summary
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 String[] GRIDFTPINFO
          Array storing the names of the attributes that are stored with the grid ftp server.
private  List mBandWidths
           
private  String mFreeSize
          The free space at the grid ftp server.
private  String mGlobusVersion
          The version of Globus Toolkit that was used to install the grid ftp server.
private  String mStorageDir
          The storage mount point for the grid ftp server.
private  String mTotalSize
          The total storage space at the grid ftp server.
private  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
GridFTPServer()
          The default constructor.
 
Method Summary
 boolean equals(Object o)
          Checks if an object is similar to the one referred to by this class.
 List getGridFTPBandwidthInfo()
          Returns a list of GridFTPBandwidth objects that contain the bandwidths by which a site is connected to other sites.
 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, String value)
          Sets an attribute associated with the grid ftp server.
 String toMultiLine()
          Returns the textual description of the contents of GridFTPServer object in the multiline format.
 String toString()
          Returns the textual description of the contents of LRC object.
 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 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 String mURL
The url string of the gridftp that contains the host and the port.


mStorageDir

private 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 String mGlobusVersion
The version of Globus Toolkit that was used to install the grid ftp server.


mTotalSize

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


mFreeSize

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


mBandWidths

private List mBandWidths
Constructor Detail

GridFTPServer

public GridFTPServer()
The default constructor.

Method Detail

equals

public boolean equals(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 Object
Parameters:
o - Object
Returns:
true if the primary key (universe,jobmanager-type,pool) match. else false.

setInfo

public void setInfo(int key,
                    String value)
             throws 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:
Exception - if illegal key defined.

setGridFTPBandwidthInfo

public void setGridFTPBandwidthInfo(GridFTPBandwidth bandwidth)
                             throws 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:
Exception

getGridFTPBandwidthInfo

public List getGridFTPBandwidthInfo()
                             throws 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:
Exception

getInfo

public 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:
RuntimeException - if illegal key defined.

toMultiLine

public 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 String toString()
Returns the textual description of the contents of LRC object.

Overrides:
toString in class Object
Returns:
the textual description.

toXML

public String toXML()
Returns the XML description of the contents of LRC object.

Returns:
the xml description.


Copyright © 2011 The University of Southern California. All Rights Reserved.