public class SoftwareServerClient extends Object implements Comparable
Constructor and Description |
---|
SoftwareServerClient(SoftwareServerClient icr)
Class copy constructor.
|
SoftwareServerClient(String server,
int port)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection to the software server.
|
int |
compareTo(Object object)
Compare to another object.
|
static void |
debug(SoftwareServerClient icr)
Debug tests for a SoftwareReuseClient.
|
int |
executeTasks(Vector<SoftwareServerAuxiliary.Subtask> task)
Execute task on the software reuse server.
|
kgm.utility.AsynchronousObject<Integer> |
executeTasksLater(Vector<SoftwareServerAuxiliary.Subtask> task)
Asynchronously execute a task on the software reuse server.
|
Vector<SoftwareServerAuxiliary.Application> |
getApplications()
Get the list of applications available on the software reuse server.
|
int |
getPort()
Get the port this client is connect to.
|
String |
getServer()
Get the server this client is connected to.
|
String |
getStatus()
Get the status of the software reuse server.
|
boolean |
isAlive()
Check if connection is alive.
|
boolean |
isBusy()
Check if the software reuse server is busy executing another task.
|
static void |
main(String[] args)
Startup a software reuse client command prompt.
|
void |
requestNewSession()
Request a new session.
|
SoftwareServerAuxiliary.FileData |
retrieveData(SoftwareServerAuxiliary.CachedFileData cached_file_data)
Retrieve cached file data from the software reuse server.
|
kgm.utility.AsynchronousObject<SoftwareServerAuxiliary.FileData> |
retrieveDataLater(SoftwareServerAuxiliary.CachedFileData cached_file_data)
Synchronously retrieve cached file data from the server.
|
SoftwareServerAuxiliary.CachedFileData |
sendData(SoftwareServerAuxiliary.FileData file_data)
Send file data to the software reuse server.
|
kgm.utility.AsynchronousObject<SoftwareServerAuxiliary.CachedFileData> |
sendDataLater(SoftwareServerAuxiliary.FileData file_data)
Asynchronously send file data to the server.
|
String |
toString()
Return a string representation of this object.
|
void |
waitOnPending()
Wait for all pending asynchronous calls to complete.
|
public SoftwareServerClient(String server, int port)
server
- the name of the software reuse serverport
- the port used for the connectionpublic SoftwareServerClient(SoftwareServerClient icr)
icr
- an software reuse client session to copypublic String toString()
public String getServer()
public int getPort()
public String getStatus()
public Vector<SoftwareServerAuxiliary.Application> getApplications()
public SoftwareServerAuxiliary.CachedFileData sendData(SoftwareServerAuxiliary.FileData file_data)
file_data
- the file data to sendpublic kgm.utility.AsynchronousObject<SoftwareServerAuxiliary.CachedFileData> sendDataLater(SoftwareServerAuxiliary.FileData file_data)
file_data
- the file data to sendpublic SoftwareServerAuxiliary.FileData retrieveData(SoftwareServerAuxiliary.CachedFileData cached_file_data)
cached_file_data
- the cached file data to retrievepublic kgm.utility.AsynchronousObject<SoftwareServerAuxiliary.FileData> retrieveDataLater(SoftwareServerAuxiliary.CachedFileData cached_file_data)
cached_file_data
- the cached file data to retrievepublic int executeTasks(Vector<SoftwareServerAuxiliary.Subtask> task)
task
- a list of subtasks to execute (note, all input file data should be cached already!)public kgm.utility.AsynchronousObject<Integer> executeTasksLater(Vector<SoftwareServerAuxiliary.Subtask> task)
task
- a list of subtasks to execute (note, all input file data should be cached already!)public void requestNewSession()
public boolean isBusy()
public boolean isAlive()
public void waitOnPending()
public void close()
public int compareTo(Object object)
compareTo
in interface Comparable
object
- the object to compare topublic static void debug(SoftwareServerClient icr)
icr
- a software reuse clientpublic static void main(String[] args)
args
- command line argumentsCopyright © 2014. All rights reserved.