org.apache.wsrp4j.consumer
Interface ProducerRegistry

All Known Implementing Classes:
GenericProducerRegistryImpl

public interface ProducerRegistry

Defines a registry which can be used to administer producer objects.

Author:
Stephan Laertz

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
 

Method Detail

addProducer

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

Parameters:
producer - The producer to add

getProducer

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

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

Returns:
Iterator with all producers

removeProducer

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

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


existsProducer

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

Parameters:
id - The ID of the producer
Returns:
True if producer exists with this ID