Interface MSRInterface
- All Superinterfaces:
JposBaseInterface
- All Known Implementing Classes:
MSR
,MSRProperties
Interface for methods that implement property setter and method calls for the MSR device category.
For details about properties, methods and method parameters, see UPOS specification, chapter MSR - Magnetic Stripe
Reader.
Further details about error handling can be found in introduction - Device Behavior Models - Errors.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
authenticateDevice(byte[] response)
Final part of AuthenticateDevice method.void
dataEncryptionAlgorithm(int b)
Final part of setting DataEncryptionAlgorithm.void
deauthenticateDevice(byte[] response)
Final part of DeauthenticateDevice method.void
decodeData(boolean flag)
Final part of setting DecodeData.void
errorReportingType(int type)
Final part of setting ErrorReportingType.void
parseDecodeData(boolean flag)
Final part of setting ParseDecodeData.void
retrieveCardProperty(String name, String[] value)
Final part of RetrieveCardProperty method.void
retrieveDeviceAuthenticationData(byte[][] challenge)
Final part of RetrieveDeviceAuthenticationData method.void
setDataProperties(Object tracks)
Sets data properties according to the track data.void
tracksToRead(int t2r)
Final part of setting TracksToRead.void
tracksToWrite(int t2w)
Final part of setting TracksToWrite.void
transmitSentinels(boolean flag)
Final part of setting TransmitSentinels.void
Final part of UpdateKey method.void
writeCardType(String type)
Final part of setting WriteCardType.void
writeTracks(byte[][] data, int timeout)
Final part of WriteTracks method.Methods 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
-
Method Details
-
setDataProperties
Sets 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.- Parameters:
tracks
- Contents of track data.
-
dataEncryptionAlgorithm
void dataEncryptionAlgorithm(int b) throws jpos.JposExceptionFinal 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.
- Parameters:
b
- New DataEncryptionAlgorithm value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
writeCardType
Final 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.
- Parameters:
type
- New WriteCardType value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
tracksToWrite
void tracksToWrite(int t2w) throws jpos.JposExceptionFinal 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.
- Parameters:
t2w
- New TracksToWrite value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
transmitSentinels
void transmitSentinels(boolean flag) throws jpos.JposExceptionFinal 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.
- Parameters:
flag
- New TransmitSentinels value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
decodeData
void decodeData(boolean flag) throws jpos.JposExceptionFinal 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.
- Parameters:
flag
- New DecodeData value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
errorReportingType
void errorReportingType(int type) throws jpos.JposExceptionFinal 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.
- Parameters:
type
- New ErrorReportingType value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
parseDecodeData
void parseDecodeData(boolean flag) throws jpos.JposExceptionFinal 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.
- Parameters:
flag
- New ParseDecodeData value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
tracksToRead
void tracksToRead(int t2r) throws jpos.JposExceptionFinal 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.
- Parameters:
t2r
- New TracksToRead value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
authenticateDevice
void authenticateDevice(byte[] response) throws jpos.JposExceptionFinal 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.
- Parameters:
response
- see UPOS specification, method AuthenticateDevice- Throws:
jpos.JposException
- See UPOS specification, method AuthenticateDevice
-
deauthenticateDevice
void deauthenticateDevice(byte[] response) throws jpos.JposExceptionFinal 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.
- Parameters:
response
- see UPOS specification, method DeauthenticateDevice- Throws:
jpos.JposException
- See UPOS specification, method DeauthenticateDevice
-
retrieveCardProperty
Final 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.
- Parameters:
name
- see UPOS specification, method RetrieveCardPropertyvalue
- see UPOS specification, method RetrieveCardProperty- Throws:
jpos.JposException
- See UPOS specification, method RetrieveCardProperty
-
retrieveDeviceAuthenticationData
void retrieveDeviceAuthenticationData(byte[][] challenge) throws jpos.JposExceptionFinal 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.
- Parameters:
challenge
- see UPOS specification, method RetrieveDeviceAuthenticationData- Throws:
jpos.JposException
- See UPOS specification, method RetrieveDeviceAuthenticationData
-
updateKey
Final 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.
- Parameters:
key
- see UPOS specification, method UpdateKeykeyName
- see UPOS specification, method UpdateKey- Throws:
jpos.JposException
- See UPOS specification, method UpdateKey
-
writeTracks
void writeTracks(byte[][] data, int timeout) throws jpos.JposExceptionFinal 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.
- Parameters:
data
- see UPOS specification, method WriteTrackstimeout
- see UPOS specification, method WriteTracks- Throws:
jpos.JposException
- See UPOS specification, method WriteTracks
-