Constructor and Description |
---|
PolyglotSteward()
Class constructor.
|
PolyglotSteward(PolyglotSteward polyglot)
Class copy constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(SoftwareServerClient icr)
Add a software reuse client.
|
boolean |
add(String server,
int port)
Add a software reuse client.
|
void |
close()
Close all software server client connections.
|
SoftwareServerAuxiliary.FileData |
convert(SoftwareServerAuxiliary.FileData input_file_data,
String output_type)
Convert a files format.
|
SoftwareServerAuxiliary.FileData |
convert(SoftwareServerAuxiliary.FileData input_file_data,
Vector<PolyglotAuxiliary.Conversion<SoftwareServerAuxiliary.Data,SoftwareServerAuxiliary.Application>> conversions)
Convert a files format.
|
void |
convert(String input_filename,
String output_path,
String output_type)
Convert a files format.
|
void |
convert(String input_filename,
String output_path,
Vector<PolyglotAuxiliary.Conversion<SoftwareServerAuxiliary.Data,SoftwareServerAuxiliary.Application>> conversions)
Convert a files format.
|
void |
convertOverREST(String input_filename,
String output_path,
String output_type)
Convert a file's format using the Software Server's REST interface.
|
static boolean |
existsURL(String url)
Check if the specified URL exists.
|
SoftwareServerClient |
get(int index)
Retrieve the specified software reuse client.
|
IOGraph<String,String> |
getDistributedInputOutputGraph()
Get a string only version of this IOGraph encoded with host machines.
|
IOGraph<String,String> |
getInputOutputGraph()
Get the available inputs, outputs, and conversions.
|
TreeSet<String> |
getInputs()
Get the inputs available.
|
TreeSet<String> |
getInputs(String output)
Get the inputs available for the given output type.
|
IOGraph<SoftwareServerAuxiliary.Data,SoftwareServerAuxiliary.Application> |
getIOGraph()
Get the I/O-graph.
|
TreeSet<String> |
getOutputs()
Get the outputs available.
|
TreeSet<String> |
getOutputs(String input)
Get the outputs available for the given input type.
|
TreeSet<String> |
getOutputs(TreeSet<String> inputs)
Get the common outputs available for the given input types.
|
Vector<String> |
getServers()
Get a list of connected software reuse servers.
|
TreeSet<String> |
getSoftware()
Get the software available.
|
void |
listen(int port)
Start listening for SoftwareServers.
|
static void |
main(String[] args)
Command line polyglot interface.
|
void |
run()
Clean up lost connections.
|
void |
setApplicationFlexibility(int value)
Set the flexibility when choosing an application where 0=none (default), 1=allow parallel applications with
the same name (different software reuse servers), 2=allow all parallel applications.
|
void |
setMaxTaskTime(int value)
Set the maximum time to wait for a task to complete (used with the Software Server REST interface).
|
void |
setSoftwareServerRESTPort(int value)
Set the software server port.
|
int |
size()
Get the number of software reuse clients being used.
|
void |
stop()
Stop the PolyglotSteward thread.
|
void |
waitUntilStopped()
Wait until the steward's threads have stopped.
|
convertLater, waitOnPending
public PolyglotSteward()
public PolyglotSteward(PolyglotSteward polyglot)
polyglot
- the polyglot steward to copypublic int size()
public boolean add(SoftwareServerClient icr)
icr
- a software reuse clientpublic boolean add(String server, int port)
server
- the server nameport
- the port numberpublic SoftwareServerClient get(int index)
index
- the index of the desired clientpublic Vector<String> getServers()
getServers
in class Polyglot
public IOGraph<SoftwareServerAuxiliary.Data,SoftwareServerAuxiliary.Application> getIOGraph()
public TreeSet<String> getSoftware()
public TreeSet<String> getOutputs()
getOutputs
in class Polyglot
public TreeSet<String> getOutputs(String input)
getOutputs
in class Polyglot
input
- the input typepublic TreeSet<String> getOutputs(TreeSet<String> inputs)
getOutputs
in class Polyglot
inputs
- the input typespublic TreeSet<String> getInputs(String output)
output
- the output typepublic IOGraph<String,String> getInputOutputGraph()
getInputOutputGraph
in class Polyglot
public IOGraph<String,String> getDistributedInputOutputGraph()
getDistributedInputOutputGraph
in class Polyglot
public void setApplicationFlexibility(int value)
value
- the flexibility valuepublic void setSoftwareServerRESTPort(int value)
value
- the portpublic void setMaxTaskTime(int value)
value
- the time to wait in millisecondspublic SoftwareServerAuxiliary.FileData convert(SoftwareServerAuxiliary.FileData input_file_data, Vector<PolyglotAuxiliary.Conversion<SoftwareServerAuxiliary.Data,SoftwareServerAuxiliary.Application>> conversions)
input_file_data
- the input file dataconversions
- the conversions to performpublic SoftwareServerAuxiliary.FileData convert(SoftwareServerAuxiliary.FileData input_file_data, String output_type)
input_file_data
- the input file dataoutput_type
- the name of the output typepublic void convert(String input_filename, String output_path, Vector<PolyglotAuxiliary.Conversion<SoftwareServerAuxiliary.Data,SoftwareServerAuxiliary.Application>> conversions)
input_filename
- the absolute name of the input fileoutput_path
- the output pathconversions
- the conversions to performpublic void convert(String input_filename, String output_path, String output_type)
public void convertOverREST(String input_filename, String output_path, String output_type)
input_filename
- the absolute name of the input fileoutput_path
- the output pathoutput_type
- the name of the output typepublic static boolean existsURL(String url)
url
- the URL to checkpublic void close()
public void waitUntilStopped()
public void stop()
public void listen(int port)
port
- the port to listen topublic static void main(String[] args)
args
- command line argumentsCopyright © 2014. All rights reserved.