|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.ecs.iam.grid.client.staterepos.AbstractStateRepository
public abstract class AbstractStateRepository
A state repository is a database of conversations. New Conversation objects are created by the StateRepository, which typically stores them in a persistant database. You can use a subclass of AbstractStateRepository to store your Conversation objects.
| Field Summary | |
|---|---|
protected org.apache.log4j.Logger |
log
|
| Constructor Summary | |
|---|---|
AbstractStateRepository()
|
|
| Method Summary | ||
|---|---|---|
void |
addListener(StateRepositoryListener listener)
Add a listener which will receive RespositoryChangedEvents. |
|
void |
addObject(StorableInStateRepository object)
Add this object to the repository. |
|
protected abstract void |
addObjectInternal(StorableInStateRepository object)
|
|
void |
checkForUpdates()
Ensure that the repository is up-to-date. |
|
protected abstract void |
deleteConversation(Conversation conversation)
Remove conversation from the StateRepository. |
|
abstract void |
dump()
For debugging |
|
Conversation[] |
getAccountConversations()
Deprecated. |
|
abstract StorableInStateRepository[] |
getAll()
Returns all items in the state repository |
|
abstract StorableInStateRepository[] |
getByParent(URL parentID)
Returns a list of all children of the given conversation. |
|
abstract Conversation |
getConversationByID(URL cid)
Returns the Conversation object corresponding to the given URL. |
|
|
getOrCreateObject(Class<T> type,
org.apache.axis.message.addressing.EndpointReferenceType EPR)
Get the existing object with this EPR's ID. |
|
StorableInStateRepository |
getOrCreateObject(org.apache.axis.message.addressing.EndpointReferenceType EPR)
Get the existing object with this EPR's ID. |
|
|
instantiateObject(Class<T> type,
org.apache.axis.message.addressing.EndpointReferenceType EPR)
Convenience wrapper for instantiateObject that sets the type in the EPR first. |
|
StorableInStateRepository |
instantiateObject(org.apache.axis.message.addressing.EndpointReferenceType EPR)
Create a new object, in the same way that the StateRepository does when loading saved instances. |
|
void |
notifyChanged(StorableInStateRepository object)
Deprecated. |
|
void |
notifyChanged(StorableInStateRepository object,
RepositoryChangedEventType eventType)
Notify listeners that this object has changed. |
|
protected abstract void |
notifyChangedInternal(StorableInStateRepository object)
|
|
protected void |
notifyListeners(StorableInStateRepository object)
Deprecated. The RepositoryChangedEvent should have an RepositoryChangedEventType |
|
protected void |
notifyListeners(StorableInStateRepository object,
RepositoryChangedEventType eventType)
Send a RepositoryChangedEvent with Type RepositoryChangedEventType to every listener registered with
addListener. |
|
void |
removeListener(StateRepositoryListener listener)
Remove a listener previously added with addListener(). |
|
void |
removeObject(StorableInStateRepository object)
Remove conversation from the StateRepository. |
|
protected abstract void |
removeObjectInternal(StorableInStateRepository object)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uk.ac.soton.ecs.iam.grid.comms.client.StateRepository |
|---|
getConversationsByType, getObject, getProperty, getToplevel, setProperty |
| Field Detail |
|---|
protected org.apache.log4j.Logger log
| Constructor Detail |
|---|
public AbstractStateRepository()
| Method Detail |
|---|
public abstract Conversation getConversationByID(URL cid)
throws NoSuchConversation
StateRepository
getConversationByID in interface StateRepositoryNoSuchConversation
public abstract StorableInStateRepository[] getByParent(URL parentID)
throws NoSuchConversation
StateRepository
getByParent in interface StateRepositoryNoSuchConversation
protected abstract void addObjectInternal(StorableInStateRepository object)
throws ObjectAlreadyExists
ObjectAlreadyExists
protected abstract void removeObjectInternal(StorableInStateRepository object)
throws NoSuchConversation
NoSuchConversationpublic abstract StorableInStateRepository[] getAll()
StateRepository
getAll in interface StateRepository@Deprecated public Conversation[] getAccountConversations()
StateRepository
getAccountConversations in interface StateRepositoryprotected abstract void notifyChangedInternal(StorableInStateRepository object)
public void removeObject(StorableInStateRepository object)
throws NoSuchConversation
removeObject in interface StateRepositoryNoSuchConversation - if the object is not in the repository.@Deprecated public void notifyChanged(StorableInStateRepository object)
StateRepository
notifyChanged in interface StateRepositoryobject - the object that changed, or null if changes are not limited to a specific object
public void notifyChanged(StorableInStateRepository object,
RepositoryChangedEventType eventType)
StateRepository
notifyChanged in interface StateRepositoryobject - the object that changed, or null if changes are not limited to a specific objecteventType - the type of event that has occured RepositoryChangedEventType
protected abstract void deleteConversation(Conversation conversation)
throws NoSuchConversation
NoSuchConversationpublic void addListener(StateRepositoryListener listener)
StateRepository
addListener in interface StateRepositorypublic void removeListener(StateRepositoryListener listener)
StateRepository
removeListener in interface StateRepository@Deprecated protected void notifyListeners(StorableInStateRepository object)
RepositoryChangedEvent to every listener registered with
addListener.
protected void notifyListeners(StorableInStateRepository object,
RepositoryChangedEventType eventType)
RepositoryChangedEvent with Type RepositoryChangedEventType to every listener registered with
addListener.
public void addObject(StorableInStateRepository object)
throws NoSuchConversation,
ObjectAlreadyExists
StateRepository
addObject in interface StateRepositoryNoSuchConversation - if the parent isn't in the repository
ObjectAlreadyExists - if an object with the URL is already present.public abstract void dump()
public void checkForUpdates()
StateRepository
checkForUpdates in interface StateRepository
public <T extends StorableInStateRepository> T instantiateObject(Class<T> type,
org.apache.axis.message.addressing.EndpointReferenceType EPR)
throws ObjectAlreadyExists
StateRepository
instantiateObject in interface StateRepositoryObjectAlreadyExists
public StorableInStateRepository instantiateObject(org.apache.axis.message.addressing.EndpointReferenceType EPR)
throws ObjectAlreadyExists
StateRepository
instantiateObject in interface StateRepositoryObjectAlreadyExists
public <T extends StorableInStateRepository> T getOrCreateObject(Class<T> type,
org.apache.axis.message.addressing.EndpointReferenceType EPR)
StateRepository
getOrCreateObject in interface StateRepositorytype - class of object's interfaceEPR - EPR for the object to find or create
StateRepository.instantiateObject(org.apache.axis.message.addressing.EndpointReferenceType),
StateRepository.getObject(java.net.URL)public StorableInStateRepository getOrCreateObject(org.apache.axis.message.addressing.EndpointReferenceType EPR)
StateRepository
getOrCreateObject in interface StateRepositoryEPR - EPR for the object to find or create
StateRepository.instantiateObject(org.apache.axis.message.addressing.EndpointReferenceType),
StateRepository.getObject(java.net.URL)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||