ome.services.blitz.impl
Class ProcessorCallbackI

java.lang.Object
  extended by Ice.ObjectImpl
      extended by omero.grid._ProcessorCallbackDisp
          extended by ome.services.blitz.impl.ProcessorCallbackI
All Implemented Interfaces:
Ice.Object, Serializable, Cloneable, omero.grid._ProcessorCallbackOperations, omero.grid._ProcessorCallbackOperationsNC, omero.grid.ProcessorCallback

public class ProcessorCallbackI
extends omero.grid._ProcessorCallbackDisp

Callback used to lookup active processors via IceStorm.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class omero.grid._ProcessorCallbackDisp
__ids
 
Constructor Summary
ProcessorCallbackI(ServiceFactoryI sf)
          Simplified constructor used to see if any usermode processor is active for either the current group or the current user.
ProcessorCallbackI(ServiceFactoryI sf, ResultHolder<String> holder, omero.model.Job job)
          Primary constructor.
 
Method Summary
 omero.grid.ProcessorPrx activateAndWait(Ice.Current current)
          Generates a UUID-based Identity with the category of PROCESSORCALLBACK.value and then calls {@link #activateAndWait(Current, Ice.Identity).
 omero.grid.ProcessorPrx activateAndWait(Ice.Current current, Ice.Identity acceptId)
          Primary method which adds this instance to IceStorm, waits for a response from any active processor services, and finally unregister itself before returning the first processor instance which responded.
 void isAccepted(boolean accepted, String sessionUuid, String procConn, Ice.Current __current)
          Callback method called by the remote processor instance.
 void responseRunning(List<Long> jobIds, Ice.Current __current)
          Callback method which should not be called for this instance.
 
Methods inherited from class omero.grid._ProcessorCallbackDisp
___isAccepted, ___responseRunning, __dispatch, __read, __read, __write, __write, ice_copyStateFrom, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId, isAccepted, responseRunning
 
Methods inherited from class Ice.ObjectImpl
___ice_id, ___ice_ids, ___ice_isA, ___ice_ping, __checkMode, __collocDispatch, clone, ice_dispatch, ice_hash, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Ice.Object
__collocDispatch, clone, equals, ice_dispatch, ice_hash, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal
 

Constructor Detail

ProcessorCallbackI

public ProcessorCallbackI(ServiceFactoryI sf)
Simplified constructor used to see if any usermode processor is active for either the current group or the current user. Currently uses a hard-coded value of 5 seconds wait time. For more control, pass in a ResultHolder instance.


ProcessorCallbackI

public ProcessorCallbackI(ServiceFactoryI sf,
                          ResultHolder<String> holder,
                          omero.model.Job job)
Primary constructor. Asks processors if they will accept the given job for the current user and the current group.

Parameters:
sf - Cannot be null.
holder - Cannot be null.
job - Can be null.
Method Detail

activateAndWait

public omero.grid.ProcessorPrx activateAndWait(Ice.Current current)
                                        throws omero.ServerError
Generates a UUID-based Identity with the category of PROCESSORCALLBACK.value and then calls {@link #activateAndWait(Current, Ice.Identity).

Throws:
omero.ServerError

activateAndWait

public omero.grid.ProcessorPrx activateAndWait(Ice.Current current,
                                               Ice.Identity acceptId)
                                        throws omero.ServerError
Primary method which adds this instance to IceStorm, waits for a response from any active processor services, and finally unregister itself before returning the first processor instance which responded.

Parameters:
current -
acceptId -
Returns:
Throws:
omero.ServerError

isAccepted

public void isAccepted(boolean accepted,
                       String sessionUuid,
                       String procConn,
                       Ice.Current __current)
Callback method called by the remote processor instance.


responseRunning

public void responseRunning(List<Long> jobIds,
                            Ice.Current __current)
Callback method which should not be called for this instance.



OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.