Package ome.services.blitz.impl
Class AbstractAmdServant
- java.lang.Object
-
- ome.services.blitz.impl.AbstractAmdServant
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
AbstractCloseableAmdServant
,AdminI
,ConfigI
,ContainerI
,LdapI
,MetadataI
,PixelsI
,ProcessorCallbackI
,ProjectionI
,QueryI
,RenderingSettingsI
,RepositoryInfoI
,RoiI
,ScriptI
,ScriptProcessI
,SessionI
,ShareI
,TimelineI
,TypesI
,UpdateI
public abstract class AbstractAmdServant extends java.lang.Object implements org.springframework.context.ApplicationContextAware
throttled
implementation base class which can be used by_ServiceInterfaceOperations
implementors and injected into a tie servant.- Since:
- 3.0-Beta4
-
-
Field Summary
Fields Modifier and Type Field Description protected BlitzExecutor
be
protected ome.system.OmeroContext
ctx
protected ServantHolder
holder
protected IceMethodInvoker
invoker
If a service is provided, then an invoker will be created to cache all of its methods.protected org.slf4j.Logger
log
protected ome.api.ServiceInterface
service
If there is no undering ome.* service, then this value can be null.
-
Constructor Summary
Constructors Constructor Description AbstractAmdServant(ome.api.ServiceInterface service, BlitzExecutor be)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate_async(AMD_StatefulServiceInterface_activate __cb, Ice.Current __current)
void
applyHardWiredInterceptors(java.util.List<ome.logic.HardWiredInterceptor> cptors, AopContextInitializer initializer)
Applies the hard-wired intercepting to this instance.void
callInvokerOnMappedArgs(IceMapper mapper, java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)
void
callInvokerOnRawArgs(java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)
void
executorWorkCall(ome.services.util.Executor.Work work)
void
getCurrentEventContext_async(AMD_StatefulServiceInterface_getCurrentEventContext __cb, Ice.Current __current)
void
onSetOmeroContext(ome.system.OmeroContext context)
To be overridden by subclasses.void
passivate_async(AMD_StatefulServiceInterface_passivate __cb, Ice.Current __current)
void
runnableCall(Ice.Current __current, Task r)
<R> void
safeRunnableCall(Ice.Current __current, java.lang.Object cb, boolean isVoid, java.util.concurrent.Callable<R> callable)
void
setApplicationContext(org.springframework.context.ApplicationContext ctx)
Creates anIceMethodInvoker
for this instance ifservice
is non-null.void
setHolder(ServantHolder holder)
Sets theServantHolder
for the current session so that onAbstractCloseableAmdServant.close_async(AMD_StatefulServiceInterface_close, Current)
it will be possible to cleanup the resources.
-
-
-
Field Detail
-
log
protected final org.slf4j.Logger log
-
be
protected final BlitzExecutor be
-
service
protected ome.api.ServiceInterface service
If there is no undering ome.* service, then this value can be null.
-
invoker
protected IceMethodInvoker invoker
If a service is provided, then an invoker will be created to cache all of its methods.
-
ctx
protected ome.system.OmeroContext ctx
-
holder
protected ServantHolder holder
-
-
Constructor Detail
-
AbstractAmdServant
public AbstractAmdServant(ome.api.ServiceInterface service, BlitzExecutor be)
-
-
Method Detail
-
setHolder
public void setHolder(ServantHolder holder)
Sets theServantHolder
for the current session so that onAbstractCloseableAmdServant.close_async(AMD_StatefulServiceInterface_close, Current)
it will be possible to cleanup the resources.- Parameters:
holder
-
-
setApplicationContext
public final void setApplicationContext(org.springframework.context.ApplicationContext ctx) throws org.springframework.beans.BeansException
Creates anIceMethodInvoker
for this instance ifservice
is non-null. Otherwise gives subclasses a chance to use theOmeroContext
viaonSetOmeroContext(OmeroContext)
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
onSetOmeroContext
public void onSetOmeroContext(ome.system.OmeroContext context) throws java.lang.Exception
To be overridden by subclasses.- Throws:
java.lang.Exception
-
applyHardWiredInterceptors
public final void applyHardWiredInterceptors(java.util.List<ome.logic.HardWiredInterceptor> cptors, AopContextInitializer initializer)
Applies the hard-wired intercepting to this instance. It is not possible to configure hard-wired interceptors in Spring, instead they must be passed in at runtime from a properly compiled class.
-
callInvokerOnRawArgs
public final void callInvokerOnRawArgs(java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)
-
callInvokerOnMappedArgs
public final void callInvokerOnMappedArgs(IceMapper mapper, java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)
-
runnableCall
public final void runnableCall(Ice.Current __current, Task r)
-
safeRunnableCall
public final <R> void safeRunnableCall(Ice.Current __current, java.lang.Object cb, boolean isVoid, java.util.concurrent.Callable<R> callable)
-
executorWorkCall
public final void executorWorkCall(ome.services.util.Executor.Work work)
-
activate_async
public final void activate_async(AMD_StatefulServiceInterface_activate __cb, Ice.Current __current)
-
passivate_async
public final void passivate_async(AMD_StatefulServiceInterface_passivate __cb, Ice.Current __current)
-
getCurrentEventContext_async
public final void getCurrentEventContext_async(AMD_StatefulServiceInterface_getCurrentEventContext __cb, Ice.Current __current) throws ServerError
- Throws:
ServerError
-
-