[INT-1129] Refactor MessageChannelTemplate and gateway classes Created: 06/May/10  Updated: 03/Sep/10  Resolved: 02/Sep/10

Status: Closed
Project: Spring Integration
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0 M7

Type: Refactoring Priority: Minor
Reporter: Mark Fisher Assignee: Mark Fisher
Resolution: Complete Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Related
is related to INT-1227 Refactor AbstractReplyProducingMessag... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
INT-1299 Define MessagingOperations interface Sub-task Closed Mark Fisher  
INT-1300 Add channel resolution capabilities t... Sub-task Closed Mark Fisher  
INT-1301 MessagingTemplate send methods should... Sub-task Closed Mark Fisher  
INT-1303 refactor AbstractReplyProducingMessag... Sub-task Closed Mark Fisher  
INT-1304 remove ChannelResolver reference from... Sub-task Closed Mark Fisher  
INT-1306 replace AbstractMessagingGateway with... Sub-task Closed Mark Fisher  
INT-1411 add AsyncMessagingTemplate and AsyncM... Sub-task Closed Mark Fisher  

 Description   

We might want to simplify the AbstractMessagingGateway to rely more upon the MessageChannelTemplate (and we might want to rename it to "MessagingGatewaySupport"?).

To be consistent with other template (e.g. JMS), it would actually make sense to have the methods that accept Objects within the template (rather than requiring Messages), i.e. we could have the equivalent of "sendAndConvert" but delegating to MessageMapper implementations (inbound for send, outbound for receive) instead.



 Comments   
Comment by Mark Fisher [ 25/Jul/10 ]

We should rename the template (big change, but this is 2.0 and therefore a good chance to get it right) to "MessagingTemplate". We should also create a "MessagingOperations" interface. The convertAndSend/receiveAndConvert methods should all be moved to the template. All of this will make it much more consistent with other Spring templates (such as JmsTemplate and AmqpTemplate).

Comment by Mark Fisher [ 27/Jul/10 ]

Also (another big change), for the sake of consistency (see JMS Template) we should probably use: send(channel, message) as opposed to send(message, channel).

Comment by Mark Fisher [ 28/Jul/10 ]

A major part of this has now been done (for M6), but there are a few things remaining:

1) define a MessageOperations interface (in 'core') with all the send/receive methods of MessagingTemplate
2) add ChannelResolver-awareness to MessagingTemplate and then add convertAndSend/receiveAndConvert methods
3) Refactor "gateway" classes to use MessagingTemplate directly as necessary (potentially removing the AbstractMessagingGateway/SimpleMessagingGateway and instead providing just convenient template access in MessagingGatewaySupport)

I will create sub-tasks for those.

Generated at Tue Oct 22 21:49:10 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.