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.int
UPOS property CapDataEncryption.int
UPOS property CapDeviceAuthentication.boolean
UPOS property CapISO.boolean
UPOS property CapJISOne.boolean
UPOS property CapJISTwo.boolean
UPOS property CapTrackDataMasking.boolean
UPOS property CapTransmitSentinels.int
UPOS property CapWritableTracks.byte[]
UPOS property CardAuthenticationData.int
UPOS property CardAuthenticationDataLength.UPOS property CardPropertyList.UPOS property CardType.UPOS property CardTypeList.int
UPOS property DataEncryptionAlgorithm.boolean
UPOS property DecodeData.boolean
UPOS property DeviceAuthenticated.int
UPOS property DeviceAuthenticationProtocol.int
UPOS property EncodingMaxLength.int
UPOS property ErrorReportingType.UPOS property ExpirationDate.UPOS property FirstName.UPOS property MiddleInitial.boolean
UPOS 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.int
UPOS property Track1EncryptedDataLength.byte[]
UPOS property Track2Data.byte[]
UPOS property Track2DiscretionaryData.byte[]
UPOS property Track2EncryptedData.int
UPOS property Track2EncryptedDataLength.byte[]
UPOS property Track3Data.byte[]
UPOS property Track3EncryptedData.int
UPOS property Track3EncryptedDataLength.byte[]
UPOS property Track4Data.byte[]
UPOS property Track4EncryptedData.int
UPOS property Track4EncryptedDataLength.int
UPOS property TracksToRead.int
UPOS property TracksToWrite.boolean
UPOS 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 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
initOnEnable(boolean enable)
Initialization of properties that must be initialized during deviceEnable.void
Initialization of properties that must be initialized during open.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 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, waitWaiter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
-
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:JposCommonProperties
Initialization of properties that must be initialized during open.- Overrides:
initOnOpen
in classJposCommonProperties
-
initOnEnable
public void initOnEnable(boolean enable)Description copied from class:JposCommonProperties
Initialization of properties that must be initialized during deviceEnable.- Overrides:
initOnEnable
in classJposCommonProperties
- Parameters:
enable
- True: initialize properties, false: do nothing
-
setDataProperties
Description copied from interface:MSRInterface
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.- Specified by:
setDataProperties
in interfaceMSRInterface
- Parameters:
tracks
- Contents of track data.
-
dataEncryptionAlgorithm
public void dataEncryptionAlgorithm(int b) throws jpos.JposExceptionDescription copied from interface:MSRInterface
Final 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:
dataEncryptionAlgorithm
in interfaceMSRInterface
- Parameters:
b
- New DataEncryptionAlgorithm value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
writeCardType
Description copied from interface:MSRInterface
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.
- Specified by:
writeCardType
in 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:MSRInterface
Final 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:
tracksToWrite
in 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:MSRInterface
Final 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:
transmitSentinels
in 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:MSRInterface
Final 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:
decodeData
in 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:MSRInterface
Final 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:
errorReportingType
in 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:MSRInterface
Final 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:
parseDecodeData
in 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:MSRInterface
Final 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:
tracksToRead
in 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:MSRInterface
Final 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:
authenticateDevice
in 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:MSRInterface
Final 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:
deauthenticateDevice
in interfaceMSRInterface
- Parameters:
response
- see UPOS specification, method DeauthenticateDevice- Throws:
jpos.JposException
- See UPOS specification, method DeauthenticateDevice
-
retrieveCardProperty
Description copied from interface:MSRInterface
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.
- Specified by:
retrieveCardProperty
in 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:MSRInterface
Final 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:
retrieveDeviceAuthenticationData
in interfaceMSRInterface
- Parameters:
challenge
- see UPOS specification, method RetrieveDeviceAuthenticationData- Throws:
jpos.JposException
- See UPOS specification, method RetrieveDeviceAuthenticationData
-
updateKey
Description copied from interface:MSRInterface
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.
- Specified by:
updateKey
in 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:MSRInterface
Final 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:
writeTracks
in interfaceMSRInterface
- Parameters:
data
- see UPOS specification, method WriteTrackstimeout
- see UPOS specification, method WriteTracks- Throws:
jpos.JposException
- See UPOS specification, method WriteTracks
-