|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.rdg.resc.jstyx.gridservice.client.SGSInstanceClientChangeAdapter
uk.ac.rdg.resc.jstyx.gridservice.client.SGSRun
public class SGSRun
Simple program that logs on to an SGS server, creates a new service instance, runs it and redirects the output streams to the console and local files
| Field Summary | |
|---|---|
static int |
INTERNAL_SGS_ERROR
The exit code that signals an internal error in the SGS mechanism, rather than an error code from the executable that is running on the SGS server |
| Constructor Summary | |
|---|---|
SGSRun(java.lang.String hostname,
int port,
java.lang.String serviceName)
Creates a new SGSRun object |
|
| Method Summary | |
|---|---|
void |
allOutputDataDownloaded()
Called when all the output data have been downloaded |
void |
checkArguments(java.lang.String[] args)
Checks the command-line arguments: makes sure they can be parsed and checks for the existence of all input files |
void |
connect()
Connects to the SGS server and downloads the configuration of this SGS. |
void |
connectionClosed(StyxConnection conn)
Called when the connection to the SGS instance has been closed |
void |
connectionError(StyxConnection conn,
java.lang.String message)
Called when an error has occurred when connecting. |
void |
connectionReady(StyxConnection conn)
Called when the relevant handshaking has been performed and the connection is ready for Styx messages to be sent. |
void |
createNewServiceInstance()
Creates a new service instance |
void |
gotExitCode(int exitCode)
Called when the exit code from the service is received: this signals that the remote executable has completed. |
void |
gotServiceDataValue(java.lang.String sdName,
java.lang.String newData)
Called when the given service data element changes |
static void |
main(java.lang.String[] args)
|
void |
readOutputFiles()
Starts reading from the output files. |
void |
setInputSources()
Sets the input sources for the Styx Grid Service |
void |
setParameters()
Sets the values of all the parameters |
void |
start()
Starts the service and begins reading from the output streams |
| Methods inherited from class uk.ac.rdg.resc.jstyx.gridservice.client.SGSInstanceClientChangeAdapter |
|---|
error, gotArguments, gotParameterValue, gotSteerableParameterValue, inputFilesUploaded, serviceAborted, serviceStarted |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INTERNAL_SGS_ERROR
| Constructor Detail |
|---|
public SGSRun(java.lang.String hostname,
int port,
java.lang.String serviceName)
hostname - The name (or IP address) of the SGS serverport - The port of the SGS serverserviceName - The name of the SGS to invoke| Method Detail |
|---|
public void connect()
throws StyxException,
java.net.UnknownHostException
StyxException - if there was an error connecting to the server
or getting the configuration of the SGS
java.net.UnknownHostException - (from SGSServerClient.getSGSClient())
public void checkArguments(java.lang.String[] args)
throws StyxException
StyxException - if the arguments are not valid
public void createNewServiceInstance()
throws StyxException
StyxException
public void setParameters()
throws StyxException,
java.io.FileNotFoundException
StyxException
java.io.FileNotFoundException
public void setInputSources()
throws StyxException
StyxException
public void start()
throws StyxException
StyxException - if there was an error starting the service
public void readOutputFiles()
throws StyxException,
java.io.FileNotFoundException
StyxException
java.io.FileNotFoundException
public void gotServiceDataValue(java.lang.String sdName,
java.lang.String newData)
gotServiceDataValue in interface SGSInstanceClientChangeListenergotServiceDataValue in class SGSInstanceClientChangeAdapterpublic void gotExitCode(int exitCode)
gotExitCode in interface SGSInstanceClientChangeListenergotExitCode in class SGSInstanceClientChangeAdapterpublic void allOutputDataDownloaded()
allOutputDataDownloaded in interface SGSInstanceClientChangeListenerallOutputDataDownloaded in class SGSInstanceClientChangeAdapterpublic void connectionClosed(StyxConnection conn)
connectionClosed in interface StyxConnectionListenerpublic void connectionReady(StyxConnection conn)
connectionReady in interface StyxConnectionListener
public void connectionError(StyxConnection conn,
java.lang.String message)
connectionError in interface StyxConnectionListenermessage - String describing the problempublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||