org.cocome.tradingsystem.cashdeskline.cashdesk.gui.impl
Class GUIEventHandlerImpl

java.lang.Object
  extended by org.cocome.tradingsystem.cashdeskline.cashdesk.gui.impl.GUIEventHandlerImpl
All Implemented Interfaces:
javax.jms.MessageListener, GUIEventHandlerIf

public class GUIEventHandlerImpl
extends java.lang.Object
implements javax.jms.MessageListener, GUIEventHandlerIf

Implementation of the CashDeskGUI component

Author:
Yannick Welsch

Constructor Summary
GUIEventHandlerImpl(java.lang.String eventchannel, CashDeskGUI gui)
           
 
Method Summary
 void onEvent(CashAmountEnteredEvent moneyAmountEnteredEvent)
           
 void onEvent(ChangeAmountCalculatedEvent changeAmountCalculatedEvent)
           
 void onEvent(CreditCardScanFailedEvent creditCardScanFailedEvent)
           
 void onEvent(ExpressModeDisabledEvent expressModeDisabledEvent)
           
 void onEvent(ExpressModeEnabledEvent expressModeEnabledEvent)
           
 void onEvent(InvalidCreditCardEvent invalidCreditCardEvent)
           
 void onEvent(ProductBarcodeNotValidEvent productBarcodeNotValidEvent)
           
 void onEvent(RunningTotalChangedEvent runningTotalChangedEvent)
           
 void onEvent(SaleStartedEvent saleStartedEvent)
           
 void onEvent(SaleSuccessEvent saleSuccessEvent)
           
 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

GUIEventHandlerImpl

public GUIEventHandlerImpl(java.lang.String eventchannel,
                           CashDeskGUI gui)
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(RunningTotalChangedEvent runningTotalChangedEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(CashAmountEnteredEvent moneyAmountEnteredEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(ChangeAmountCalculatedEvent changeAmountCalculatedEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(ExpressModeDisabledEvent expressModeDisabledEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(ExpressModeEnabledEvent expressModeEnabledEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(InvalidCreditCardEvent invalidCreditCardEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(CreditCardScanFailedEvent creditCardScanFailedEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(ProductBarcodeNotValidEvent productBarcodeNotValidEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(SaleSuccessEvent saleSuccessEvent)
Specified by:
onEvent in interface GUIEventHandlerIf

onEvent

public void onEvent(SaleStartedEvent saleStartedEvent)
Specified by:
onEvent in interface GUIEventHandlerIf