* @throws IOException if an error occurs during communications
*/
private void processComputeCall (ObjectInputStream objIn, DataOutputStream out, boolean asynch) throws IOException {
log.entering ("com.sun.grid.jgrid.proxy.ComputeProxy", "processComputeCall");
//Read argument
Computable job = null;
try {
job = (Computable)objIn.readObject ();
log.log (Level.FINE, "Compute call with " + job.getClass ().getName ());
}
catch (ClassNotFoundException e) {
this.processException (out, new RemoteException ("Unable to find class", e));
log.throwing ("com.sun.grid.jgrid.ComputeEngine", "processComputeCall", e);
return;
}
catch (ClassCastException e) {
this.processException (out, new RemoteException ("Incorrect argument type", e));
log.throwing ("com.sun.grid.jgrid.ComputeEngine", "processComputeCall", e);
return;
}
//Get annotation information so we know where it came from
log.log (Level.FINEST, "Getting annotation information");
String className = job.getClass ().getName ();
Map annotations = ((ProxyInputStream)objIn).getAnnotations ();
String annotation = (String)annotations.get (className);
//Process the compute call
Object returnValue = this.process (job, annotation, asynch);