ome.api
Interface StatefulServiceInterface

All Superinterfaces:
ServiceInterface
All Known Subinterfaces:
JobHandle, RawFileStore, RawPixelsStore, RenderingEngine, Search, ThumbnailStore
All Known Implementing Classes:
AbstractStatefulBean, JobBean, RawFileBean, RawPixelsBean, RenderingBean, SearchBean, ThumbnailBean

public interface StatefulServiceInterface
extends ServiceInterface

OMERO API Interface with stateful semantics. As of 4.0, each stateful service is responsible for providing its own passivation/activation logic in the similarly named methods.

Since:
OME3.0
Version:
1.0 (Internal version: $Revision: 3303 $ $Date: 2009-01-15 14:53:43 +0000 (Thu, 15 Jan 2009) $)
Author:

Josh Moore      josh.moore@gmx.de

Method Summary
 void activate()
          Completely restore this service for active use from whatever passivation it has implemented.
 void close()
          signals the end of the service lifecycle.
 EventContext getCurrentEventContext()
          Returns the current EventContext for this instance.
 void passivate()
          Perform whatever passivation is possible or throw an exception.
 

Method Detail

passivate

void passivate()
Perform whatever passivation is possible or throw an exception. A good passivation method will free up as much memory as possible, most likely by storing it to disk. A call to passivate should be safe even if the service is already passivated.


activate

void activate()
Completely restore this service for active use from whatever passivation it has implemented. A call to activate should be safe even if the service is already activated.


close

void close()
signals the end of the service lifecycle. Resources such as Sessions can be released. All further calls will throw an exception.


getCurrentEventContext

EventContext getCurrentEventContext()
Returns the current EventContext for this instance. This is useful for later identifying changes made by this Event.



OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

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