Class MICRProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.micr.MICRProperties
- All Implemented Interfaces:
JposBaseInterface,MICRInterface
- Direct Known Subclasses:
MICR
Class containing the MICR specific properties, their default values and default implementations of
MICRInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter MICR -
Magnetic Ink Character Recognition Reader.
-
Field Summary
FieldsModifier and TypeFieldDescriptionUPOS property AccountNumber.UPOS property Amount.UPOS property BankNumber.booleanUPOS property CapValidationDevice.intUPOS property CheckType.intUPOS property CountryCode.UPOS property EPC.booleanThis property will be used internally to verify whether BeginInsertion and EndInsertion are valid operations.UPOS property RawData.booleanThis property will be used internally to verify whether BeginRemoval and EndRemoval are valid operations.UPOS property SerialNumber.UPOS property TransitNumber.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 TypeMethodDescriptionvoidbeginInsertion(int timeout)Final part of BeginInsertion method.voidbeginRemoval(int timeout)Final part of BeginRemoval method.voidChecks whether the device is busy.voidChecks whether MICR data are available for processing.voidClear data properties.voidFinal part of EndInsertion method.voidFinal part of EndRemoval method.voidInitialization of properties that must be initialized during open.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, checkProperties, claim, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnEnable, 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
-
InsertionMode
public boolean InsertionModeThis property will be used internally to verify whether BeginInsertion and EndInsertion are valid operations. It will be initialized to false during device enable. -
RemovalMode
public boolean RemovalModeThis property will be used internally to verify whether BeginRemoval and EndRemoval are valid operations. It will be initialized to false during device enable. -
AccountNumber
UPOS property AccountNumber. -
Amount
UPOS property Amount. -
BankNumber
UPOS property BankNumber. -
CapValidationDevice
public boolean CapValidationDeviceUPOS property CapValidationDevice. Default: true. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CheckType
public int CheckTypeUPOS property CheckType. -
CountryCode
public int CountryCodeUPOS property CountryCode. -
EPC
UPOS property EPC. -
RawData
UPOS property RawData. -
SerialNumber
UPOS property SerialNumber. -
TransitNumber
UPOS property TransitNumber.
-
-
Constructor Details
-
MICRProperties
public MICRProperties(int dev)Constructor.- 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
-
clearDataProperties
public void clearDataProperties()Description copied from class:JposCommonPropertiesClear data properties. Performed during ClearInput and ClearInputProperties.- Overrides:
clearDataPropertiesin classJposCommonProperties
-
checkNoData
public void checkNoData() throws jpos.JposExceptionDescription copied from interface:MICRInterfaceChecks whether MICR data are available for processing. The default implementation returns if CheckType > 0. Otherwise, a UPOS exception will be generated with error code E_EXTENDED and extender error code EMICR_NODATA. The following checks have been made before this method will be invoked:- The device has been claimed.
- Specified by:
checkNoDatain interfaceMICRInterface- Throws:
jpos.JposException- If MICR data cannot be retrieved.
-
checkBusy
public void checkBusy() throws jpos.JposExceptionDescription copied from interface:MICRInterfaceChecks whether the device is busy. Since MICRService often shares one physical device with a printer, busy means MICR or printer of the device is busy. If checking property State is not enough, this method must be overwritten in a derived class.- Specified by:
checkBusyin interfaceMICRInterface- Throws:
jpos.JposException- If device is busy orin error status.
-
beginInsertion
public void beginInsertion(int timeout) throws jpos.JposExceptionDescription copied from interface:MICRInterfaceFinal part of BeginInsertion method. 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 enabled,
- checkBusy did not throw an exception,
- The timeout is ≥ 0 or JPOS_FOREVER.
- Specified by:
beginInsertionin interfaceMICRInterface- Parameters:
timeout- See UPOS specification, method BeginInsertion.- Throws:
jpos.JposException- See UPOS specification, method DisplayText.
-
beginRemoval
public void beginRemoval(int timeout) throws jpos.JposExceptionDescription copied from interface:MICRInterfaceFinal part of BeginRemoval method. 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 enabled,
- checkBusy did not throw an exception,
- The timeout is ≥ 0 or JPOS_FOREVER.
- Specified by:
beginRemovalin interfaceMICRInterface- Parameters:
timeout- See UPOS specification, method BeginRemoval.- Throws:
jpos.JposException- See UPOS specification, method DisplayText.
-
endInsertion
public void endInsertion() throws jpos.JposExceptionDescription copied from interface:MICRInterfaceFinal part of EndInsertion method. 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 enabled,
- checkBusy did not throw an exception,
- Device is not in insertion mode,
- Specified by:
endInsertionin interfaceMICRInterface- Throws:
jpos.JposException- See UPOS specification, method EndInsertion.
-
endRemoval
public void endRemoval() throws jpos.JposExceptionDescription copied from interface:MICRInterfaceFinal part of EndRemoval method. 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 enabled,
- checkBusy did not throw an exception,
- Device is not in removal mode,
- Specified by:
endRemovalin interfaceMICRInterface- Throws:
jpos.JposException- See UPOS specification, method EndRemoval.
-