Interface MSRInterface

All Superinterfaces:
JposBaseInterface
All Known Implementing Classes:
MSR, MSRProperties

public interface MSRInterface extends JposBaseInterface
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 Details

    • setDataProperties

      void setDataProperties(Object tracks)
      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.JposException
      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.
      Parameters:
      b - New DataEncryptionAlgorithm value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • writeCardType

      void writeCardType(String type) throws jpos.JposException
      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.JposException
      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.
      Parameters:
      t2w - New TracksToWrite value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • transmitSentinels

      void transmitSentinels(boolean flag) throws jpos.JposException
      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.
      Parameters:
      flag - New TransmitSentinels value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • decodeData

      void decodeData(boolean flag) throws jpos.JposException
      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.
      Parameters:
      flag - New DecodeData value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • errorReportingType

      void errorReportingType(int type) throws jpos.JposException
      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.
      Parameters:
      type - New ErrorReportingType value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • parseDecodeData

      void parseDecodeData(boolean flag) throws jpos.JposException
      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.
      Parameters:
      flag - New ParseDecodeData value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • tracksToRead

      void tracksToRead(int t2r) throws jpos.JposException
      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.
      Parameters:
      t2r - New TracksToRead value
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • authenticateDevice

      void authenticateDevice(byte[] response) throws jpos.JposException
      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.
      Parameters:
      response - see UPOS specification, method AuthenticateDevice
      Throws:
      jpos.JposException - See UPOS specification, method AuthenticateDevice
    • deauthenticateDevice

      void deauthenticateDevice(byte[] response) throws jpos.JposException
      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.
      Parameters:
      response - see UPOS specification, method DeauthenticateDevice
      Throws:
      jpos.JposException - See UPOS specification, method DeauthenticateDevice
    • retrieveCardProperty

      void retrieveCardProperty(String name, String[] value) throws jpos.JposException
      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 RetrieveCardProperty
      value - see UPOS specification, method RetrieveCardProperty
      Throws:
      jpos.JposException - See UPOS specification, method RetrieveCardProperty
    • retrieveDeviceAuthenticationData

      void retrieveDeviceAuthenticationData(byte[][] challenge) throws jpos.JposException
      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.
      Parameters:
      challenge - see UPOS specification, method RetrieveDeviceAuthenticationData
      Throws:
      jpos.JposException - See UPOS specification, method RetrieveDeviceAuthenticationData
    • updateKey

      void updateKey(String key, String keyName) throws jpos.JposException
      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 UpdateKey
      keyName - see UPOS specification, method UpdateKey
      Throws:
      jpos.JposException - See UPOS specification, method UpdateKey
    • writeTracks

      void writeTracks(byte[][] data, int timeout) throws jpos.JposException
      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.
      Parameters:
      data - see UPOS specification, method WriteTracks
      timeout - see UPOS specification, method WriteTracks
      Throws:
      jpos.JposException - See UPOS specification, method WriteTracks