|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.rdg.resc.jstyx.client.CStyxFileChangeAdapter
uk.ac.rdg.resc.jstyx.gridservice.client.SGSClient
public class SGSClient
Client for a Styx Grid Service.
| Constructor Summary | |
|---|---|
SGSClient(CStyxFile sgsRoot)
Creates a new instance of SGSClient. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(SGSChangeListener listener)
Adds a new SGSChangeListener to the list of registered change listeners. |
java.lang.String |
createNewInstance()
Requests creation of a new instance of the SGS on the server. |
void |
dataArrived(CStyxFile file,
TreadMessage tReadMsg,
org.apache.mina.common.ByteBuffer data)
Required by the CStyxFileChangeListener interface |
void |
error(CStyxFile file,
java.lang.String message)
This callback is called if there has been an error with one of the asynchronous methods |
SGSConfig |
getConfig()
Reads the configuration file from the server so that we know how to parse parameters, deal with input files etc. |
StyxConnection |
getConnection()
|
java.lang.String |
getDescription()
Gets the short description of this Styx Grid Service. |
CStyxFile |
getInstanceFile(java.lang.String instanceID)
Gets a file that represents the root of the SGS instance with the given ID. |
void |
getInstancesAsync()
Sends message to get all the instances of this SGS. |
java.lang.String |
getName()
|
void |
removeChangeListener(SGSChangeListener listener)
Removes a SGSChangeListener to the list of registered change listeners. |
| Methods inherited from class uk.ac.rdg.resc.jstyx.client.CStyxFileChangeAdapter |
|---|
childrenFound, dataWritten, downloadComplete, fileCreated, fileOpen, statChanged, uploadComplete |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SGSClient(CStyxFile sgsRoot)
sgsRoot - The CStyxFile representing the root of the SGS| Method Detail |
|---|
public StyxConnection getConnection()
public java.lang.String getName()
public java.lang.String getDescription()
throws StyxException
StyxException - if an error occurs when getting the description from
the server. Will never be thrown if the description has already been set.
public SGSConfig getConfig()
throws StyxException
Reads the configuration file from the server so that we know how to parse parameters, deal with input files etc. Some of this information cannot be gleaned simply from interpreting the namespace itself.
The first time this is called, the server will be queried for the config information. This information will be cached so that further calls to this method will not lead to the server being queried again, but will return the cached object.
StyxException - if there was an error reading the configuration
from the server
public java.lang.String createNewInstance()
throws StyxException
styx://thehost.com:9092/mySGS/instances/1234567890abcde.
Note that the new instance may be created on a different server (for
load balancing purposes, for example).
StyxException
public CStyxFile getInstanceFile(java.lang.String instanceID)
throws StyxException
StyxException - if the instance does not existpublic void getInstancesAsync()
public void dataArrived(CStyxFile file,
TreadMessage tReadMsg,
org.apache.mina.common.ByteBuffer data)
dataArrived in interface CStyxFileChangeListenerdataArrived in class CStyxFileChangeAdapterfile - The CStyxFile containing the datatReadMsg - The original TreadMessage that was sent (contains the offset,
tag etc of the message)data - The new data that have been read from the file
public void error(CStyxFile file,
java.lang.String message)
error in interface CStyxFileChangeListenererror in class CStyxFileChangeAdapterfile - the CStyxFile from which the error originatedmessage - the error messagepublic void addChangeListener(SGSChangeListener listener)
public void removeChangeListener(SGSChangeListener listener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||