Package ome.services.blitz.impl
Class AbstractCloseableAmdServant
- java.lang.Object
-
- ome.services.blitz.impl.AbstractAmdServant
-
- ome.services.blitz.impl.AbstractCloseableAmdServant
-
- All Implemented Interfaces:
CloseableServant
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
AbstractPyramidServant
,ExporterI
,JobHandleI
,ManagedImportProcessI
,MetadataStoreI
,RawFileStoreI
,SearchI
,SharedResourcesI
,TableCloserI
,ThumbnailStoreI
public abstract class AbstractCloseableAmdServant extends AbstractAmdServant implements CloseableServant
Base class for all servants that must guarantee proper clean-up of held resources on close.- Since:
- 4.4.9
-
-
Constructor Summary
Constructors Constructor Description AbstractCloseableAmdServant(ome.api.ServiceInterface service, BlitzExecutor be)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close(Ice.Current __current)
void
close_async(AMD_StatefulServiceInterface_close __cb, Ice.Current __current)
SessionHandler
also specially catches close() calls, but cannot remove the servant from theObjectAdapter
and thereby prevent any further communication.protected abstract void
postClose(Ice.Current current)
Should not throw any exceptions which should be detected by clients since it is called in a finally block after the client thread has been released.protected abstract void
preClose(Ice.Current current)
-
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
-
AbstractCloseableAmdServant
public AbstractCloseableAmdServant(ome.api.ServiceInterface service, BlitzExecutor be)
-
-
Method Detail
-
close
public final void close(Ice.Current __current)
- Specified by:
close
in interfaceCloseableServant
-
close_async
public final void close_async(AMD_StatefulServiceInterface_close __cb, Ice.Current __current)
SessionHandler
also specially catches close() calls, but cannot remove the servant from theObjectAdapter
and thereby prevent any further communication. Once the invocation is finished, though, it is possible to raise the message and have the servant cleaned up.- See Also:
- ticket:1855
-
preClose
protected abstract void preClose(Ice.Current current) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
postClose
protected abstract void postClose(Ice.Current current)
Should not throw any exceptions which should be detected by clients since it is called in a finally block after the client thread has been released.
-
-