Permalink
Browse files

PaymentService renamed to PaymentGateway

  • Loading branch information...
krasserm committed Aug 11, 2012
1 parent 7e30c86 commit 1cabe8da038bffbeaa2335973077e589f92488c2
@@ -43,10 +43,10 @@ object Appserver {
val invoiceService = new InvoiceService(invoicesRef, invoiceComponent)
val statisticsService = new StatisticsService(statisticsRef)
val paymentService = system.actorOf(Props(new PaymentService(invoiceComponent)))
val paymentGateway = system.actorOf(Props(new PaymentGateway(invoiceComponent)))
listenersComponent
.addDefaultOutputChannelToActor("payment", paymentService)
.addDefaultOutputChannelToActor("payment", paymentGateway)
.setProcessors(outputChannels => List(
system.actorOf(Props(new StatisticsProcessor(statisticsRef))),
system.actorOf(Props(new PaymentProcess(outputChannels)))))
@@ -22,9 +22,9 @@ import org.eligosource.eventsourced.core._
import org.eligosource.eventsourced.example.domain._
/**
* Payment service that interacts with customer to request payment (mocked).
* Payment gateway that interacts with customer to request payment (mocked).
*/
class PaymentService(invoiceComponent: Component) extends Actor {
class PaymentGateway(invoiceComponent: Component) extends Actor {
implicit val executor = context.system.dispatcher
def receive = {
@@ -35,8 +35,6 @@ class PaymentService(invoiceComponent: Component) extends Actor {
// because payments may take several days to arrive ...
Future { invoiceComponent.inputChannel ! Message(InvoicePaymentReceived(invoiceId, amount)) }
// here we assume that an external payment service will
// retry notifying us should this app be not available
}
}
}

0 comments on commit 1cabe8d

Please sign in to comment.