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