org.exoplatform.services.wsrp.consumer
Interface ProducerRegistry

All Known Implementing Classes:
ProducerRegistryImpl

public interface ProducerRegistry

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

Author:
Stephan Laertz, Benjamin Mestrallet

Method Summary
 void addProducer(Producer producer)
          Add a producer to the registry
 Producer createProducerInstance()
          Create a new producer instance according to the implementation
 boolean existsProducer(String id)
          Check if a producer with the given ID exists in the registry.
 Iterator<Producer> getAllProducers()
          Get all producer in the registry
 long getLastModifiedTime()
          Get the last time that a producer is added or removed
 Producer getProducer(String id)
          Get the producer for the given URL
 void removeAllProducers()
          Remove all producer objects from the registry
 Producer removeProducer(String id)
          Remove the producer with the given ID from the registry
 

Method Detail

addProducer

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

Parameters:
producer - The producer to add

getProducer

Producer getProducer(String id)
Get the producer for the given URL

Parameters:
id - The ID of the producer
Returns:
The producer with the given ID

getAllProducers

Iterator<Producer> getAllProducers()
Get all producer in the registry

Returns:
Iterator with all producers

removeProducer

Producer removeProducer(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

void removeAllProducers()
                        throws Exception
Remove all producer objects from the registry

Throws:
Exception

existsProducer

boolean existsProducer(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

createProducerInstance

Producer createProducerInstance()
Create a new producer instance according to the implementation

Returns:
return a new Producer instance

getLastModifiedTime

long getLastModifiedTime()
Get the last time that a producer is added or removed

Returns:
return long value


Copyright © 2009 eXo Platform SAS. All Rights Reserved.