Package weka.experiment
Class RemoteEngine
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- weka.experiment.RemoteEngine
-
- All Implemented Interfaces:
java.io.Serializable
,java.rmi.Remote
,RevisionHandler
,Compute
public class RemoteEngine extends java.rmi.server.UnicastRemoteObject implements Compute, RevisionHandler
A general purpose server for executing Task objects sent via RMI.- Version:
- $Revision: 1.12 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RemoteEngine(java.lang.String hostName)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
checkStatus(java.lang.Object taskId)
Returns status information on a particular taskjava.lang.Object
executeTask(Task t)
Takes a task object and queues it for executionjava.lang.String
getRevision()
Returns the revision string.static void
main(java.lang.String[] args)
Main method.-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
-
-
-
Method Detail
-
executeTask
public java.lang.Object executeTask(Task t) throws java.rmi.RemoteException
Takes a task object and queues it for execution- Specified by:
executeTask
in interfaceCompute
- Parameters:
t
- the Task object to execute- Returns:
- an identifier for the Task that can be used when querying Task status
- Throws:
java.rmi.RemoteException
- if something goes wrong.
-
checkStatus
public java.lang.Object checkStatus(java.lang.Object taskId) throws java.lang.Exception
Returns status information on a particular task- Specified by:
checkStatus
in interfaceCompute
- Parameters:
taskId
- the ID of the task to check- Returns:
- a
TaskStatusInfo
encapsulating task status info - Throws:
java.lang.Exception
- if an error occurs
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-
main
public static void main(java.lang.String[] args)
Main method. Gets address of the local host, creates a remote engine object and binds it in the RMI registry. If there is no RMI registry, then it tries to create one with default port 1099.- Parameters:
args
-
-
-