org.apache.wsrp4j.consumer.driver
Class GenericProducerRegistryImpl

java.lang.Object
  extended byorg.apache.wsrp4j.consumer.driver.GenericProducerRegistryImpl
All Implemented Interfaces:
ProducerRegistry

public abstract class GenericProducerRegistryImpl
extends java.lang.Object
implements ProducerRegistry


Constructor Summary
GenericProducerRegistryImpl()
           
 
Method Summary
 void addProducer(Producer producer)
          Add a producer to the registry
 boolean existsProducer(java.lang.String id)
          Check if a producer with the given ID exists in the registry.
 java.util.Iterator getAllProducers()
          Get all producer in the registry
 Producer getProducer(java.lang.String id)
          Get the producer for the given URL
 void removeAllProducers()
          Remove all producer objects from the registry
 Producer removeProducer(java.lang.String id)
          Remove the producer with the given ID from the registry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericProducerRegistryImpl

public GenericProducerRegistryImpl()
Method Detail

addProducer

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

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

getProducer

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

Specified by:
getProducer in interface ProducerRegistry
Parameters:
id - The ID of the producer
Returns:
The producer with the given ID

getAllProducers

public java.util.Iterator getAllProducers()
Get all producer in the registry

Specified by:
getAllProducers in interface ProducerRegistry
Returns:
Iterator with all producers

removeProducer

public Producer removeProducer(java.lang.String id)
Remove the producer with the given ID from the registry

Specified by:
removeProducer in interface ProducerRegistry
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()
Remove all producer objects from the registry

Specified by:
removeAllProducers in interface ProducerRegistry

existsProducer

public boolean existsProducer(java.lang.String id)
Check if a producer with the given ID exists in the registry.

Specified by:
existsProducer in interface ProducerRegistry
Parameters:
id - The ID of the producer
Returns:
True if producer exists with this ID