uk.ac.rdg.resc.jstyx.gridservice.client
Class SGSServerClient

java.lang.Object
  extended by uk.ac.rdg.resc.jstyx.gridservice.client.SGSServerClient

public class SGSServerClient
extends java.lang.Object

A client of an SGS server. Use this class to find the SGSs that are available on a server. To create an instance of this class, use the getServerClient() static factory method.

Author:
Jon Blower $Revision: 588 $ $Date: 2006-02-20 17:34:27 +0000 (Mon, 20 Feb 2006) $ $Log$ Revision 1.5 2006/02/20 17:34:27 jonblower Added getConnection() method Revision 1.4 2006/01/05 16:06:34 jonblower SGS clients now deal with possibility that client could be created on a different server Revision 1.3 2005/12/01 08:36:02 jonblower Changed constructor to accept hostname and port instead of CStyxFile Revision 1.2 2005/10/14 18:07:06 jonblower Added getSGSClient() Revision 1.1 2005/08/12 08:08:39 jonblower Developments to support web interface

Method Summary
 StyxConnection getConnection()
           
static SGSServerClient getServerClient(java.lang.String hostname, int port)
          Static factory method for creating an SGSServerClient.
 SGSClient getSGSClient(java.lang.String serviceName)
          Gets an SGSClient object for a given Styx Grid Service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnection

public StyxConnection getConnection()
Returns:
the underlying connection to the server

getServerClient

public static SGSServerClient getServerClient(java.lang.String hostname,
                                              int port)
                                       throws StyxException,
                                              java.net.UnknownHostException
Static factory method for creating an SGSServerClient. If a client already exists for the given server (and port number) it will be returned. If not, a new one will be created.

Parameters:
hostname - The hostname or IP address of the SGS server
port - The port of the SGS server
Throws:
StyxException - if there was an error connecting to the server.
java.net.UnknownHostException - if the host could not be found

getSGSClient

public SGSClient getSGSClient(java.lang.String serviceName)
                       throws StyxException
Gets an SGSClient object for a given Styx Grid Service. This method blocks until the SGS is found and proven to exist on the server. If a client for the given SGS has already been created, it is simply returned.

Parameters:
serviceName - The name of the Styx Grid Service
Returns:
an SGSClient object for the requested Styx Grid Service
Throws:
StyxException - if there is no SGS with the given name on the server


Copyright © 2004-2006 Reading e-Science Centre. All Rights Reserved.