Class SmartCardRWProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.smartcardrw.SmartCardRWProperties
- All Implemented Interfaces:
JposBaseInterface,SmartCardRWInterface
Class containing the smart card reader / writer specific properties, their default values and default implementations of
SmartCardRWInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Smart Card Reader / Writer.
This is a base implementation only. The current implementor of JavaPOS-SPF has no experience with SmartCardRW and therefore
has no idea about meaningful defaults for most SmartCardRD properties, transmission protocols and interface modes.
Especially, the author has no deeper knowledge about APDU structure or the ARTS XML standard for SCR/W functionality. As result, currently the common service does not perform any APDU or XML data checks, this must be done by the device specific implementation instead.
Especially, the author has no deeper knowledge about APDU structure or the ARTS XML standard for SCR/W functionality. As result, currently the common service does not perform any APDU or XML data checks, this must be done by the device specific implementation instead.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanUPOS property CapCardErrorDetection.intUPOS property CapInterfaceMode.intUPOS property CapIsoEmvMode.intUPOS property CapSCPresentSensor.intUPOS property CapSCSlots.intUPOS property CapTransmissionProtocol.intUPOS property InterfaceMode.intUPOS property IsoEmvMode.intUPOS property SCPresentSensor.intUPOS property SCSlot.booleanUPOS property TransactionInProgress.intUPOS property TransmissionProtocol.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
AllowAlwaysSetProperties, AllowDeprecatedMethods, AsyncInputActive, AsyncMode, AutoDisable, CapStatisticsReporting, CapUpdateStatistics, CheckHealthText, Claimed, Claiming, ClaimWaiters, CurrentCommands, CurrentUnitID, DataCount, DataEventEnabled, DataEventList, Device, DeviceEnabled, DeviceServiceDescription, DeviceServiceVersion, DevProps, ErrorString, ErrorUnits, EventCB, EventList, EventSource, EventString, EventUnitID, EventUnits, ExclusiveAllowed, ExclusiveNo, ExclusiveUse, ExclusiveYes, FirstEnableHappened, FlagWhenIdle, FlagWhenIdleStatusValue, FreezeEvents, Index, LogicalName, MaximumConfirmationEventWaitingTime, OutputID, PowerNotify, PowerState, SerializedRequestRunner, SerializedRequests, State, StrictFIFOEventHandling, SuspendedCommands, SuspendedConcurrentCommands, UnitsOnline, UsesSubsystemUnits -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeginInsertion(int timeout)Final part of BeginInsertion method.voidbeginRemoval(int timeout)Final part of BeginRemoval method.voidFinal part of EndInsertion method.voidFinal part of EndRemoval method.voidinterfaceMode(int mode)Final part of setting InterfaceMode.voidisoEmvMode(int mode)Final part of setting IsoEmvMode.voidFinal part of ReadData method.voidsCSlot(int slot)Final part of setting SCSlot.Validation part of WriteData method.voidFinal part of WriteData method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, checkProperties, claim, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnEnable, initOnFirstEnable, initOnOpen, newJposOutputRequest, open, powerNotify, release, releaseWaiter, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, signalWaiter, unitDataCount, updateFirmware, updateFirmware, updateStatistics, waitWaiterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.gmxhome.conrad.jpos.jpos_base.JposBaseInterface
asyncMode, autoDisable, checkHealth, claim, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Field Details
-
CapCardErrorDetection
public boolean CapCardErrorDetectionUPOS property CapCardErrorDetection. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapInterfaceMode
public int CapInterfaceModeUPOS property CapInterfaceMode. Default: CMODE_TRANS. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapIsoEmvMode
public int CapIsoEmvModeUPOS property CapIsoEmvMode. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method, should be overwritten if CapInterfaceMode contains CMODE_APDU. -
CapSCPresentSensor
public int CapSCPresentSensorUPOS property CapSCPresentSensor. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapSCSlots
public int CapSCSlotsUPOS property CapSCSlots. Default: 1. -
CapTransmissionProtocol
public int CapTransmissionProtocolUPOS property CapTransmissionProtocol. Default: 0. Must be overwritten by objects derived from JposDevice within the changeDefaults method to CTRANS_PROTOCOL_T0 or CTRANS_PROTOCOL_T1. -
InterfaceMode
public int InterfaceModeUPOS property InterfaceMode. Default: MODE_TRANS. Must be overwritten until first enabled if CapInterfaceMode does not contain CMODE_TRANS. -
IsoEmvMode
public int IsoEmvModeUPOS property IsoEmvMode. Default: 0. -
SCPresentSensor
public int SCPresentSensorUPOS property SCPresentSensor. Default: 0. -
SCSlot
public int SCSlotUPOS property SCSlot. Default: 1 (Slot 0). -
TransactionInProgress
public boolean TransactionInProgressUPOS property TransactionInProgress. Default: false. -
TransmissionProtocol
public int TransmissionProtocolUPOS property TransmissionProtocol. Default: 0. Must be overwritten until first enabled to match the transmission protocols specified in CapTransmissionProtocol.
-
-
Constructor Details
-
SmartCardRWProperties
protected SmartCardRWProperties(int dev)Constructor.- Parameters:
dev- Device index
-
-
Method Details
-
interfaceMode
public void interfaceMode(int mode) throws jpos.JposExceptionDescription copied from interface:SmartCardRWInterfaceFinal part of setting InterfaceMode. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- mode is one of MODE_TRANS, MODE_BLOCK, MODE_APDU or MODE_XML,
- The corresponding capability bit in CapInterfaceMode, CMODE_TRANS, CMODE_BLOCK, CMODE_APDU or MODE_XML, is set, too.
- Specified by:
interfaceModein interfaceSmartCardRWInterface- Parameters:
mode- AdditionalSecurityInformation for subsequent storing data into journal.- Throws:
jpos.JposException- If an error occurs.
-
isoEmvMode
public void isoEmvMode(int mode) throws jpos.JposExceptionDescription copied from interface:SmartCardRWInterfaceFinal part of setting IsoEmvMode. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- mode is one of MODE_ISO or MODE_EMV,
- The corresponding capability bit in CapIsoEmvMode, CMODE_ISO or CMODE_EMV, is set, too.
- Specified by:
isoEmvModein interfaceSmartCardRWInterface- Parameters:
mode- Indicates the message modes the SCR/W shall use.- Throws:
jpos.JposException- If an error occurs.
-
sCSlot
public void sCSlot(int slot) throws jpos.JposExceptionDescription copied from interface:SmartCardRWInterfaceFinal part of setting SCSlot. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- Only one bit has been set in slots,
- The bit set in slots is set in CapSCSlots as well.
- Specified by:
sCSlotin interfaceSmartCardRWInterface- Parameters:
slot- New current slot.- Throws:
jpos.JposException- If an error occurs.
-
beginInsertion
public void beginInsertion(int timeout) throws jpos.JposExceptionDescription copied from interface:SmartCardRWInterfaceFinal part of BeginInsertion method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- timeout is FOREVER or ≥ 0.
- Specified by:
beginInsertionin interfaceSmartCardRWInterface- Parameters:
timeout- The number of milliseconds before failing the method.- Throws:
jpos.JposException- If an error occurs.
-
beginRemoval
public void beginRemoval(int timeout) throws jpos.JposExceptionDescription copied from interface:SmartCardRWInterfaceFinal part of BeginRemoval method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- timeout is FOREVER or ≥ 0.
- Specified by:
beginRemovalin interfaceSmartCardRWInterface- Parameters:
timeout- The number of milliseconds before failing the method.- Throws:
jpos.JposException- If an error occurs.
-
endInsertion
public void endInsertion() throws jpos.JposExceptionDescription copied from interface:SmartCardRWInterfaceFinal part of EndInsertion method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
endInsertionin interfaceSmartCardRWInterface- Throws:
jpos.JposException- If an error occurs.
-
endRemoval
public void endRemoval() throws jpos.JposExceptionDescription copied from interface:SmartCardRWInterfaceFinal part of EndRemoval method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
endRemovalin interfaceSmartCardRWInterface- Throws:
jpos.JposException- If an error occurs.
-
readData
Description copied from interface:SmartCardRWInterfaceFinal part of ReadData method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- count and data are arrays with length one,
- action is one of READ_DATA, READ_PROGRAM, EXECUTE_AND_READ_DATAor XML_READ_BLOCK_DATA.
- Specified by:
readDatain interfaceSmartCardRWInterface- Parameters:
action- Indicates the type of processing of the data.count- The total number of data bytes that have been returned.data- The data that is returned.- Throws:
jpos.JposException- If an error occurs.
-
writeData
Description copied from interface:SmartCardRWInterfaceValidation part of WriteData method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- action is one of STORE_DATA, STORE_PROGRAM, EXECUTE_DATA, XML_BLOCK_DATA, SECURITY_FUSE or RESET,
- count is > 0.
- Specified by:
writeDatain interfaceSmartCardRWInterface- Parameters:
action- Indicates the type of processing of the data.count- The total number of data bytes that shall be sent.data- The data to be sent.- Returns:
- WriteData object for use in final part.
- Throws:
jpos.JposException- If an error occurs.
-
writeData
Description copied from interface:SmartCardRWInterfaceFinal part of WriteData method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a WriteData object. This method will be called when the corresponding operation shall be performed, either synchronously during commit. All plausibility checks have been made before, only runtime errors can occur.
The default implementation should be called within derived methods to ensure that the property TransactionInProgress is updated as expected.- Specified by:
writeDatain interfaceSmartCardRWInterface- Parameters:
request- Output request object returned by validation method that contains all parameters to be used by WriteData.- Throws:
jpos.JposException- If an error occurs.
-