Package SampleCombiDevice
Class MSR
- All Implemented Interfaces:
JposBaseInterface,MSRInterface
Class implementing the MSRInterface for the sample combi device.
External and interactive Checkhealth might be implemented in a later version.
-
Field Summary
Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.msr.MSRProperties
AccountNumber, AdditionalSecurityInformation, CapCardAuthentication, CapDataEncryption, CapDeviceAuthentication, CapISO, CapJISOne, CapJISTwo, CapTrackDataMasking, CapTransmitSentinels, CapWritableTracks, CardAuthenticationData, CardAuthenticationDataLength, CardPropertyList, CardType, CardTypeList, DataEncryptionAlgorithm, DecodeData, DeviceAuthenticated, DeviceAuthenticationProtocol, EncodingMaxLength, ErrorReportingType, ExpirationDate, FirstName, MiddleInitial, ParseDecodeData, ServiceCode, Suffix, Surname, Title, Track1Data, Track1DiscretionaryData, Track1EncryptedData, Track1EncryptedDataLength, Track2Data, Track2DiscretionaryData, Track2EncryptedData, Track2EncryptedDataLength, Track3Data, Track3EncryptedData, Track3EncryptedDataLength, Track4Data, Track4EncryptedData, Track4EncryptedDataLength, TracksToRead, TracksToWrite, TransmitSentinels, WriteCardTypeFields 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 TypeMethodDescriptionvoidcheckHealth(int level)Final part of CheckHealth method.voidclaim(int timeout)Final part of setting claim.voiddecodeData(boolean decode)Final part of setting DecodeData.voiddeviceEnabled(boolean enable)Final part of setting DeviceEnabled.voidrelease()Final part of release method.voidSets data properties according to the track data.voidtransmitSentinels(boolean transmit)Final part of setting TransmitSentinels.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.msr.MSRProperties
authenticateDevice, dataEncryptionAlgorithm, deauthenticateDevice, errorReportingType, initOnEnable, initOnOpen, parseDecodeData, retrieveCardProperty, retrieveDeviceAuthenticationData, tracksToRead, tracksToWrite, updateKey, writeCardType, writeTracksMethods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkProperties, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnFirstEnable, newJposOutputRequest, open, powerNotify, 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, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Constructor Details
-
MSR
Constructor. Gets instance of Device to be used as communication object. Device index for sample is always 0.- Parameters:
dev- Instance of Device this object belongs to.
-
-
Method Details
-
claim
public void claim(int timeout) throws jpos.JposExceptionDescription copied from interface:JposBaseInterfaceFinal part of setting claim. Can be overwritten within derived classes. This method will be called only if the following plausibility checks lead to a positive result:- Device has not been closed,
- The device is not claimed,
- ExclusiveUse dos not equal ExclusiveNo,
- timeout is negative not equal to FOREVER.
- Specified by:
claimin interfaceJposBaseInterface- Overrides:
claimin classJposCommonProperties- Parameters:
timeout- see UPOS specification, method Claim- Throws:
jpos.JposException- If an error occurs while claiming the device
-
release
public void release() throws jpos.JposExceptionDescription copied from interface:JposBaseInterfaceFinal part of release 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 claimed,
- ExclusiveUse equals ExclusiveYes: Device is not enabled.
- Specified by:
releasein interfaceJposBaseInterface- Overrides:
releasein classJposCommonProperties- Throws:
jpos.JposException- See UPOS specification, method Release
-
deviceEnabled
public void deviceEnabled(boolean enable) throws jpos.JposExceptionDescription copied from interface:JposBaseInterfaceFinal part of setting DeviceEnabled. Can be overwritten within derived classes. Performs initOnEnable method of corresponding property set in addition to setting DeviceEnabled. This method will be called only if the following plausibility checks lead to a positive result:- Device has not been closed,
- ExclusiveUse equals ExclusiveYes: Device is claimed,
- DeviceEnabled != enabled.
- Specified by:
deviceEnabledin interfaceJposBaseInterface- Overrides:
deviceEnabledin classJposCommonProperties- Parameters:
enable- True to enable, false to disable- Throws:
jpos.JposException- If an error occurs during enable or disable
-
checkHealth
public void checkHealth(int level) throws jpos.JposExceptionDescription copied from interface:JposBaseInterfaceFinal part of CheckHealth method. Can be overwritten in derived class, if necessary. Keep in mind that dvice class specific checks (e.g. check of Claimed or DeviceEnabled) must be done within derived classes. This method will be called only if the following plausibility checks lead to a positive result:- Device is neither enabled nor claimed.
- Specified by:
checkHealthin interfaceJposBaseInterface- Overrides:
checkHealthin classJposCommonProperties- Parameters:
level- See UPOS specification, method CheckHealth- Throws:
jpos.JposException- See UPOS specification, method CheckHealth
-
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- Overrides:
setDataPropertiesin classMSRProperties- Parameters:
o- Contents of track data.
-
transmitSentinels
public void transmitSentinels(boolean transmit) 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- Overrides:
transmitSentinelsin classMSRProperties- Parameters:
transmit- New TransmitSentinels value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
decodeData
public void decodeData(boolean decode) 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- Overrides:
decodeDatain classMSRProperties- Parameters:
decode- New DecodeData value- Throws:
jpos.JposException- If an error occurs during enable or disable
-