org.apache.wsrp4j.consumer.driver
Class GenericPersistentProducerRegistryImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.GenericProducerRegistryImpl
      extended byorg.apache.wsrp4j.consumer.driver.GenericPersistentProducerRegistryImpl
All Implemented Interfaces:
ProducerRegistry, StateChangedListener
Direct Known Subclasses:
ProducerRegistryImpl

public class GenericPersistentProducerRegistryImpl
extends GenericProducerRegistryImpl
implements StateChangedListener

A producer registry with persistence

Version:
$Id: GenericPersistentProducerRegistryImpl.java,v 1.5 2005/08/10 14:51:44 cziegeler Exp $
Author:
Stephan Laertz

Field Summary
private  HandleGenerator handleGenerator
           
protected  PersistentDataObject persistentDataObject
           
protected  PersistentHandler persistentHandler
           
 
Fields inherited from class org.apache.wsrp4j.consumer.driver.GenericProducerRegistryImpl
 
Constructor Summary
GenericPersistentProducerRegistryImpl()
           
 
Method Summary
 void addProducer(Producer producer)
          Add a producer to the registry
private  void delete(Producer producer)
          Delete the given producer from persistent store
 void removeAllProducers()
          Remove all producer objects from the registry
 Producer removeProducer(java.lang.String id)
          Get the producer for the given URL
 void restore()
          Restores all available producers from persistent file store
 void stateChanged(StateChangedEvent event)
           
 void store(Producer producer)
          Store a new producer to persistent store
 
Methods inherited from class org.apache.wsrp4j.consumer.driver.GenericProducerRegistryImpl
existsProducer, getAllProducers, getProducer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

persistentDataObject

protected PersistentDataObject persistentDataObject

persistentHandler

protected PersistentHandler persistentHandler

handleGenerator

private HandleGenerator handleGenerator
Constructor Detail

GenericPersistentProducerRegistryImpl

public GenericPersistentProducerRegistryImpl()
Method Detail

addProducer

public void addProducer(Producer producer)
Add a producer to the registry

Specified by:
addProducer in interface ProducerRegistry
Overrides:
addProducer in class GenericProducerRegistryImpl
Parameters:
producer - The producer to add

removeProducer

public Producer removeProducer(java.lang.String id)
Get the producer for the given URL

Specified by:
removeProducer in interface ProducerRegistry
Overrides:
removeProducer in class GenericProducerRegistryImpl
Parameters:
id - The ID of the producer
Returns:
The producer which had been mapped to this id or null if no producer was found with this id

removeAllProducers

public void removeAllProducers()
Description copied from class: GenericProducerRegistryImpl
Remove all producer objects from the registry

Specified by:
removeAllProducers in interface ProducerRegistry
Overrides:
removeAllProducers in class GenericProducerRegistryImpl

stateChanged

public void stateChanged(StateChangedEvent event)
Specified by:
stateChanged in interface StateChangedListener

restore

public void restore()
             throws WSRPException
Restores all available producers from persistent file store

Throws:
WSRPException

store

public void store(Producer producer)
           throws WSRPException
Store a new producer to persistent store

Parameters:
producer -
Throws:
WSRPException

delete

private void delete(Producer producer)
Delete the given producer from persistent store

Parameters:
producer -


--