public class DefaultTerminalListener extends Object implements TerminalListener
Default implementation of listener for asynchronous terminal events.
Implements methods to call DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
and DefaultTerminalListener.printReceipts(com.six.timapi.Terminal, com.six.timapi.PrintData)
as convenience call.
Subclasses usually only overwrite DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
and DefaultTerminalListener.printReceipts(com.six.timapi.Terminal, com.six.timapi.PrintData)
.
If you overwrite methods inherited from TerminalListener
make sure to
super call to still get DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
and DefaultTerminalListener.printReceipts(com.six.timapi.Terminal, com.six.timapi.PrintData)
called.
Constructor and Description |
---|
DefaultTerminalListener() |
public void connectCompleted(TimEvent event)
Terminal.connect()
started request finished.connectCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void activateCompleted(TimEvent event, ActivateResponse data)
Terminal.activateAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.activateCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains activation sequence counter and print information for the merchant.public void applicationInformationCompleted(TimEvent event)
Terminal.applicationInformationAsync()
started
request finished. If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.applicationInformationCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void balanceCompleted(TimEvent event, BalanceResponse data)
Terminal.balanceAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.balanceCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains counters and print information for the merchant.public void changeSettingsCompleted(TimEvent event)
Terminal.changeSettingsAsync(java.util.Map<com.six.timapi.constants.SettingType, java.lang.String>)
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.changeSettingsCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void commitCompleted(TimEvent event, PrintData data)
Terminal.commitAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.commitCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void counterRequestCompleted(TimEvent event, Counters data)
Terminal.counterRequestAsync(com.six.timapi.constants.CounterType)
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.counterRequestCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains counters.public void deactivateCompleted(TimEvent event, DeactivateResponse data)
Terminal.deactivateAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.deactivateCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains counters and print information for the merchant.public void dccRatesCompleted(TimEvent event, PrintData data)
Terminal.dccRatesAsync()
started request finished.
If not implemented invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.dccRatesCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains print information for merchant.public void hardwareInformationCompleted(TimEvent event, HardwareInformationResponse data)
Terminal.hardwareInformationAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.hardwareInformationCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains information about EFT Terminal hardware and EMV kernels and configuration
parameters supported by the EFT Terminal.public void initTransactionCompleted(TimEvent event, CardData data)
Terminal.initTransactionAsync(boolean, com.six.timapi.Amount)
started request finished.initTransactionCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void loginCompleted(TimEvent event)
Terminal.loginAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.loginCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void logoutCompleted(TimEvent event)
Terminal.logoutAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.logoutCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void rebootCompleted(TimEvent event)
Terminal.rebootAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.rebootCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void reconciliationCompleted(TimEvent event, ReconciliationResponse data)
Terminal.reconciliationAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.reconciliationCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains counters and print information for the merchant.public void receiptRequestCompleted(TimEvent event, ReceiptRequestResponse data)
Terminal.receiptRequestAsync(com.six.timapi.constants.ReceiptRequestType)
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.receiptRequestCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains all requested receipts up to a maximum number of receipts the EFT Terminal
can send. if HasMoreReceipts is True not all receipts could be send by the EFT
Terminal. call ReceiptRequest again to obtain more receipts.public void reconfigCompleted(TimEvent event, PrintData data)
Terminal.reconfigAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.reconfigCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains print information for the merchant.public void rollbackCompleted(TimEvent event, PrintData data)
Terminal.rollbackAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.rollbackCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains print information for the merchant and cardholder.public void softwareUpdateCompleted(TimEvent event, UpdateStatus data)
Terminal.softwareUpdateAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.softwareUpdateCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains update status.public void systemInformationCompleted(TimEvent event, SystemInformationResponse data)
Terminal.systemInformationAsync()
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.systemInformationCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains configuration and network information of the terminal.public void transactionCompleted(TimEvent event, TransactionResponse data)
Terminal.transactionAsync(com.six.timapi.constants.TransactionType, com.six.timapi.Amount)
started request finished.
If not overwritten invokes DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.transactionCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains transaction result information and print information for the merchant and cardholder.public void terminalStatusChanged(Terminal terminal)
terminalStatusChanged
in interface TerminalListener
terminal
- Terminal sending the notification.public void disconnected(Terminal terminal, TimException exception)
disconnected
in interface TerminalListener
terminal
- Terminal sending the notification.public void printReceipts(Terminal terminal, PrintData printData)
Terminal.getReceiptFormatter()
is used to create final receipts for printing.
The following request completed methods contain receipts send to this method:
DefaultTerminalListener.activateCompleted(com.six.timapi.TimEvent, com.six.timapi.ActivateResponse)
DefaultTerminalListener.balanceCompleted(com.six.timapi.TimEvent, com.six.timapi.BalanceResponse)
DefaultTerminalListener.deactivateCompleted(com.six.timapi.TimEvent, com.six.timapi.DeactivateResponse)
DefaultTerminalListener.dccRatesCompleted(com.six.timapi.TimEvent, com.six.timapi.PrintData)
DefaultTerminalListener.receiptRequestCompleted(com.six.timapi.TimEvent, com.six.timapi.ReceiptRequestResponse)
DefaultTerminalListener.reconciliationCompleted(com.six.timapi.TimEvent, com.six.timapi.ReconciliationResponse)
DefaultTerminalListener.reconfigCompleted(com.six.timapi.TimEvent, com.six.timapi.PrintData)
DefaultTerminalListener.rollbackCompleted(com.six.timapi.TimEvent, com.six.timapi.PrintData)
DefaultTerminalListener.transactionCompleted(com.six.timapi.TimEvent, com.six.timapi.TransactionResponse)
DefaultTerminalListener.printReceipts(com.six.timapi.Terminal, com.six.timapi.PrintData)
is called before DefaultTerminalListener.requestCompleted(com.six.timapi.TimEvent, java.lang.Object)
.terminal
- Terminal receiving the receipts.printData
- Print data containing receipts to print.public void requestCompleted(TimEvent event, Object data)
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains additional request specific data. Can be None-Value if the request in
question does not support any additional data. Cast to the matching type to use.
Use event.getRequestType() to determine the type of request.public String toString()
public void closeReaderCompleted(TimEvent event)
Terminal.closeReaderAsync()
started request finished.
Supported only if Guides.UNATTENDED
is enabled.closeReaderCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void openReaderCompleted(TimEvent event)
Terminal.openReaderAsync()
started request finished.
Supported only if Guides.UNATTENDED
is enabled.openReaderCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void ejectCardCompleted(TimEvent event)
Terminal.ejectCardAsync()
started request finished.
Supported only if Guides.UNATTENDED
is enabled.ejectCardCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void openMaintenanceWindowCompleted(TimEvent event)
Terminal.openMaintenanceWindowAsync()
started request finished.
Supported only if Guides.UNATTENDED
is enabled.openMaintenanceWindowCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void closeMaintenanceWindowCompleted(TimEvent event)
Terminal.closeMaintenanceWindowAsync()
started request finished.
Supported only if Guides.UNATTENDED
is enabled.closeMaintenanceWindowCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void activateServiceMenuCompleted(TimEvent event)
Terminal.activateServiceMenuAsync()
started request finished.
Supported only if Guides.UNATTENDED
is enabled.activateServiceMenuCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void openDialogModeCompleted(TimEvent event)
Terminal.openDialogModeAsync()
started request finished.
Supported only if Guides.DIALOG
is enabled.openDialogModeCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void closeDialogModeCompleted(TimEvent event)
Terminal.closeDialogModeAsync()
started request finished.
Supported only if Guides.DIALOG
is enabled.closeDialogModeCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void showSignatureCaptureCompleted(TimEvent event, ShowSignatureCaptureResponse data)
Terminal.showSignatureCaptureAsync(com.six.timapi.ShowSignatureCaptureRequest)
started request finished.
Supported only if Guides.DIALOG
is enabled.showSignatureCaptureCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void showDialogCompleted(TimEvent event, ShowDialogResponse data)
Terminal.showDialogAsync(com.six.timapi.ShowDialogRequest)
started request finished.
Supported only if Guides.DIALOG
is enabled.showDialogCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void sendCardCommandCompleted(TimEvent event, List<CommandResponse> data)
Terminal.sendCardCommand(List)
started request finished.
Supported only if Guides.DIALOG
is enabled.sendCardCommandCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void balanceInquiryCompleted(TimEvent event, BalanceInquiryResponse data)
Terminal.balanceInquiryAsync()
started request finished.
Supported only if Guides.ADVANCED_RETAIL
is enabled.balanceInquiryCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.public void requestAliasCompleted(TimEvent event, String data)
Terminal#requestAlias()
started request finished.requestAliasCompleted
in interface TerminalListener
event
- Contains the terminal sending the event and error information if the request failed.