Class MSRProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.msr.MSRProperties
- All Implemented Interfaces:
JposBaseInterface,MSRInterface
- Direct Known Subclasses:
MSR
Class containing the MSR specific properties, their default values and default implementations of
MSRInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter MSR - Magnetic Stripe
Reader.
-
Field Summary
FieldsModifier and TypeFieldDescriptionUPOS property AccountNumber.byte[]UPOS property AdditionalSecurityInformation.UPOS property CapCardAuthentication.intUPOS property CapDataEncryption.intUPOS property CapDeviceAuthentication.booleanUPOS property CapISO.booleanUPOS property CapJISOne.booleanUPOS property CapJISTwo.booleanUPOS property CapTrackDataMasking.booleanUPOS property CapTransmitSentinels.intUPOS property CapWritableTracks.byte[]UPOS property CardAuthenticationData.intUPOS property CardAuthenticationDataLength.UPOS property CardPropertyList.UPOS property CardType.UPOS property CardTypeList.intUPOS property DataEncryptionAlgorithm.booleanUPOS property DecodeData.booleanUPOS property DeviceAuthenticated.intUPOS property DeviceAuthenticationProtocol.intUPOS property EncodingMaxLength.intUPOS property ErrorReportingType.UPOS property ExpirationDate.UPOS property FirstName.UPOS property MiddleInitial.booleanUPOS property ParseDecodeData.UPOS property ServiceCode.UPOS property Suffix.UPOS property Surname.UPOS property Title.byte[]UPOS property Track1Data.byte[]UPOS property Track1DiscretionaryData.byte[]UPOS property Track1EncryptedData.intUPOS property Track1EncryptedDataLength.byte[]UPOS property Track2Data.byte[]UPOS property Track2DiscretionaryData.byte[]UPOS property Track2EncryptedData.intUPOS property Track2EncryptedDataLength.byte[]UPOS property Track3Data.byte[]UPOS property Track3EncryptedData.intUPOS property Track3EncryptedDataLength.byte[]UPOS property Track4Data.byte[]UPOS property Track4EncryptedData.intUPOS property Track4EncryptedDataLength.intUPOS property TracksToRead.intUPOS property TracksToWrite.booleanUPOS property TransmitSentinels.UPOS property WriteCardType.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 TypeMethodDescriptionvoidauthenticateDevice(byte[] response)Final part of AuthenticateDevice method.voiddataEncryptionAlgorithm(int b)Final part of setting DataEncryptionAlgorithm.voiddeauthenticateDevice(byte[] response)Final part of DeauthenticateDevice method.voiddecodeData(boolean flag)Final part of setting DecodeData.voiderrorReportingType(int type)Final part of setting ErrorReportingType.voidinitOnEnable(boolean enable)Initialization of properties that must be initialized during deviceEnable.voidInitialization of properties that must be initialized during open.voidparseDecodeData(boolean flag)Final part of setting ParseDecodeData.voidretrieveCardProperty(String name, String[] value)Final part of RetrieveCardProperty method.voidretrieveDeviceAuthenticationData(byte[][] challenge)Final part of RetrieveDeviceAuthenticationData method.voidsetDataProperties(Object tracks)Sets data properties according to the track data.voidtracksToRead(int t2r)Final part of setting TracksToRead.voidtracksToWrite(int t2w)Final part of setting TracksToWrite.voidtransmitSentinels(boolean flag)Final part of setting TransmitSentinels.voidFinal part of UpdateKey method.voidwriteCardType(String type)Final part of setting WriteCardType.voidwriteTracks(byte[][] data, int timeout)Final part of WriteTracks 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, initOnFirstEnable, 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
-
CapCardAuthentication
UPOS property CapCardAuthentication. Default: "". Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapDataEncryption
public int CapDataEncryptionUPOS property CapDataEncryption. Default: DE_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapDeviceAuthentication
public int CapDeviceAuthenticationUPOS property CapDeviceAuthentication. Default: DA_NOT_SUPPORTED. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapTrackDataMasking
public boolean CapTrackDataMaskingUPOS property CapTrackDataMasking. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapWritableTracks
public int CapWritableTracksUPOS property CapWritableTracks. Default: TR_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapTransmitSentinels
public boolean CapTransmitSentinelsUPOS property CapTransmitSentinels. Default: true. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapISO
public boolean CapISOUPOS property CapISO. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapJISOne
public boolean CapJISOneUPOS property CapJISOne. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapJISTwo
public boolean CapJISTwoUPOS property CapJISTwo. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
AdditionalSecurityInformation
public byte[] AdditionalSecurityInformationUPOS property AdditionalSecurityInformation. -
CardAuthenticationData
public byte[] CardAuthenticationDataUPOS property CardAuthenticationData. -
CardAuthenticationDataLength
public int CardAuthenticationDataLengthUPOS property CardAuthenticationDataLength. -
CardPropertyList
UPOS property CardPropertyList. -
CardType
UPOS property CardType. -
CardTypeList
UPOS property CardTypeList. Default: "". Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
DataEncryptionAlgorithm
public int DataEncryptionAlgorithmUPOS property DataEncryptionAlgorithm. Default: DE_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
DeviceAuthenticated
public boolean DeviceAuthenticatedUPOS property DeviceAuthenticated. -
DeviceAuthenticationProtocol
public int DeviceAuthenticationProtocolUPOS property DeviceAuthenticationProtocol. Default: AP_NONE. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
Track1EncryptedData
public byte[] Track1EncryptedDataUPOS property Track1EncryptedData. -
Track1EncryptedDataLength
public int Track1EncryptedDataLengthUPOS property Track1EncryptedDataLength. -
Track2EncryptedData
public byte[] Track2EncryptedDataUPOS property Track2EncryptedData. -
Track2EncryptedDataLength
public int Track2EncryptedDataLengthUPOS property Track2EncryptedDataLength. -
Track3EncryptedData
public byte[] Track3EncryptedDataUPOS property Track3EncryptedData. -
Track3EncryptedDataLength
public int Track3EncryptedDataLengthUPOS property Track3EncryptedDataLength. -
Track4EncryptedData
public byte[] Track4EncryptedDataUPOS property Track4EncryptedData. -
Track4EncryptedDataLength
public int Track4EncryptedDataLengthUPOS property Track4EncryptedDataLength. -
WriteCardType
UPOS property WriteCardType. -
EncodingMaxLength
public int EncodingMaxLengthUPOS property EncodingMaxLength. -
TracksToWrite
public int TracksToWriteUPOS property TracksToWrite. -
Track1Data
public byte[] Track1DataUPOS property Track1Data. -
Track2Data
public byte[] Track2DataUPOS property Track2Data. -
Track3Data
public byte[] Track3DataUPOS property Track3Data. -
Track4Data
public byte[] Track4DataUPOS property Track4Data. -
TransmitSentinels
public boolean TransmitSentinelsUPOS property TransmitSentinels. -
AccountNumber
UPOS property AccountNumber. -
DecodeData
public boolean DecodeDataUPOS property DecodeData. -
ErrorReportingType
public int ErrorReportingTypeUPOS property ErrorReportingType. -
ExpirationDate
UPOS property ExpirationDate. -
FirstName
UPOS property FirstName. -
MiddleInitial
UPOS property MiddleInitial. -
ParseDecodeData
public boolean ParseDecodeDataUPOS property ParseDecodeData. -
ServiceCode
UPOS property ServiceCode. -
Suffix
UPOS property Suffix. -
Surname
UPOS property Surname. -
Title
UPOS property Title. -
Track1DiscretionaryData
public byte[] Track1DiscretionaryDataUPOS property Track1DiscretionaryData. -
Track2DiscretionaryData
public byte[] Track2DiscretionaryDataUPOS property Track2DiscretionaryData. -
TracksToRead
public int TracksToReadUPOS property TracksToRead.
-
-
Constructor Details
-
MSRProperties
public MSRProperties(int dev)Constructor. Sets ExclusiveUse to ExclusiveYes to match the MSR device model.- Parameters:
dev- Device index
-
-
Method Details
-
initOnOpen
public void initOnOpen()Description copied from class:JposCommonPropertiesInitialization of properties that must be initialized during open.- Overrides:
initOnOpenin classJposCommonProperties
-
initOnEnable
public void initOnEnable(boolean enable)Description copied from class:JposCommonPropertiesInitialization of properties that must be initialized during deviceEnable.- Overrides:
initOnEnablein classJposCommonProperties- Parameters:
enable- True: initialize properties, false: do nothing
-
setDataProperties
Description copied from interface:MSRInterfaceSets data properties according to the track data. This method will be called whenever data properties must be filled before a data event will be fired.- Specified by:
setDataPropertiesin interfaceMSRInterface- Parameters:
tracks- Contents of track data.
-
dataEncryptionAlgorithm
public void dataEncryptionAlgorithm(int b) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of setting DataEncryptionAlgorithm. 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 claimed,
- Device is not enabled,
- The new algorith value matches CapDataEncryption.
- Specified by:
dataEncryptionAlgorithmin interfaceMSRInterface- Parameters:
b- New DataEncryptionAlgorithm value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
writeCardType
Description copied from interface:MSRInterfaceFinal part of setting WriteCardType. 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 has not been closed,
- The new card type matches one of the names specified in CardTypeList,
- internal property AllowAlwaysSetProperties is true or type equals the previous value of WriteCardType.
- Specified by:
writeCardTypein interfaceMSRInterface- Parameters:
type- New WriteCardType value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
tracksToWrite
public void tracksToWrite(int t2w) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of setting TracksToWrite. 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 has not been closed,
- The given value for tracks to write specifies only tracks present in CapWritableTracks,
- internal property AllowAlwaysSetProperties is true or t2w equals the previous value of TracksToWrite.
- Specified by:
tracksToWritein interfaceMSRInterface- Parameters:
t2w- New TracksToWrite value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
transmitSentinels
public void transmitSentinels(boolean flag) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of setting TransmitSentinels. 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 has not been closed,
- CapTransmitSentinels is false: The new value is false as well,
- internal property AllowAlwaysSetProperties is true or flag equals the previous value of TransmitSentinels.
- Specified by:
transmitSentinelsin interfaceMSRInterface- Parameters:
flag- New TransmitSentinels value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
decodeData
public void decodeData(boolean flag) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of setting DecodeData. Can be overwritten within derived classes, if necessary. If set to false, ParseDecodeData will be set to false as well. This method will be called only if the following plausibility checks lead to a positive result:- Device has not been closed,
- internal property AllowAlwaysSetProperties is true or flag equals the previous value of DecodeData.
- Specified by:
decodeDatain interfaceMSRInterface- Parameters:
flag- New DecodeData value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
errorReportingType
public void errorReportingType(int type) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of setting ErrorReportingType. 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 has not been closed,
- CapDataEncryption != MSR_DE_NONE,
- The new value is one of MSR_ERT_CARD or MSR_ERT_TRACK,
- internal property AllowAlwaysSetProperties is true or type equals the previous value of ErrorReportingType.
- Specified by:
errorReportingTypein interfaceMSRInterface- Parameters:
type- New ErrorReportingType value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
parseDecodeData
public void parseDecodeData(boolean flag) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of setting ParseDecodeData. Can be overwritten within derived classes, if necessary. If ParseDecodeData becomes true, DecodeData will be set to rue as well. This method will be called only if the following plausibility checks lead to a positive result:- Device has not been closed,
- internal property AllowAlwaysSetProperties is true or flag equals the previous value of ParseDecodeData.
- Specified by:
parseDecodeDatain interfaceMSRInterface- Parameters:
flag- New ParseDecodeData value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
tracksToRead
public void tracksToRead(int t2r) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of setting TracksToRead. 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 has not been closed,
- Track to be read specifies a combination of up to 4 tracks,
- internal property AllowAlwaysSetProperties is true or t2r equals the previous value of TracksToRead.
- Specified by:
tracksToReadin interfaceMSRInterface- Parameters:
t2r- New TracksToRead value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
authenticateDevice
public void authenticateDevice(byte[] response) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of AuthenticateDevice 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,
- CapDeviceAuthentication is not MSR_DA_NOT_SUPPORTED.
- Specified by:
authenticateDevicein interfaceMSRInterface- Parameters:
response- see UPOS specification, method AuthenticateDevice- Throws:
jpos.JposException- See UPOS specification, method AuthenticateDevice
-
deauthenticateDevice
public void deauthenticateDevice(byte[] response) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of DeauthenticateDevice 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,
- CapDeviceAuthentication is not MSR_DA_NOT_SUPPORTED.
- Specified by:
deauthenticateDevicein interfaceMSRInterface- Parameters:
response- see UPOS specification, method DeauthenticateDevice- Throws:
jpos.JposException- See UPOS specification, method DeauthenticateDevice
-
retrieveCardProperty
Description copied from interface:MSRInterfaceFinal part of RetrieveCardProperty 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,
- CapDeviceAuthentication is not MSR_DA_NOT_SUPPORTED,
- The given name must match one of the names specified in CardPropertyList,
- The value argument is an array of length 1.
- Specified by:
retrieveCardPropertyin interfaceMSRInterface- Parameters:
name- see UPOS specification, method RetrieveCardPropertyvalue- see UPOS specification, method RetrieveCardProperty- Throws:
jpos.JposException- See UPOS specification, method RetrieveCardProperty
-
retrieveDeviceAuthenticationData
public void retrieveDeviceAuthenticationData(byte[][] challenge) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of RetrieveDeviceAuthenticationData 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,
- CapDeviceAuthentication is not MSR_DA_NOT_SUPPORTED,
- The challenge argument is an array of length 1.
- Specified by:
retrieveDeviceAuthenticationDatain interfaceMSRInterface- Parameters:
challenge- see UPOS specification, method RetrieveDeviceAuthenticationData- Throws:
jpos.JposException- See UPOS specification, method RetrieveDeviceAuthenticationData
-
updateKey
Description copied from interface:MSRInterfaceFinal part of UpdateKey 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,
- CapDeviceAuthentication is not MSR_DA_NOT_SUPPORTED.
- Specified by:
updateKeyin interfaceMSRInterface- Parameters:
key- see UPOS specification, method UpdateKeykeyName- see UPOS specification, method UpdateKey- Throws:
jpos.JposException- See UPOS specification, method UpdateKey
-
writeTracks
public void writeTracks(byte[][] data, int timeout) throws jpos.JposExceptionDescription copied from interface:MSRInterfaceFinal part of WriteTracks 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,
- Argument data is an array of 4 non-null byte arrays,
- CapWritableTracks is not MSR_TR_NONE,
- All non-writable tracks have been specified as zero-length byte array.
- Specified by:
writeTracksin interfaceMSRInterface- Parameters:
data- see UPOS specification, method WriteTrackstimeout- see UPOS specification, method WriteTracks- Throws:
jpos.JposException- See UPOS specification, method WriteTracks
-