org.apache.muse.core
Interface Persistence
- All Superinterfaces:
- InitializationParameters
- All Known Subinterfaces:
- NotificationProducerPersistence, RouterPersistence, ServiceGroupPersistence
- All Known Implementing Classes:
- AbstractFilePersistence, NotificationProducerFilePersistence, RouterFilePersistence, ServiceGroupFilePersistence
public interface Persistence
- extends InitializationParameters
Persistence is a mechanism used by resources and/or capabilities to save
some or all of their state across application reboots. Concrete persistence
classes provide the means for storage (file, database, etc.) as well as
the logic to determine what content is stored. Note that this interface
only describes how the persistence class should reload its data - not how
it should initially find and save this data.
Peristence implementations are usually specified with the persistence
element in muse.xml. This element allows users to specify the persistence
location (the semantics of which are implementation-specific) and the concrete
class that implements this interface.
- Author:
- Dan Jemiolo (danj)
getPersistenceLocation
String getPersistenceLocation()
- Returns:
- The value specified in muse.xml under the persistence
element. The semantics of this value are dependent on the type
of storage used by the implementation class. As an example, a
simple file-based persistence class might interpret the location
to be the directory where files are stored; a database-oriented
class might interpret it as the JNDI URI for the database.
getResourceManager
ResourceManager getResourceManager()
- Returns:
- The ResourceManager that stores all of the resource type
definitions and all current resource instances.
reload
void reload()
throws SoapFault
- Reads any data that was persisted by the class back into memory and
provides it to the proper components (resource or capability). This
method is normally called during the initialization of said components,
before any requests are handled by the application.
- Throws:
SoapFault
setPersistenceLocation
void setPersistenceLocation(String location)
setResourceManager
void setResourceManager(ResourceManager manager)
Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.