001/* 002 * =========================================================================================== 003 * = COPYRIGHT 004 * PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION 005 * This software is supplied under the terms of a license agreement or nondisclosure 006 * agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or 007 * disclosed except in accordance with the terms in that agreement. 008 * Copyright (C) 2017-2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved. 009 * Description: // Detail description about the function of this module, 010 * // interfaces with the other modules, and dependencies. 011 * Revision History: 012 * Date Author Action 013 * 2017/04/01 PAX Create/Add/Modify/Delete 014 * =========================================================================================== 015 */ 016 017package com.pax.dal; 018 019import com.pax.dal.entity.EReaderType; 020import com.pax.dal.entity.PollingResult; 021import com.pax.dal.exceptions.IccDevException; 022import com.pax.dal.exceptions.MagDevException; 023import com.pax.dal.exceptions.PiccDevException; 024 025public interface ICardReaderHelper { 026 027 /** 028 * <div class="zh"> 寻卡接口 </div> <div class="en"> polling the bank card by readerType </div> 029 * 030 * @param type 031 * {@link #EReaderType} 032 * @param timeout 033 * <div class="zh"> 超时时间, 以毫秒为单位 </div> <div class="en"> time to polling </div> 034 * @return 035 * @throws MagDevException 036 * @throws IccDevException 037 * @throws PiccDevException 038 * 039 */ 040 public PollingResult polling(EReaderType type, int timeout) throws MagDevException, IccDevException, 041 PiccDevException; 042 043 /** 044 * <div class="zh"> 寻卡接口 </div> <div class="en"> polling the bank card by readerType </div> 045 * 046 * @param type 047 * {@link #EReaderType} 048 * @param timeout 049 * <div class="zh"> 超时时间, 以毫秒为单位 </div> <div class="en"> time to polling </div> 050 * @param closeReader <div class="zh"> 是否自动关闭读卡器 </div> <div class="en"> Whether automatically close the card reader </div> 051 * @return 052 * @throws MagDevException 053 * @throws IccDevException 054 * @throws PiccDevException 055 * 056 */ 057 public PollingResult polling(EReaderType type, int timeout,boolean closeReader) throws MagDevException, IccDevException, 058 PiccDevException; 059 060 /** 061 * <div class="zh"> 设置是否允许暂停 </div> <div class="en"> set is pause when polling or not </div> 062 * 063 * @param isPause 064 * <div class="zh"> 065 * <ul> 066 * <li>true -- 可以暂停</li> 067 * <li>false -- 可以取消</li> 068 * </ul> 069 * </div> <div class="en"> 070 * <ul> 071 * <li>true -- can pause</li> 072 * <li>false -- can cancel</li> 073 * </ul> 074 * </div> 075 * 076 * @deprecated 077 */ 078 public void setIsPause(boolean isPause); 079 080 /** 081 * <div class="zh"> 停止轮询 </div> 082 * 083 * <div class="en"> stop polling </div> 084 */ 085 public void stopPolling(); 086 087}