|
22 | 22 | import io.openmessaging.consumer.PushConsumer; |
23 | 23 | import io.openmessaging.consumer.StreamingConsumer; |
24 | 24 | import io.openmessaging.exception.OMSRuntimeException; |
25 | | -import io.openmessaging.observer.Observer; |
26 | 25 | import io.openmessaging.producer.Producer; |
27 | 26 | import java.util.List; |
28 | 27 |
|
29 | 28 | /** |
30 | | - * The {@code MessagingAccessPoint} obtained from {@link MessagingAccessPointFactory} is capable of creating {@code |
| 29 | + * The {@code MessagingAccessPoint} obtained from {@link OMS} is capable of creating {@code |
31 | 30 | * Producer}, {@code Consumer}, {@code ServiceEndPoint}, and so on. <p> For example: |
32 | 31 | * <pre> |
33 | 32 | * MessagingAccessPoint messagingAccessPoint = MessagingAccessPointFactory.getMessagingAccessPoint("openmessaging:rocketmq://localhost:10911/namespace"); |
34 | 33 | * Producer producer = messagingAccessPoint.createProducer(); |
35 | | - * producer.send(producer.createTopicBytesMessage("HELLO_TOPIC", "HELLO_BODY".getBytes(Charset.forName("UTF-8")))); |
| 34 | + * producer.send(producer.createQueueBytesMessage("HELLO_QUEUE", "HELLO_BODY".getBytes(Charset.forName("UTF-8")))); |
36 | 35 | * </pre> |
37 | 36 | * |
38 | 37 | * @version OMS 1.0 |
@@ -158,30 +157,30 @@ public interface MessagingAccessPoint extends ServiceLifecycle { |
158 | 157 | ResourceManager getResourceManager(); |
159 | 158 |
|
160 | 159 | /** |
161 | | - * Register an observer in an serviceEndPoint object. Whenever serviceEndPoint object publish or bind an service |
162 | | - * object, it will be notified to the list of observer object registered before |
| 160 | + * Returns the {@code Producer} list created by the specified {@code MessagingAccessPoint} |
163 | 161 | * |
164 | | - * @param observer observer event object to an serviceEndPoint object |
| 162 | + * @return the producer list |
165 | 163 | */ |
166 | | - void addObserver(Observer observer); |
| 164 | + List<Producer> producers(); |
167 | 165 |
|
168 | 166 | /** |
169 | | - * Removes the given observer from the list of observer |
170 | | - * <p> |
171 | | - * If the given observer has not been previously registered (i.e. it was |
172 | | - * never added) then this method call is a no-op. If it had been previously |
173 | | - * added then it will be removed. If it had been added more than once, then |
174 | | - * only the first occurrence will be removed. |
| 167 | + * Returns the {@code PushConsumer} list created by the specified {@code MessagingAccessPoint} |
175 | 168 | * |
176 | | - * @param observer The observer to remove |
| 169 | + * @return the push consumer list |
177 | 170 | */ |
178 | | - void removeObserver(Observer observer); |
179 | | - |
180 | | - List<Producer> producers(); |
181 | | - |
182 | 171 | List<PushConsumer> pushConsumers(); |
183 | 172 |
|
| 173 | + /** |
| 174 | + * Returns the {@code StreamingConsumer} list created by the specified {@code MessagingAccessPoint} |
| 175 | + * |
| 176 | + * @return the streaming consumer list |
| 177 | + */ |
184 | 178 | List<StreamingConsumer> streamingConsumers(); |
185 | 179 |
|
| 180 | + /** |
| 181 | + * Returns the {@code PullConsumer} list created by the specified {@code MessagingAccessPoint} |
| 182 | + * |
| 183 | + * @return the pull consumer list |
| 184 | + */ |
186 | 185 | List<PullConsumer> pullConsumers(); |
187 | 186 | } |
0 commit comments