|
22 | 22 |
|
23 | 23 | import com.rabbitmq.client.AlreadyClosedException; |
24 | 24 | import com.rabbitmq.client.Command; |
| 25 | +import com.rabbitmq.client.Method; |
25 | 26 | import com.rabbitmq.client.Connection; |
26 | 27 | import com.rabbitmq.client.ShutdownSignalException; |
27 | 28 | import com.rabbitmq.utility.BlockingValueOrException; |
28 | 29 |
|
29 | 30 | /** |
30 | | - * Base class modelling an AMQ channel. Subclasses implement close() |
31 | | - * and processAsync(), and may choose to override |
32 | | - * processShutdownSignal(). |
| 31 | + * Base class modelling an AMQ channel. Subclasses implement {@link #close()} |
| 32 | + * and {@link #processAsync()}, and may choose to override |
| 33 | + * {@link processShutdownSignal()} and {@link rpc()}. |
33 | 34 | * |
34 | 35 | * @see ChannelN |
35 | 36 | * @see Connection |
@@ -122,7 +123,7 @@ public AMQCommand exnWrappingRpc(Method m) |
122 | 123 | throws IOException |
123 | 124 | { |
124 | 125 | try { |
125 | | - return rpc(m); |
| 126 | + return privateRpc(m); |
126 | 127 | } catch (AlreadyClosedException ace) { |
127 | 128 | // Do not wrap it since it means that connection/channel |
128 | 129 | // was closed in some action in the past |
@@ -183,12 +184,18 @@ public void ensureIsOpen() |
183 | 184 | } |
184 | 185 |
|
185 | 186 | /** |
186 | | - * Protected API - sends a Command to the broker and waits for the |
187 | | - * next inbound Command from the broker: only for use from |
| 187 | + * Protected API - sends a {@link Method} to the broker and waits for the |
| 188 | + * next in-bound Command from the broker: only for use from |
188 | 189 | * non-connection-MainLoop threads! |
189 | 190 | */ |
190 | 191 | public AMQCommand rpc(Method m) |
191 | 192 | throws IOException, ShutdownSignalException |
| 193 | + { |
| 194 | + return privateRpc(m); |
| 195 | + } |
| 196 | + |
| 197 | + private AMQCommand privateRpc(Method m) |
| 198 | + throws IOException, ShutdownSignalException |
192 | 199 | { |
193 | 200 | SimpleBlockingRpcContinuation k = new SimpleBlockingRpcContinuation(); |
194 | 201 | rpc(m, k); |
|
0 commit comments