Package ome.services.blitz.impl
Class ProcessorCallbackI
- java.lang.Object
-
- ome.services.blitz.impl.AbstractAmdServant
-
- ome.services.blitz.impl.ProcessorCallbackI
-
- All Implemented Interfaces:
_ProcessorCallbackOperations
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class ProcessorCallbackI extends AbstractAmdServant implements _ProcessorCallbackOperations
Callback used to lookup active processors via IceStorm.
-
-
Field Summary
-
Fields inherited from class ome.services.blitz.impl.AbstractAmdServant
be, ctx, invoker, service
-
-
Constructor Summary
Constructors Constructor Description 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<ProcessorPrx> holder, Job job)
Primary constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ProcessorPrx
activateAndWait(Ice.Current current)
Generates a UUID-basedIdentity
with the category ofPROCESSORCALLBACK.value
and then callsactivateAndWait(Current, Ice.Identity)
.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.int
getResponses()
Return the number of times this instance has been called in a thread safe manner.void
isAccepted(boolean accepted, java.lang.String sessionUuid, java.lang.String procConn, Ice.Current __current)
Deprecated.void
isProxyAccepted(boolean accepted, java.lang.String sessionUuid, ProcessorPrx procProxy, Ice.Current __current)
Callback method called by the remote processor instance.void
responseRunning(java.util.List<java.lang.Long> jobIds, Ice.Current __current)
Callback method which should not be called for this instance.-
Methods inherited from class ome.services.blitz.impl.AbstractAmdServant
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
-
-
-
-
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 aResultHolder
instance.
-
ProcessorCallbackI
public ProcessorCallbackI(ServiceFactoryI sf, ResultHolder<ProcessorPrx> holder, 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
-
getResponses
public int getResponses()
Return the number of times this instance has been called in a thread safe manner.- Returns:
- See above.
-
activateAndWait
public ProcessorPrx activateAndWait(Ice.Current current) throws ServerError
Generates a UUID-basedIdentity
with the category ofPROCESSORCALLBACK.value
and then callsactivateAndWait(Current, Ice.Identity)
.- Returns:
- See above.
- Throws:
ServerError
-
activateAndWait
public ProcessorPrx activateAndWait(Ice.Current current, Ice.Identity acceptId) throws 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:
- See above.
- Throws:
ServerError
-
isAccepted
@Deprecated public void isAccepted(boolean accepted, java.lang.String sessionUuid, java.lang.String procConn, Ice.Current __current)
Deprecated.Callback method called by the remote processor instance. See ticket 8266 for reasons this method should not be used.- Specified by:
isAccepted
in interface_ProcessorCallbackOperations
-
isProxyAccepted
public void isProxyAccepted(boolean accepted, java.lang.String sessionUuid, ProcessorPrx procProxy, Ice.Current __current)
Callback method called by the remote processor instance.- Specified by:
isProxyAccepted
in interface_ProcessorCallbackOperations
-
responseRunning
public void responseRunning(java.util.List<java.lang.Long> jobIds, Ice.Current __current)
Callback method which should not be called for this instance.- Specified by:
responseRunning
in interface_ProcessorCallbackOperations
-
-