View Javadoc
1   package org.nhindirect.gateway.streams;
2   
3   import org.nhindirect.common.mail.SMTPMailMessage;
4   import org.nhindirect.common.mail.streams.SMTPMailMessageConverter;
5   import org.springframework.beans.factory.annotation.Autowired;
6   import org.springframework.beans.factory.annotation.Qualifier;
7   import org.springframework.cloud.stream.annotation.EnableBinding;
8   import org.springframework.cloud.stream.annotation.Output;
9   import org.springframework.messaging.MessageChannel;
10  
11  @EnableBinding(STAPostProcessOutput.class)
12  public class STAPostProcessSource
13  {
14  	@Autowired
15  	@Qualifier(STAPostProcessOutput.STA_POST_PROCESS_OUTPUT)
16  	private MessageChannel postProcessChannel;
17  	
18  	@Output(STAPostProcessOutput.STA_POST_PROCESS_OUTPUT)
19  	public <T> void staPostProcess(SMTPMailMessage msg) 
20  	{
21  		this.postProcessChannel.send(SMTPMailMessageConverter.toStreamMessage(msg));
22  	}
23  }