Class SynchronousTerminalListener
- java.lang.Object
-
- com.six.timapi.SynchronousTerminalListener
-
- All Implemented Interfaces:
TerminalListener
public class SynchronousTerminalListener extends Object implements TerminalListener
Helper class for handle synchronous method calls in the
Terminal
class. Used internally by theTerminal
instance to provide synchronous behavior. TimApi users can though use this class as base for their own synchronous use of the TimApi by using asynchronous function calls only. Provides the user with the ability to work also with intermediate completed request data in contrary to the synchronous method calls provided byTerminal
.The listener collects all response data received for all possible requests. The user can then examine those at a later time. The most recent request data is stored.
TimEvent
is not stored. Stores the last receivedTimException
.To use the listener call it like this:
SynchronousTerminalListener listener = new SynchronousTerminalListener(); listener.prepareWait(RequestType.TRANSACTION); // run action potentially completing straight away listener.waitForRequestCompleted(); // work with the result in listener
Warning! Do not use instances of this class as monitor. Instances of this class use themselves as monitor in different ways including notify/wait calls. Trying to use it as monitor can result in unpredictable behavior.
-
-
Constructor Summary
Constructors Constructor Description SynchronousTerminalListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateCompleted(TimEvent event, ActivateResponse data)
Called if anTerminal.activateAsync()
started request finished.void
activateServiceMenuCompleted(TimEvent event)
Called if anTerminal.activateServiceMenuAsync()
started request finished.void
ageCheckCompleted(TimEvent event, TransactionInformation data)
Called if anTerminal#ageCheckAsync()
started request finished.void
applicationInformationCompleted(TimEvent event)
Called if anTerminal.applicationInformationAsync()
started request finished.void
balanceCompleted(TimEvent event, BalanceResponse data)
Called if anTerminal.balanceAsync()
started request finished.void
balanceInquiryCompleted(TimEvent event, BalanceInquiryResponse data)
Called if anTerminal.balanceInquiryAsync()
started request finished.void
changeSettingsCompleted(TimEvent event)
Called if anTerminal.changeSettingsAsync(java.util.Map)
started request finished.void
clientIdentificationCompleted(TimEvent event, ClientIdentificationResponse data)
Called if anTerminal.clientIdentification()
orTerminal.clientIdentificationAsync()
started request finished.void
closeDialogModeCompleted(TimEvent event)
Called if anTerminal.closeDialogModeAsync()
started request finished.void
closeMaintenanceWindowCompleted(TimEvent event)
Called if anTerminal.closeMaintenanceWindowAsync()
started request finished.void
closeReaderCompleted(TimEvent event)
Called if anTerminal.closeReaderAsync()
started request finished.void
commitCompleted(TimEvent event, PrintData data)
Called if anTerminal.commitAsync()
started request finished.void
connectCompleted(TimEvent event)
Called if anTerminal.connect()
started request finished.void
counterRequestCompleted(TimEvent event, Counters data)
Called if anTerminal.counterRequestAsync(com.six.timapi.constants.CounterType)
started request finished.void
dccRatesCompleted(TimEvent event, PrintData data)
Called if anTerminal.dccRatesAsync()
started request finished.void
deactivateCompleted(TimEvent event, DeactivateResponse data)
Called if anTerminal.deactivateAsync()
started request finished.void
deferredAuth(Terminal terminal, TransactionResponse response)
Called if a Deferred Authorization Notification has been received.void
deviceMaintenanceCompleted(TimEvent event)
Called if anTerminal#deviceMaintenanceAsync()
started request finished.void
disconnected(Terminal terminal, TimException exception)
Connection to terminal closed.void
ejectCardCompleted(TimEvent event)
Called if anTerminal.ejectCardAsync()
started request finished.void
errorNotification(Terminal terminal, TimException error)
Called if a terminal send an Error Notification.void
finishCheckoutCompleted(TimEvent event, VasCheckoutInformation data)
Called if anTerminal.finishCheckoutAsync()
started request finished.ActivateResponse
getLastActivateResponse()
Last activate response or null if none.TransactionInformation
getLastAgeCheckResponse()
Last age check response or null if none.BalanceInquiryResponse
getLastBalanceInquiryResponse()
Last balance inquiry response or null if none.BalanceResponse
getLastBalanceResposne()
Last balance response or null if none.ClientIdentificationResponse
getLastClientIdentificationResponse()
Last client identification response or null if none.PrintData
getLastCommitResponse()
Last commit response or null if none.Counters
getLastCountersRequestResponse()
Last counters request response or null if none.PrintData
getLastDccRatesResponse()
Last dcc rates response or null if none.DeactivateResponse
getLastDeactivateResponse()
Last deactivate request response or null if none.TimException
getLastException()
Last received exception or null if none.VasCheckoutInformation
getLastFinishCheckoutResponse()
Last finish checkout response or null if none.HardwareInformationResponse
getLastHardwareInformationResponse()
Last hardware information response or null if none.CardData
getLastInitTransactionResponse()
Last init transaction response or null if none.InitTransactionResponse
getLastInitTransactionWithDialogResponse()
Last init transaction with dialog response or null if none.CardData
getLastLoyaltyDataResponse()
Last loyalty data response or null if none.List<MobileTopupValue>
getLastMobileTopupIssuerInfoResponse()
Last mobile topup issuer info response or null if none.MobileTopupData
getLastMobileTopupResponse()
Last mobile topup response or null if none.List<LoyaltyItem>
getLastProvideLoyaltyBasketResponse()
Last provide loyalty basket response or null if none.VasResult
getLastProvideVasResultResponse()
Last provide vas result response or null if none.ReceiptRequestResponse
getLastReceiptRequestResponse()
Last receipt request response or null if none.ReconciliationResponse
getLastReconciliationResponse()
Last reconciliation response or null if none.PrintData
getLastReconfigResponse()
Last reconfig response or null if none.String
getLastRequestAliasResponse()
Last request alias transaction response or null if none.PrintData
getLastRollbackResponse()
Last rollback response or null if none.List<CommandResponse>
getLastSendCardCommandResponse()
Last send card command response or null if none.ShowDialogResponse
getLastShowDialogResponse()
Last show dialog response or null if none.ShowSignatureCaptureResponse
getLastShowSignatureCaptureResponse()
Last show signature capture response or null if none.UpdateStatus
getLastSoftwareUpdateResponse()
Last software update response or null if none.SystemInformationResponse
getLastSystemInformationResponse()
Last system information response or null if none.TransactionInfoRequestResponse
getLastTransactionInfoRequestResponse()
TransactionResponse
getLastTransactionResponse()
Last transaction response or null if none.void
hardwareInformationCompleted(TimEvent event, HardwareInformationResponse data)
Called if anTerminal.hardwareInformationAsync()
started request finished.void
initTransactionCompleted(TimEvent event, CardData data)
Called if anTerminal.initTransactionAsync(boolean, Amount)
started request finished.void
initTransactionWithDialogCompleted(TimEvent event, InitTransactionResponse data)
Called if anTerminal#initTransactionWithDialogAsync(Amount, ShowDialogRequest)
started request finished.void
keyPressed(Terminal terminal, Reason reason)
Called if a Key Pressed Notification has been received.void
licenseChanged(Terminal terminal)
Called if a terminal send a LicenseChanged notification.void
loginCompleted(TimEvent event)
Called if anTerminal.loginAsync()
started request finished.void
logoutCompleted(TimEvent event)
Called if anTerminal.logoutAsync()
started request finished.void
loyaltyDataCompleted(TimEvent event, CardData data)
Called if anTerminal#loyaltyDataAsync()
started request finished.void
mobileTopupCompleted(TimEvent event, MobileTopupData data)
Called if anTerminal#mobileTopupAsync()
started request finished.void
mobileTopupIssuerInfoCompleted(TimEvent event, List<MobileTopupValue> data)
Called if anTerminal.mobileTopupIssuerInfoAsync()
started request finished.void
openDialogModeCompleted(TimEvent event)
Called if anTerminal.openDialogModeAsync()
started request finished.void
openMaintenanceWindowCompleted(TimEvent event)
Called if anTerminal.openMaintenanceWindowAsync()
started request finished.void
openReaderCompleted(TimEvent event)
Called if anTerminal.openReaderAsync()
started request finished.void
prepareWait(RequestType requestType)
Prepare for waiting for request to complete collecting received events.void
printOnTerminal(TimEvent event)
Called if anTerminal#printOnTerminalAsync()
started request finished.void
provideLoyaltyBasketCompleted(TimEvent event, List<LoyaltyItem> data)
Called if anTerminal#provideLoyaltyBasketAsync()
started request finished.void
provideVasResultCompleted(TimEvent event, VasResult data)
Called if anTerminal#provideVasResultAsync()
started request finished.void
rebootCompleted(TimEvent event)
Called if anTerminal.rebootAsync()
started request finished.void
receiptRequestCompleted(TimEvent event, ReceiptRequestResponse data)
Called if anTerminal.receiptRequestAsync(com.six.timapi.constants.ReceiptRequestType)
started request finished.void
reconciliationCompleted(TimEvent event, ReconciliationResponse data)
Called if anTerminal.reconciliationAsync()
started request finished.void
reconfigCompleted(TimEvent event, PrintData data)
Called if anTerminal.reconfigAsync()
started request finished.void
requestAliasCompleted(TimEvent event, String data)
Called if anTerminal#requestAlias()
started request finished.void
rollbackCompleted(TimEvent event, PrintData data)
Called if anTerminal.rollbackAsync()
started request finished.void
screenshot(Terminal terminal, ScreenshotInformation info)
Called if a Screenshot Notification has been received.void
sendCardCommandCompleted(TimEvent event, List<CommandResponse> data)
Called if anTerminal.sendCardCommand(List)
started request finished.void
showDialogCompleted(TimEvent event, ShowDialogResponse data)
Called if anTerminal.showDialogAsync(com.six.timapi.ShowDialogRequest)
started request finished.void
showSignatureCaptureCompleted(TimEvent event, ShowSignatureCaptureResponse data)
Called if anTerminal.showSignatureCaptureAsync(com.six.timapi.ShowSignatureCaptureRequest)
started request finished.void
softwareUpdateCompleted(TimEvent event, UpdateStatus data)
Called if anTerminal.softwareUpdateAsync()
started request finished.void
startCheckoutCompleted(TimEvent event)
Called if anTerminal.startCheckoutAsync()
started request finished.void
systemInformationCompleted(TimEvent event, SystemInformationResponse data)
Called if anTerminal.systemInformationAsync()
started request finished.void
terminalStatusChanged(Terminal terminal)
Called if the state of the terminal changed.void
thirdPartyAppData(Terminal terminal, ThirdPartyAppPayload data)
Called if an ThirdPartyAppData notification has been received.void
transactionCompleted(TimEvent event, TransactionResponse data)
Called if anTerminal.transactionAsync(com.six.timapi.constants.TransactionType, Amount)
orTerminal.transactionAsync(com.six.timapi.constants.TransactionType, TransactionRequest)
started request finished.void
transactionInfoRequestCompleted(TimEvent event, TransactionInfoRequestResponse data)
Called if anTerminal.transactionInfoRequestAsync()
started request finished.void
vasInfo(Terminal terminal, VasCheckoutInformation vasInfo)
Called if an VAS Information Notification has been received.void
waitForRequestCompleted()
Wait for request to complete collecting received events.
-
-
-
Method Detail
-
prepareWait
public void prepareWait(RequestType requestType)
Prepare for waiting for request to complete collecting received events. Has to be called beforewaitForRequestCompleted()
is called. Used to avoid lost completed response if action called beforewaitForRequestCompleted()
manages to complete beforewaitForRequestCompleted()
can be called.
-
waitForRequestCompleted
public void waitForRequestCompleted()
Wait for request to complete collecting received events. Blocks the calling thread until the request completes. Clears all stored responses before waiting for the request to complete.
-
getLastException
public TimException getLastException()
Last received exception or null if none.
-
getLastActivateResponse
public ActivateResponse getLastActivateResponse()
Last activate response or null if none.
-
getLastBalanceResposne
public BalanceResponse getLastBalanceResposne()
Last balance response or null if none.
-
getLastCommitResponse
public PrintData getLastCommitResponse()
Last commit response or null if none.
-
getLastCountersRequestResponse
public Counters getLastCountersRequestResponse()
Last counters request response or null if none.
-
getLastDeactivateResponse
public DeactivateResponse getLastDeactivateResponse()
Last deactivate request response or null if none.
-
getLastDccRatesResponse
public PrintData getLastDccRatesResponse()
Last dcc rates response or null if none.
-
getLastHardwareInformationResponse
public HardwareInformationResponse getLastHardwareInformationResponse()
Last hardware information response or null if none.
-
getLastReconciliationResponse
public ReconciliationResponse getLastReconciliationResponse()
Last reconciliation response or null if none.
-
getLastReceiptRequestResponse
public ReceiptRequestResponse getLastReceiptRequestResponse()
Last receipt request response or null if none.
-
getLastTransactionInfoRequestResponse
public TransactionInfoRequestResponse getLastTransactionInfoRequestResponse()
-
getLastReconfigResponse
public PrintData getLastReconfigResponse()
Last reconfig response or null if none.
-
getLastRollbackResponse
public PrintData getLastRollbackResponse()
Last rollback response or null if none.
-
getLastSoftwareUpdateResponse
public UpdateStatus getLastSoftwareUpdateResponse()
Last software update response or null if none.
-
getLastSystemInformationResponse
public SystemInformationResponse getLastSystemInformationResponse()
Last system information response or null if none.
-
getLastTransactionResponse
public TransactionResponse getLastTransactionResponse()
Last transaction response or null if none.
-
getLastShowSignatureCaptureResponse
public ShowSignatureCaptureResponse getLastShowSignatureCaptureResponse()
Last show signature capture response or null if none.
-
getLastShowDialogResponse
public ShowDialogResponse getLastShowDialogResponse()
Last show dialog response or null if none.
-
getLastSendCardCommandResponse
public List<CommandResponse> getLastSendCardCommandResponse()
Last send card command response or null if none.
-
getLastBalanceInquiryResponse
public BalanceInquiryResponse getLastBalanceInquiryResponse()
Last balance inquiry response or null if none.
-
getLastInitTransactionResponse
public CardData getLastInitTransactionResponse()
Last init transaction response or null if none.
-
getLastClientIdentificationResponse
public ClientIdentificationResponse getLastClientIdentificationResponse()
Last client identification response or null if none.
-
getLastInitTransactionWithDialogResponse
public InitTransactionResponse getLastInitTransactionWithDialogResponse()
Last init transaction with dialog response or null if none.
-
getLastLoyaltyDataResponse
public CardData getLastLoyaltyDataResponse()
Last loyalty data response or null if none.
-
getLastFinishCheckoutResponse
public VasCheckoutInformation getLastFinishCheckoutResponse()
Last finish checkout response or null if none.
-
getLastProvideLoyaltyBasketResponse
public List<LoyaltyItem> getLastProvideLoyaltyBasketResponse()
Last provide loyalty basket response or null if none.
-
getLastProvideVasResultResponse
public VasResult getLastProvideVasResultResponse()
Last provide vas result response or null if none.
-
getLastMobileTopupIssuerInfoResponse
public List<MobileTopupValue> getLastMobileTopupIssuerInfoResponse()
Last mobile topup issuer info response or null if none.
-
getLastMobileTopupResponse
public MobileTopupData getLastMobileTopupResponse()
Last mobile topup response or null if none.
-
getLastRequestAliasResponse
public String getLastRequestAliasResponse()
Last request alias transaction response or null if none.
-
getLastAgeCheckResponse
public TransactionInformation getLastAgeCheckResponse()
Last age check response or null if none.
-
connectCompleted
public void connectCompleted(TimEvent event)
Description copied from interface:TerminalListener
Called if anTerminal.connect()
started request finished.- Specified by:
connectCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
activateCompleted
public void activateCompleted(TimEvent event, ActivateResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.activateAsync()
started request finished.- Specified by:
activateCompleted
in interfaceTerminalListener
- Parameters:
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.
-
applicationInformationCompleted
public void applicationInformationCompleted(TimEvent event)
Description copied from interface:TerminalListener
Called if anTerminal.applicationInformationAsync()
started request finished.- Specified by:
applicationInformationCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
balanceCompleted
public void balanceCompleted(TimEvent event, BalanceResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.balanceAsync()
started request finished.- Specified by:
balanceCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains counters and print information for the merchant.
-
changeSettingsCompleted
public void changeSettingsCompleted(TimEvent event)
Description copied from interface:TerminalListener
Called if anTerminal.changeSettingsAsync(java.util.Map)
started request finished.- Specified by:
changeSettingsCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
commitCompleted
public void commitCompleted(TimEvent event, PrintData data)
Description copied from interface:TerminalListener
Called if anTerminal.commitAsync()
started request finished.- Specified by:
commitCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
counterRequestCompleted
public void counterRequestCompleted(TimEvent event, Counters data)
Description copied from interface:TerminalListener
Called if anTerminal.counterRequestAsync(com.six.timapi.constants.CounterType)
started request finished.- Specified by:
counterRequestCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains counters.
-
deactivateCompleted
public void deactivateCompleted(TimEvent event, DeactivateResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.deactivateAsync()
started request finished.- Specified by:
deactivateCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains counters and print information for the merchant.
-
dccRatesCompleted
public void dccRatesCompleted(TimEvent event, PrintData data)
Description copied from interface:TerminalListener
Called if anTerminal.dccRatesAsync()
started request finished.- Specified by:
dccRatesCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains print information for merchant.
-
hardwareInformationCompleted
public void hardwareInformationCompleted(TimEvent event, HardwareInformationResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.hardwareInformationAsync()
started request finished.- Specified by:
hardwareInformationCompleted
in interfaceTerminalListener
- Parameters:
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.
-
initTransactionCompleted
public void initTransactionCompleted(TimEvent event, CardData data)
Description copied from interface:TerminalListener
Called if anTerminal.initTransactionAsync(boolean, Amount)
started request finished.- Specified by:
initTransactionCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
initTransactionWithDialogCompleted
public void initTransactionWithDialogCompleted(TimEvent event, InitTransactionResponse data)
Description copied from interface:TerminalListener
Called if anTerminal#initTransactionWithDialogAsync(Amount, ShowDialogRequest)
started request finished.- Specified by:
initTransactionWithDialogCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
loginCompleted
public void loginCompleted(TimEvent event)
Description copied from interface:TerminalListener
Called if anTerminal.loginAsync()
started request finished.- Specified by:
loginCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
logoutCompleted
public void logoutCompleted(TimEvent event)
Description copied from interface:TerminalListener
Called if anTerminal.logoutAsync()
started request finished.- Specified by:
logoutCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
rebootCompleted
public void rebootCompleted(TimEvent event)
Description copied from interface:TerminalListener
Called if anTerminal.rebootAsync()
started request finished.- Specified by:
rebootCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
reconciliationCompleted
public void reconciliationCompleted(TimEvent event, ReconciliationResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.reconciliationAsync()
started request finished.- Specified by:
reconciliationCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains counters and print information for the merchant.
-
receiptRequestCompleted
public void receiptRequestCompleted(TimEvent event, ReceiptRequestResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.receiptRequestAsync(com.six.timapi.constants.ReceiptRequestType)
started request finished.- Specified by:
receiptRequestCompleted
in interfaceTerminalListener
- Parameters:
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.
-
transactionInfoRequestCompleted
public void transactionInfoRequestCompleted(TimEvent event, TransactionInfoRequestResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.transactionInfoRequestAsync()
started request finished.- Specified by:
transactionInfoRequestCompleted
in interfaceTerminalListener
- Parameters:
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.
-
reconfigCompleted
public void reconfigCompleted(TimEvent event, PrintData data)
Description copied from interface:TerminalListener
Called if anTerminal.reconfigAsync()
started request finished.- Specified by:
reconfigCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains print information for the merchant.
-
rollbackCompleted
public void rollbackCompleted(TimEvent event, PrintData data)
Description copied from interface:TerminalListener
Called if anTerminal.rollbackAsync()
started request finished.- Specified by:
rollbackCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains print information for the merchant and cardholder.
-
softwareUpdateCompleted
public void softwareUpdateCompleted(TimEvent event, UpdateStatus data)
Description copied from interface:TerminalListener
Called if anTerminal.softwareUpdateAsync()
started request finished.- Specified by:
softwareUpdateCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains update status.
-
systemInformationCompleted
public void systemInformationCompleted(TimEvent event, SystemInformationResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.systemInformationAsync()
started request finished.- Specified by:
systemInformationCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains configuration and network information of the terminal.
-
transactionCompleted
public void transactionCompleted(TimEvent event, TransactionResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.transactionAsync(com.six.timapi.constants.TransactionType, Amount)
orTerminal.transactionAsync(com.six.timapi.constants.TransactionType, TransactionRequest)
started request finished.- Specified by:
transactionCompleted
in interfaceTerminalListener
- Parameters:
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.
-
clientIdentificationCompleted
public void clientIdentificationCompleted(TimEvent event, ClientIdentificationResponse data)
Description copied from interface:TerminalListener
Called if anTerminal.clientIdentification()
orTerminal.clientIdentificationAsync()
started request finished.- Specified by:
clientIdentificationCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.data
- Contains result information and print information for the merchant and cardholder.
-
terminalStatusChanged
public void terminalStatusChanged(Terminal terminal)
Description copied from interface:TerminalListener
Called if the state of the terminal changed. Retrieve the state using event.getTerminal().getTerminalState().- Specified by:
terminalStatusChanged
in interfaceTerminalListener
- Parameters:
terminal
- Terminal sending the notification.
-
disconnected
public void disconnected(Terminal terminal, TimException exception)
Description copied from interface:TerminalListener
Connection to terminal closed. Called if user disconnected or connection has been lost.- Specified by:
disconnected
in interfaceTerminalListener
- Parameters:
terminal
- Terminal sending the notification.
-
closeReaderCompleted
public void closeReaderCompleted(TimEvent event)
Called if anTerminal.closeReaderAsync()
started request finished. Supported only ifGuides.UNATTENDED
is enabled.- Specified by:
closeReaderCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
openReaderCompleted
public void openReaderCompleted(TimEvent event)
Called if anTerminal.openReaderAsync()
started request finished. Supported only ifGuides.UNATTENDED
is enabled.- Specified by:
openReaderCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
ejectCardCompleted
public void ejectCardCompleted(TimEvent event)
Called if anTerminal.ejectCardAsync()
started request finished. Supported only ifGuides.UNATTENDED
is enabled.- Specified by:
ejectCardCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
openMaintenanceWindowCompleted
public void openMaintenanceWindowCompleted(TimEvent event)
Called if anTerminal.openMaintenanceWindowAsync()
started request finished. Supported only ifGuides.UNATTENDED
is enabled.- Specified by:
openMaintenanceWindowCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
closeMaintenanceWindowCompleted
public void closeMaintenanceWindowCompleted(TimEvent event)
Called if anTerminal.closeMaintenanceWindowAsync()
started request finished. Supported only ifGuides.UNATTENDED
is enabled.- Specified by:
closeMaintenanceWindowCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
activateServiceMenuCompleted
public void activateServiceMenuCompleted(TimEvent event)
Called if anTerminal.activateServiceMenuAsync()
started request finished. Supported only ifGuides.UNATTENDED
is enabled.- Specified by:
activateServiceMenuCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
openDialogModeCompleted
public void openDialogModeCompleted(TimEvent event)
Called if anTerminal.openDialogModeAsync()
started request finished. Supported only ifGuides.DIALOG
is enabled.- Specified by:
openDialogModeCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
closeDialogModeCompleted
public void closeDialogModeCompleted(TimEvent event)
Called if anTerminal.closeDialogModeAsync()
started request finished. Supported only ifGuides.DIALOG
is enabled.- Specified by:
closeDialogModeCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
showSignatureCaptureCompleted
public void showSignatureCaptureCompleted(TimEvent event, ShowSignatureCaptureResponse data)
Called if anTerminal.showSignatureCaptureAsync(com.six.timapi.ShowSignatureCaptureRequest)
started request finished. Supported only ifGuides.DIALOG
is enabled.- Specified by:
showSignatureCaptureCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
showDialogCompleted
public void showDialogCompleted(TimEvent event, ShowDialogResponse data)
Called if anTerminal.showDialogAsync(com.six.timapi.ShowDialogRequest)
started request finished. Supported only ifGuides.DIALOG
is enabled.- Specified by:
showDialogCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
sendCardCommandCompleted
public void sendCardCommandCompleted(TimEvent event, List<CommandResponse> data)
Called if anTerminal.sendCardCommand(List)
started request finished. Supported only ifGuides.DIALOG
is enabled.- Specified by:
sendCardCommandCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
printOnTerminal
public void printOnTerminal(TimEvent event)
Description copied from interface:TerminalListener
Called if anTerminal#printOnTerminalAsync()
started request finished. Supported only ifGuides.DIALOG
is enabled.- Specified by:
printOnTerminal
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
balanceInquiryCompleted
public void balanceInquiryCompleted(TimEvent event, BalanceInquiryResponse data)
Called if anTerminal.balanceInquiryAsync()
started request finished. Supported only ifGuides.ADVANCED_RETAIL
is enabled.- Specified by:
balanceInquiryCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
deferredAuth
public void deferredAuth(Terminal terminal, TransactionResponse response)
Description copied from interface:TerminalListener
Called if a Deferred Authorization Notification has been received. Supported only ifGuides.UNATTENDED
is enabled.- Specified by:
deferredAuth
in interfaceTerminalListener
-
keyPressed
public void keyPressed(Terminal terminal, Reason reason)
Description copied from interface:TerminalListener
Called if a Key Pressed Notification has been received. Supported only ifGuides.UNATTENDED
is enabled.- Specified by:
keyPressed
in interfaceTerminalListener
-
screenshot
public void screenshot(Terminal terminal, ScreenshotInformation info)
Called if a Screenshot Notification has been received. Supported only ifGuides.REMOTE
is enabled.- Specified by:
screenshot
in interfaceTerminalListener
-
errorNotification
public void errorNotification(Terminal terminal, TimException error)
Called if a terminal send an Error Notification.- Specified by:
errorNotification
in interfaceTerminalListener
-
vasInfo
public void vasInfo(Terminal terminal, VasCheckoutInformation vasInfo)
Called if an VAS Information Notification has been received. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
vasInfo
in interfaceTerminalListener
-
licenseChanged
public void licenseChanged(Terminal terminal)
Called if a terminal send a LicenseChanged notification. Get license withTerminal.getLicense()
.- Specified by:
licenseChanged
in interfaceTerminalListener
-
loyaltyDataCompleted
public void loyaltyDataCompleted(TimEvent event, CardData data)
Called if anTerminal#loyaltyDataAsync()
started request finished. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
loyaltyDataCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
startCheckoutCompleted
public void startCheckoutCompleted(TimEvent event)
Called if anTerminal.startCheckoutAsync()
started request finished. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
startCheckoutCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
finishCheckoutCompleted
public void finishCheckoutCompleted(TimEvent event, VasCheckoutInformation data)
Called if anTerminal.finishCheckoutAsync()
started request finished. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
finishCheckoutCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
provideLoyaltyBasketCompleted
public void provideLoyaltyBasketCompleted(TimEvent event, List<LoyaltyItem> data)
Called if anTerminal#provideLoyaltyBasketAsync()
started request finished. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
provideLoyaltyBasketCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
provideVasResultCompleted
public void provideVasResultCompleted(TimEvent event, VasResult data)
Called if anTerminal#provideVasResultAsync()
started request finished. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
provideVasResultCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
mobileTopupIssuerInfoCompleted
public void mobileTopupIssuerInfoCompleted(TimEvent event, List<MobileTopupValue> data)
Description copied from interface:TerminalListener
Called if anTerminal.mobileTopupIssuerInfoAsync()
started request finished. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
mobileTopupIssuerInfoCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
mobileTopupCompleted
public void mobileTopupCompleted(TimEvent event, MobileTopupData data)
Description copied from interface:TerminalListener
Called if anTerminal#mobileTopupAsync()
started request finished. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
mobileTopupCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
thirdPartyAppData
public void thirdPartyAppData(Terminal terminal, ThirdPartyAppPayload data)
Called if an ThirdPartyAppData notification has been received. Supported only ifGuides.VALUE_ADDED_SERVICES
is enabled.- Specified by:
thirdPartyAppData
in interfaceTerminalListener
- Parameters:
terminal
- Terminal sending notification.data
- Received
-
requestAliasCompleted
public void requestAliasCompleted(TimEvent event, String data)
Called if anTerminal#requestAlias()
started request finished.- Specified by:
requestAliasCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
deviceMaintenanceCompleted
public void deviceMaintenanceCompleted(TimEvent event)
Called if anTerminal#deviceMaintenanceAsync()
started request finished. Supported only ifGuides.REMOTE
is enabled.- Specified by:
deviceMaintenanceCompleted
in interfaceTerminalListener
- Parameters:
event
- Contains the terminal sending the event and error information if the request failed.
-
ageCheckCompleted
public void ageCheckCompleted(TimEvent event, TransactionInformation data)
Description copied from interface:TerminalListener
Called if anTerminal#ageCheckAsync()
started request finished.- Specified by:
ageCheckCompleted
in interfaceTerminalListener
- Parameters:
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.
-
-