Skip to content

Commit 1eb6c3e

Browse files
author
gm2552
committed
Adding missing last mile delivery classes from previous checkin.
1 parent 946b1c8 commit 1eb6c3e

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package org.nhindirect.gateway.streams;
2+
3+
import org.springframework.cloud.stream.annotation.Output;
4+
import org.springframework.messaging.MessageChannel;
5+
6+
public interface STALastMileDeliveryOutput
7+
{
8+
public static final String STA_LAST_MILE_OUTPUT = "direct-sta-last-mile-output";
9+
10+
@Output(STA_LAST_MILE_OUTPUT)
11+
MessageChannel staLastMileOutput();
12+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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(STALastMileDeliveryOutput.class)
12+
public class STALastMileDeliverySource
13+
{
14+
@Autowired
15+
@Qualifier(STALastMileDeliveryOutput.STA_LAST_MILE_OUTPUT)
16+
private MessageChannel lastMileChannel;
17+
18+
@Output(STALastMileDeliveryOutput.STA_LAST_MILE_OUTPUT)
19+
public <T> void staLastMile(SMTPMailMessage msg)
20+
{
21+
this.lastMileChannel.send(SMTPMailMessageConverter.toStreamMessage(msg));
22+
}
23+
}

src/main/java/org/nhindirect/gateway/streams/processor/STAPostProcessProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.nhindirect.common.tx.model.TxDetail;
1717
import org.nhindirect.common.tx.model.TxDetailType;
1818
import org.nhindirect.common.tx.model.TxMessageType;
19-
import org.nhindirect.gateway.streams.STALastMileSource;
19+
import org.nhindirect.gateway.streams.STALastMileDeliverySource;
2020
import org.nhindirect.gateway.streams.STAPostProcessInput;
2121
import org.nhindirect.gateway.streams.SmtpRemoteDeliverySource;
2222
import org.nhindirect.gateway.streams.XDRemoteDeliverySource;
@@ -50,7 +50,7 @@ public class STAPostProcessProcessor
5050
protected XDRemoteDeliverySource xdRemoteDeliverySource;
5151

5252
@Autowired
53-
protected STALastMileSource lastMileSource;
53+
protected STALastMileDeliverySource lastMileSource;
5454

5555
@Autowired
5656
protected RoutingResolver routingResolver;

0 commit comments

Comments
 (0)