org.cocome.tradingsystem.cashdeskline.cashdesk.application.impl
Class ApplicationEventHandlerImpl

java.lang.Object
  extended by org.cocome.tradingsystem.cashdeskline.cashdesk.application.impl.ApplicationEventHandlerImpl
All Implemented Interfaces:
javax.jms.MessageListener, ApplicationEventHandlerIf

public class ApplicationEventHandlerImpl
extends java.lang.Object
implements javax.jms.MessageListener, ApplicationEventHandlerIf

Implementation of the ApplicationEventHandler

Author:
Yannick Welsch

Constructor Summary
ApplicationEventHandlerImpl(java.lang.String registryurl, int port, java.lang.String bankName, java.lang.String topicName, java.lang.String storeName)
           
 
Method Summary
 void onEvent(CashAmountEnteredEvent cashAmountEnteredEvent)
          Event handler for CashAmountEnteredEvent events.
 void onEvent(CashBoxClosedEvent cashBoxClosedEvent)
          Event handler for CashBoxClosedEvent events.
 void onEvent(CreditCardScannedEvent creditCardScannedEvent)
          Event handler for CreditCardScannedEvent events.
 void onEvent(ExpressModeDisabledEvent expressModeDisabledEvent)
          Event handler for ExpressModeEnabledEvent events.
 void onEvent(ExpressModeEnabledEvent expressModeEnabledEvent)
          Event handler for ExpressModeEnabledEvent events.
 void onEvent(PaymentModeEvent paymentModeEvent)
          Event handler for PaymentModeEvent events.
 void onEvent(PINEnteredEvent pinEnteredEvent)
          Event handler for PINEnteredEvent events.
 void onEvent(ProductBarcodeScannedEvent productBarcodeScannedEvent)
          Event handler for ProductBarcodeScannedEvent events.
 void onEvent(SaleFinishedEvent saleFinishedEvent)
          Event handler for SaleFinishedEvent events.
 void onEvent(SaleStartedEvent saleStartedEvent)
          Event handler for SaleStartedEvent events.
 void onMessage(javax.jms.Message message)
          This method is called by the channel if an event has been published.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationEventHandlerImpl

public ApplicationEventHandlerImpl(java.lang.String registryurl,
                                   int port,
                                   java.lang.String bankName,
                                   java.lang.String topicName,
                                   java.lang.String storeName)
Method Detail

onMessage

public void onMessage(javax.jms.Message message)
This method is called by the channel if an event has been published. The medhod then unmarshalls the message and calls the appropriate local event handler methods.

Specified by:
onMessage in interface javax.jms.MessageListener

onEvent

public void onEvent(SaleStartedEvent saleStartedEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for SaleStartedEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(ProductBarcodeScannedEvent productBarcodeScannedEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for ProductBarcodeScannedEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(SaleFinishedEvent saleFinishedEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for SaleFinishedEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(CashAmountEnteredEvent cashAmountEnteredEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for CashAmountEnteredEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(CashBoxClosedEvent cashBoxClosedEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for CashBoxClosedEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(CreditCardScannedEvent creditCardScannedEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for CreditCardScannedEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(PINEnteredEvent pinEnteredEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for PINEnteredEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(ExpressModeEnabledEvent expressModeEnabledEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for ExpressModeEnabledEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(PaymentModeEvent paymentModeEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for PaymentModeEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf

onEvent

public void onEvent(ExpressModeDisabledEvent expressModeDisabledEvent)
Description copied from interface: ApplicationEventHandlerIf
Event handler for ExpressModeEnabledEvent events.

Specified by:
onEvent in interface ApplicationEventHandlerIf