You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2022/11/28 09:48:01 UTC

[pulsar-client-reactive] branch main updated: Add javadoc to ReactiveMessagePipeline (#35)

This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-reactive.git


The following commit(s) were added to refs/heads/main by this push:
     new 39726d5  Add javadoc to ReactiveMessagePipeline (#35)
39726d5 is described below

commit 39726d52398b9b02ec89fce8f97127b6ad5622c0
Author: Christophe Bornet <cb...@hotmail.com>
AuthorDate: Mon Nov 28 10:47:56 2022 +0100

    Add javadoc to ReactiveMessagePipeline (#35)
---
 .../client/api/ReactiveMessagePipeline.java        | 26 ++++++++++++++++++++++
 .../api/DefaultReactiveMessagePipeline.java        |  5 -----
 2 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/api/ReactiveMessagePipeline.java b/pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/api/ReactiveMessagePipeline.java
index 88f8ac7..8f499df 100644
--- a/pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/api/ReactiveMessagePipeline.java
+++ b/pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/api/ReactiveMessagePipeline.java
@@ -16,12 +16,38 @@
 
 package org.apache.pulsar.reactive.client.api;
 
+/**
+ * Reactive message pipeline interface.
+ *
+ * @author Lari Hotari
+ * @author Christophe Bornet
+ */
 public interface ReactiveMessagePipeline extends AutoCloseable {
 
+	/**
+	 * Starts the reactive pipeline.
+	 * @return the pipeline
+	 */
 	ReactiveMessagePipeline start();
 
+	/**
+	 * Stops the reactive pipeline.
+	 * @return the reactive pipeline
+	 */
 	ReactiveMessagePipeline stop();
 
+	/**
+	 * Gets whether the reactive pipeline is running.
+	 * @return true if the reactive pipeline is running
+	 */
 	boolean isRunning();
 
+	/**
+	 * Closes the reactive pipeline.
+	 * @throws Exception if an error occurs
+	 */
+	default void close() throws Exception {
+		stop();
+	}
+
 }
diff --git a/pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/internal/api/DefaultReactiveMessagePipeline.java b/pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/internal/api/DefaultReactiveMessagePipeline.java
index c094628..90b7d2b 100644
--- a/pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/internal/api/DefaultReactiveMessagePipeline.java
+++ b/pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/internal/api/DefaultReactiveMessagePipeline.java
@@ -191,9 +191,4 @@ class DefaultReactiveMessagePipeline<T> implements ReactiveMessagePipeline {
 		return this.killSwitch.get() != null;
 	}
 
-	@Override
-	public void close() throws Exception {
-		stop();
-	}
-
 }