KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > consumer > ProducerRegistry


1 package org.exoplatform.services.wsrp.consumer;
2
3 import java.util.Iterator JavaDoc;
4
5 /**
6  * Defines a registry which can be used to administer
7  * producer objects.
8  *
9  * @author Stephan Laertz
10  * @author Benjamin Mestrallet
11  */

12 public interface ProducerRegistry {
13
14   /**
15    * Add a producer to the registry
16    *
17    * @param producer The producer to add
18    */

19   public void addProducer(Producer producer);
20
21   /**
22    * Get the producer for the given URL
23    *
24    * @param id The ID of the producer
25    * @return The producer with the given ID
26    */

27   public Producer getProducer(String JavaDoc id);
28
29   /**
30    * Get all producer in the registry
31    *
32    * @return Iterator with all producers
33    */

34   public Iterator JavaDoc getAllProducers();
35
36   /**
37    * Remove the producer with the given ID from the registry
38    *
39    * @param id The ID of the producer
40    * @return The producer which had been mapped to this id or
41    * null if no producer was found with this id
42    */

43   public Producer removeProducer(String JavaDoc id);
44
45   /**
46    * Remove all producer objects from the registry
47    */

48   public void removeAllProducers() throws Exception JavaDoc ;
49
50   /**
51    * Check if a producer with the given ID exists in the registry.
52    *
53    * @param id The ID of the producer
54    * @return True if producer exists with this ID
55    */

56   public boolean existsProducer(String JavaDoc id);
57
58   /**
59    * Create a new producer instance according to the implementation
60    *
61    * @return return a new Producer instance
62    */

63   public Producer createProducerInstance() ;
64
65   /**
66    * Get the last time that a producer is added or removed
67    *
68    * @return return long value
69    */

70   public long getLastModifiedTime() ;
71 }
72
Popular Tags