GH-3194: Add generics to Amqp and Jms channel impls

Fixes https://github.com/spring-projects/spring-integration/issues/3194

For now we keep the hierarchy, but try to generalize channel specs
a bit, so that ones who use `publishSubscribeChannel` can count on
`BroadcastCapableChannel` as interface to utilize.
This commit is contained in:
Artem Vozhdayenko
2020-09-25 21:55:10 +03:00
committed by GitHub
parent a8430c12a6
commit d75dd095a3
9 changed files with 51 additions and 30 deletions

View File

@@ -83,6 +83,7 @@ import org.springframework.transaction.PlatformTransactionManager;
* @author Artem Bilan
* @author Gary Russell
* @author Nasko Vasilev
* @author Artem Vozhdayenko
*
* @since 5.0
*/
@@ -371,8 +372,7 @@ public class JmsTests extends ActiveMQMultiContextTests {
@Bean
public BroadcastCapableChannel jmsPublishSubscribeChannel() {
// TODO reconsider target generic type for channel implementation to return from this kind of specs
return (BroadcastCapableChannel) Jms.publishSubscribeChannel(jmsConnectionFactory())
return Jms.publishSubscribeChannel(jmsConnectionFactory())
.destination("pubsub")
.get();
}