com.sun.grid.jgrid.server
Class ComputeEngineImpl

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended bycom.sun.grid.jgrid.server.ComputeEngineImpl
All Implemented Interfaces:
ComputeEngine, java.rmi.Remote, java.io.Serializable

Deprecated. No longer used as of 0.2

public class ComputeEngineImpl
extends java.rmi.server.UnicastRemoteObject
implements ComputeEngine

This class implements the ComputeEngine interface. Currently only the compute method is implemented.

Since:
0.1
See Also:
Serialized Form

Field Summary
(package private)  ResultChannel resultChannel
          Deprecated. The channel for sending results back to the ComputeProxy.
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
 
Fields inherited from class java.rmi.server.RemoteServer
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
ComputeEngineImpl(java.lang.String resultHost)
          Deprecated. Constructs ComputeEngineImpl object and exports it on default port.
ComputeEngineImpl(java.lang.String resultHost, int port)
          Deprecated. Constructs ComputeEngineImpl object and exports it on specified port.
 
Method Summary
 void checkpoint(java.lang.String jobId)
          Deprecated. This method is not implemented.
 void compute(Job job)
          Deprecated. This method causes the execution of the Job.
private  void connectToResultChannel(java.lang.String resultHost)
          Deprecated. This method retrieves the ResultChannel object from the registry.
 void halt(java.lang.String jobId)
          Deprecated. This method is not implemented.
 void haltAll()
          Deprecated. This method is not implemented.
static void main(java.lang.String[] args)
          Deprecated. Main method.
static void registerToRegistry(java.lang.String name, java.rmi.Remote obj, boolean create)
          Deprecated. Register ComputeEngineImpl object with the RMI registry.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

resultChannel

ResultChannel resultChannel
Deprecated. 
The channel for sending results back to the ComputeProxy.

See Also:
ComputeProxy, ResultChannel
Constructor Detail

ComputeEngineImpl

public ComputeEngineImpl(java.lang.String resultHost)
                  throws java.rmi.RemoteException
Deprecated. 
Constructs ComputeEngineImpl object and exports it on default port.

Parameters:
resultHost - the host with the registry containing the ResultChannel
Throws:
java.rmi.RemoteException - if an error occurs while trying to retrieve the ResultChannel object

ComputeEngineImpl

public ComputeEngineImpl(java.lang.String resultHost,
                         int port)
                  throws java.rmi.RemoteException
Deprecated. 
Constructs ComputeEngineImpl object and exports it on specified port.

Parameters:
resultHost - the host with the registry containing the ResultChannel
port - The port for exporting
Throws:
java.rmi.RemoteException - if an error occurs while trying to retrieve the ResultChannel object
Method Detail

connectToResultChannel

private void connectToResultChannel(java.lang.String resultHost)
                             throws java.rmi.RemoteException
Deprecated. 
This method retrieves the ResultChannel object from the registry.

Parameters:
resultHost - the host with the registry containing the ResultChannel
Throws:
java.rmi.RemoteException - if an error occurs while trying to retrieve the ResultChannel object

registerToRegistry

public static void registerToRegistry(java.lang.String name,
                                      java.rmi.Remote obj,
                                      boolean create)
                               throws java.rmi.RemoteException,
                                      java.net.MalformedURLException
Deprecated. 
Register ComputeEngineImpl object with the RMI registry.

Parameters:
obj - the object to bind
name - - name identifying the service in the RMI registry
create - - create local registry if necessary
Throws:
java.rmi.RemoteException - if cannot be exported or bound to RMI registry
java.net.MalformedURLException - if name cannot be used to construct a valid URL
java.lang.IllegalArgumentException - if null passed as name

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Deprecated. 
Main method.

Parameters:
args - the command line arguments
Throws:
java.lang.Exception - if an error occurs

compute

public void compute(Job job)
             throws java.rmi.RemoteException
Deprecated. 
This method causes the execution of the Job. Any non-RMI exceptions will be returned to the ComputeProxy via the ResultChannel.sendException method rather than being thrown.

Specified by:
compute in interface ComputeEngine
Parameters:
job - the job to execute
Throws:
java.rmi.RemoteException - if an error occurs on the server side
See Also:
ResultChannel.sendException(java.lang.Exception, java.lang.String)

checkpoint

public void checkpoint(java.lang.String jobId)
                throws java.rmi.RemoteException
Deprecated. 
This method is not implemented.

Specified by:
checkpoint in interface ComputeEngine
Parameters:
jobId - the id of the job to checkpoint
Throws:
java.rmi.RemoteException - if an error occurs on the server side

halt

public void halt(java.lang.String jobId)
          throws java.rmi.RemoteException
Deprecated. 
This method is not implemented.

Specified by:
halt in interface ComputeEngine
Parameters:
jobId - the id of the job to stop
Throws:
java.rmi.RemoteException - if an error occurs on the server side

haltAll

public void haltAll()
             throws java.rmi.RemoteException
Deprecated. 
This method is not implemented.

Specified by:
haltAll in interface ComputeEngine
Throws:
java.rmi.RemoteException - if an error occurs on the server side