public class GetInfo extends java.lang.Object implements ITask<java.lang.String>
Modifier and Type | Field and Description |
---|---|
private double[] |
dArray
An array carried along to prove that internal data is transmitted too.
|
static ITaskFactory<java.lang.String> |
FACTORY
An ITaskFactory for this task
|
private java.lang.String |
input
Input string given to the constructor
|
private static long |
serialVersionUID
UID for well-defined serialization
|
private ILocalTaskViewAdapter |
taskView
Adapter to the local view.
|
Constructor and Description |
---|
GetInfo(java.lang.String input)
Constructor for the class.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
execute()
Display the internal string on the server's console.
|
ITaskResultFormatter<java.lang.String> |
getFormatter()
Returns an formatter that creates a string of the form:
"GetInfo: System properties = [result] (input = [input])"
Notice how the "input" value is not part of the result, but that the
formatter can use it anyway because the formatter is closing over
the whole task.
|
private void |
readObject(java.io.ObjectInputStream stream)
Reinitializes transient fields upon deserialization.
|
void |
setTaskViewAdapter(ILocalTaskViewAdapter viewAdapter)
Sets the task view adapter to a new value.
|
private static final long serialVersionUID
private transient ILocalTaskViewAdapter taskView
private java.lang.String input
private double[] dArray
public static final ITaskFactory<java.lang.String> FACTORY
public GetInfo(java.lang.String input)
input
- A string to carry around.public java.lang.String execute() throws java.rmi.RemoteException
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
stream
- The object stream with the serialized datajava.io.IOException
- if the input stream cannot be read correctlyjava.lang.ClassNotFoundException
- if the class file associated with the input stream cannot be located.public void setTaskViewAdapter(ILocalTaskViewAdapter viewAdapter)
setTaskViewAdapter
in interface ITask<java.lang.String>
viewAdapter
- the adapter to the view.public ITaskResultFormatter<java.lang.String> getFormatter()
getFormatter
in interface ITask<java.lang.String>