Constructor and Description |
---|
SoftwareServer()
Class constructor.
|
SoftwareServer(String filename)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addScriptedOperations(String path,
String extension)
Add operation scripts within the given directory.
|
void |
addScriptedOperations(String path,
String extension,
String comment_head)
Add operation scripts within the given directory.
|
String |
executeTask(String host,
int session,
Vector<SoftwareServerAuxiliary.Subtask> task)
Execute the given task.
|
Vector<SoftwareServerAuxiliary.Application> |
getApplications()
Get the utilized applications.
|
String |
getCachePath()
Get the servers cache path.
|
int |
getCompletedTaskCount()
Get the number of completed tasks.
|
static String |
getFilename(String filename)
Parse the filename from the cached filename.
|
int |
getKillCount()
Get the number of times the kill operation has been used.
|
int |
getPort()
Get the port the server is listening to.
|
int |
getSession()
Get a new session number.
|
static int |
getSession(String filename)
Parse the session id from the cached filename.
|
int |
getTaskCount()
Get the number of tasks received since starting up.
|
String |
getTempPath()
Get the servers temp path.
|
boolean |
isBusy()
Is the server busy executing a task?
|
void |
loadConfiguration(String filename)
Initialize based on parameters within the given configuration file.
|
static void |
main(String[] args)
A main for the ICR service.
|
void |
rebootMachine()
Reboot the machine the software server is running on.
|
void |
resetCounts()
Reset task counters to zero.
|
void |
run()
Process ICR requests.
|
void |
serveConnection(int session,
Socket client_socket)
Process requests from the given connection.
|
void |
stop()
Stop the Software Server.
|
void |
waitUntilRunning()
Wait until the servers main thread is running.
|
void |
waitUntilStopped()
Wait until the servers main thread stops.
|
public SoftwareServer()
public SoftwareServer(String filename)
filename
- the file name of a configuration filepublic void loadConfiguration(String filename)
filename
- the file name of the configuration filepublic void addScriptedOperations(String path, String extension)
path
- the path to the scriptsextension
- the script file extension (can be null indicating any extension)public void addScriptedOperations(String path, String extension, String comment_head)
path
- the path to the scriptsextension
- the script file extension (can be null indicating any extension)comment_head
- the preceding sequence of characters indicating a commented line (can be null)public int getPort()
public String getCachePath()
public String getTempPath()
public int getSession()
public Vector<SoftwareServerAuxiliary.Application> getApplications()
public int getTaskCount()
public int getKillCount()
public int getCompletedTaskCount()
public String executeTask(String host, int session, Vector<SoftwareServerAuxiliary.Subtask> task)
host
- the host requesting this task executionsession
- the session idtask
- a list of subtasks to executepublic boolean isBusy()
public void waitUntilRunning()
public void serveConnection(int session, Socket client_socket)
session
- the session id for this connectionclient_socket
- the connection to servepublic void resetCounts()
public void rebootMachine()
public void waitUntilStopped()
public void stop()
public static int getSession(String filename)
filename
- the cached filenamepublic static String getFilename(String filename)
filename
- the cached filenamepublic static void main(String[] args)
args
- command line argumentsCopyright © 2014. All rights reserved.