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.ApplicationContextAwarethrottledimplementation base class which can be used by_ServiceInterfaceOperationsimplementors and injected into a tie servant.- Since:
- 3.0-Beta4
-
-
Field Summary
Fields Modifier and Type Field Description protected BlitzExecutorbeprotected ome.system.OmeroContextctxprotected ServantHolderholderprotected IceMethodInvokerinvokerIf a service is provided, then an invoker will be created to cache all of its methods.protected org.slf4j.Loggerlogprotected ome.api.ServiceInterfaceserviceIf 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 voidactivate_async(AMD_StatefulServiceInterface_activate __cb, Ice.Current __current)voidapplyHardWiredInterceptors(java.util.List<ome.logic.HardWiredInterceptor> cptors, AopContextInitializer initializer)Applies the hard-wired intercepting to this instance.voidcallInvokerOnMappedArgs(IceMapper mapper, java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)voidcallInvokerOnRawArgs(java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)voidexecutorWorkCall(ome.services.util.Executor.Work work)voidgetCurrentEventContext_async(AMD_StatefulServiceInterface_getCurrentEventContext __cb, Ice.Current __current)voidonSetOmeroContext(ome.system.OmeroContext context)To be overridden by subclasses.voidpassivate_async(AMD_StatefulServiceInterface_passivate __cb, Ice.Current __current)voidrunnableCall(Ice.Current __current, Task r)<R> voidsafeRunnableCall(Ice.Current __current, java.lang.Object cb, boolean isVoid, java.util.concurrent.Callable<R> callable)voidsetApplicationContext(org.springframework.context.ApplicationContext ctx)Creates anIceMethodInvokerfor this instance ifserviceis non-null.voidsetHolder(ServantHolder holder)Sets theServantHolderfor 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 theServantHolderfor 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.BeansExceptionCreates anIceMethodInvokerfor this instance ifserviceis non-null. Otherwise gives subclasses a chance to use theOmeroContextviaonSetOmeroContext(OmeroContext)- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
onSetOmeroContext
public void onSetOmeroContext(ome.system.OmeroContext context) throws java.lang.ExceptionTo 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
-
-