1212
1313/**
1414 * A chain of PushHandlers that processes events in order.
15+ * <p>
1516 * Uses a context object for tracking the processed state.
17+ * </p>
1618 */
1719@ Internal
1820public final class PushConsumerChain implements PushConsumer {
@@ -37,13 +39,14 @@ public final class PushConsumerChain implements PushConsumer {
3739 context .setProcessed (false );
3840 };
3941
40-
4142 /**
42- * Handler that allows only pub/sub related events to be propagated to the client.
43+ * Handler that allows only pub/sub related events to be propagated to the client
44+ * <p>
4345 * Marks non-pub/sub events as processed, preventing their propagation.
46+ * </p>
4447 */
45- public static final PushConsumer PUBSUB_ONLY_HANDLER = new PushConsumer (){
46- final Set <String > pubSubCommands = new HashSet <>();
48+ public static final PushConsumer PUBSUB_ONLY_HANDLER = new PushConsumer () {
49+ final Set <String > pubSubCommands = new HashSet <>();
4750 {
4851 pubSubCommands .add ("message" );
4952 pubSubCommands .add ("pmessage" );
@@ -69,7 +72,6 @@ private boolean isPubSubType(String type) {
6972 }
7073 };
7174
72-
7375 /**
7476 * Create a new empty handler chain.
7577 */
@@ -79,7 +81,6 @@ public PushConsumerChain() {
7981
8082 /**
8183 * Create a chain with the specified handlers.
82- *
8384 * @param consumers The handlers to add to the chain
8485 */
8586 public PushConsumerChain (PushConsumer ... consumers ) {
@@ -88,7 +89,6 @@ public PushConsumerChain(PushConsumer... consumers) {
8889
8990 /**
9091 * Create a chain with a single handler.
91- *
9292 * @param handler The handler to include in the chain
9393 * @return A new handler chain with the specified handler
9494 */
@@ -98,7 +98,6 @@ public static PushConsumerChain of(PushConsumer handler) {
9898
9999 /**
100100 * Create a chain with the specified handlers.
101- *
102101 * @param handlers The handlers to add to the chain
103102 * @return A new handler chain with the specified handlers
104103 */
@@ -108,7 +107,6 @@ public static PushConsumerChain of(PushConsumer... handlers) {
108107
109108 /**
110109 * Add a handler to be executed after this chain.
111- *
112110 * @param handler The handler to add
113111 * @return A new chain with the handler added
114112 */
@@ -126,7 +124,6 @@ public PushConsumerChain then(PushConsumer handler) {
126124
127125 /**
128126 * Add a handler to the end of the chain.
129- *
130127 * @param handler The handler to add
131128 * @return this chain for method chaining
132129 */
@@ -139,7 +136,6 @@ public PushConsumerChain add(PushConsumer handler) {
139136
140137 /**
141138 * Insert a handler at the specified position.
142- *
143139 * @param index The position to insert at (0-based)
144140 * @param handler The handler to insert
145141 * @return this chain for method chaining
@@ -153,7 +149,6 @@ public PushConsumerChain insert(int index, PushConsumer handler) {
153149
154150 /**
155151 * Remove a handler from the chain.
156- *
157152 * @param handler The handler to remove
158153 * @return true if the handler was removed
159154 */
@@ -163,7 +158,6 @@ public boolean remove(PushConsumer handler) {
163158
164159 /**
165160 * Remove the handler at the specified position.
166- *
167161 * @param index The position to remove from (0-based)
168162 * @return The removed handler
169163 */
@@ -173,7 +167,6 @@ public PushConsumer removeAt(int index) {
173167
174168 /**
175169 * Get the handler at the specified position.
176- *
177170 * @param index The position to get (0-based)
178171 * @return The handler at that position
179172 */
@@ -183,7 +176,6 @@ public PushConsumer get(int index) {
183176
184177 /**
185178 * Get the number of handlers in the chain.
186- *
187179 * @return The number of handlers
188180 */
189181 public int size () {
0 commit comments