55
66import org .apache .activemq .broker .region .Queue ;
77import org .springframework .messaging .Message ;
8- import org .springframework .messaging .MessageHandler ;
98import org .springframework .messaging .MessageHeaders ;
109
1110/**
@@ -73,27 +72,26 @@ public interface Integration {
7372 * Subscribes to the default simple channel. The subscriber will be listening to the channel and polling it for new
7473 * messages in an interval of time configured with the property "integration.one-direction.poller.rate"
7574 *
76- * @param messageHandler the {@link MessageHandler } in charge of managing each received {@link Message}
75+ * @param messageHandler the {@link SubscriptionHandler } in charge of managing each received {@link Message}
7776 */
78- void subscribe (MessageHandler messageHandler );
77+ void subscribe (SubscriptionHandler messageHandler );
7978
8079 /**
8180 * Subscribes to the default asynchronous request-reply channel. The subscriber will be listening to the channel and
82- * will generate a response with the {@link IntegrationHandler }.
81+ * will generate a response with the {@link RequestAsyncHandler }.
8382 *
84- * @param handler the {@link IntegrationHandler } in charge of managing each received {@link Message} and provide an
83+ * @param handler the {@link RequestAsyncHandler } in charge of managing each received {@link Message} and provide an
8584 * asynchronous response
8685 */
87- void subscribeAsync (IntegrationHandler handler );
86+ void subscribeAsync (RequestAsyncHandler handler );
8887
8988 /**
9089 * Subscribes to the default request-reply channel. The subscriber will be listening to the channel and will generate
91- * a response with the {@link IntegrationHandler }.
90+ * a response with the {@link RequestHandler }.
9291 *
93- * @param handler the {@link IntegrationHandler} in charge of managing each received {@link Message} and return a
94- * response
92+ * @param handler the {@link RequestHandler} in charge of managing each received {@link Message} and return a response
9593 */
96- void subscribeAndReply (IntegrationHandler handler );
94+ void subscribeAndReply (RequestHandler handler );
9795
9896 // Implementation for new created Channels
9997
@@ -103,42 +101,41 @@ public interface Integration {
103101 *
104102 * @param channelName the {@link IntegrationChannel} to be subscribed to
105103 * @param queueName the {@link Queue} to be listening to
106- * @param messageHandler the {@link MessageHandler } handler to manage each received message
104+ * @param messageHandler the {@link SubscriptionHandler } handler to manage each received message
107105 */
108- void subscribeTo (String channelName , String queueName , MessageHandler messageHandler );
106+ void subscribeTo (String channelName , String queueName , SubscriptionHandler messageHandler );
109107
110108 /**
111109 * Subscribes to a new simple channel, no response is sent. The subscriber will be listening to the channel and
112110 * polling it for new messages.
113111 *
114112 * @param channelName the {@link IntegrationChannel} to be subscribed to
115113 * @param queueName the {@link Queue} to be listening to
116- * @param messageHandler the {@link MessageHandler } handler to manage each received message
114+ * @param messageHandler the {@link SubscriptionHandler } handler to manage each received message
117115 * @param pollRate the time interval for making the poll to the message broker to check new messages
118116 */
119- void subscribeTo (String channelName , String queueName , MessageHandler messageHandler , long pollRate );
117+ void subscribeTo (String channelName , String queueName , SubscriptionHandler messageHandler , long pollRate );
120118
121119 /**
122120 * Subscribes to a new request-reply channel. The subscriber will be listening to the channel for new messages and
123121 * creating a response for each one with the {@link IntegrationHandler}.
124122 *
125123 * @param channelName channelName the {@link IntegrationChannel} to be subscribed to
126124 * @param queueName queueName the {@link Queue} to be listening to
127- * @param handler the {@link IntegrationHandler} in charge of managing each received {@link Message} and return a
128- * response
125+ * @param handler the {@link RequestHandler} in charge of managing each received {@link Message} and return a response
129126 */
130- void subscribeAndReplyTo (String channelName , String queueName , IntegrationHandler handler );
127+ void subscribeAndReplyTo (String channelName , String queueName , RequestHandler handler );
131128
132129 /**
133130 * Subscribes to a new asynchronous request-reply channel. The subscriber will be listening to the channel for new
134131 * messages and creating a response for each one with the {@link IntegrationHandler}.
135132 *
136133 * @param channelName channelName the {@link IntegrationChannel} to be subscribed to
137134 * @param queueName queueName the {@link Queue} to be listening to
138- * @param handler the {@link IntegrationHandler } in charge of managing each received {@link Message} and return a
135+ * @param handler the {@link RequestAsyncHandler } in charge of managing each received {@link Message} and return a
139136 * response
140137 */
141- void subscribeAndReplyAsyncTo (String channelName , String queueName , IntegrationHandler handler );
138+ void subscribeAndReplyAsyncTo (String channelName , String queueName , RequestAsyncHandler handler );
142139
143140 /**
144141 * Creates a new simple {@link IntegrationChannel}
@@ -155,46 +152,46 @@ public interface Integration {
155152 *
156153 * @param channelName name for the new {@link IntegrationChannel}
157154 * @param queueName name for the new {@link Queue}
158- * @param messageHandler the {@link MessageHandler } handler to manage each received response
155+ * @param responseHandler the {@link ResponseHandler } handler to manage each received response
159156 * @return the new {@link IntegrationChannel}
160157 */
161- IntegrationChannel createRequestReplyChannel (String channelName , String queueName , MessageHandler messageHandler );
158+ IntegrationChannel createRequestReplyChannel (String channelName , String queueName , ResponseHandler responseHandler );
162159
163160 /**
164161 * Creates a new request-reply {@link IntegrationChannel}.
165162 *
166163 * @param channelName name for the new {@link IntegrationChannel}
167164 * @param queueName name for the new {@link Queue}
168- * @param messageHandler the {@link MessageHandler } handler to manage each received response
165+ * @param responseHandler the {@link ResponseHandler } handler to manage each received response
169166 * @param receiveTimeout the waiting time for a response after sending a {@link Message}
170167 * @return the new {@link IntegrationChannel}
171168 */
172- IntegrationChannel createRequestReplyChannel (String channelName , String queueName , MessageHandler messageHandler ,
169+ IntegrationChannel createRequestReplyChannel (String channelName , String queueName , ResponseHandler responseHandler ,
173170 long receiveTimeout );
174171
175172 /**
176173 * Creates a new asynchronous request-reply {@link IntegrationChannel}. The core pool size for the asynchronous task
177174 * executor is configured with the property "integration.default.poolsize".
178- *
175+ *
179176 * @param channelName name for the new {@link IntegrationChannel}
180177 * @param queueName name for the new {@link Queue}
181- * @param messageHandler the {@link MessageHandler } handler to manage each received response
178+ * @param responseHandler the {@link ResponseHandler } handler to manage each received response
182179 * @return the new {@link IntegrationChannel}
183180 */
184181 IntegrationChannel createAsyncRequestReplyChannel (String channelName , String queueName ,
185- MessageHandler messageHandler );
182+ ResponseHandler responseHandler );
186183
187184 /**
188185 * Creates a new asynchronous request-reply {@link IntegrationChannel}.
189186 *
190187 * @param channelName name for the new {@link IntegrationChannel}
191188 * @param queueName name for the new {@link Queue}
192- * @param messageHandler the {@link MessageHandler } handler to manage each received response
189+ * @param responseHandler the {@link ResponseHandler } handler to manage each received response
193190 * @param poolSize ThreadPoolExecutor's core pool size
194191 * @param receiveTimeout the waiting time for a response after sending a {@link Message}
195192 * @return the new {@link IntegrationChannel}
196193 */
197- IntegrationChannel createAsyncRequestReplyChannel (String channelName , String queueName , MessageHandler messageHandler ,
198- int poolSize , long receiveTimeout );
194+ IntegrationChannel createAsyncRequestReplyChannel (String channelName , String queueName ,
195+ ResponseHandler responseHandler , int poolSize , long receiveTimeout );
199196
200197}
0 commit comments