IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.jxfsds.wosamsd
Class WosaMSDService

java.lang.Object
  extended bycom.ibm.dse.jxfsds.wosamsd.WosaMSDService
All Implemented Interfaces:
java.util.EventListener, com.jxfs.service.IJxfsBaseService, com.jxfs.service.IJxfsChipCardService, com.jxfs.service.IJxfsMagStripeService, com.jxfs.service.IJxfsMotorizedCardService, com.jxfs.service.IJxfsMSDSecureService, com.jxfs.forum.support.IQueueResponse, com.jxfs.control.msd.JxfsCCDConst, com.jxfs.general.JxfsConst, com.jxfs.control.msd.JxfsMotorizedCardConst, com.jxfs.control.msd.JxfsMSDConst, WOSACmdListener, WOSAConst, WOSADevListener, WOSAIdcConst

public class WosaMSDService
extends java.lang.Object
implements com.jxfs.general.JxfsConst, com.jxfs.control.msd.JxfsMSDConst, com.jxfs.control.msd.JxfsMotorizedCardConst, com.jxfs.control.msd.JxfsCCDConst, com.jxfs.service.IJxfsMagStripeService, com.jxfs.service.IJxfsMotorizedCardService, com.jxfs.service.IJxfsMSDSecureService, com.jxfs.service.IJxfsChipCardService, com.jxfs.forum.support.IQueueResponse, WOSAConst, WOSAIdcConst, WOSACmdListener, WOSADevListener

This is a J/XFS device service which provides MagStripe functionality based on a WOSA wrapper.


Field Summary
static java.lang.String JXFS_COPYRIGHT
          String containing the copyright for this class.
static java.lang.String JXFS_VERSION_CONTROL
          String containing version information for this class.
 
Fields inherited from interface com.jxfs.general.JxfsConst
JXFS_ALL, JXFS_ALM_OFFSET, JXFS_CDR_OFFSET, JXFS_CHK_OFFSET, JXFS_DEP_OFFSET, JXFS_E_BUSY, JXFS_E_CANCELLED, JXFS_E_CLAIMED, JXFS_E_CLOSED, JXFS_E_DISABLED, JXFS_E_EXISTS, JXFS_E_FAILURE, JXFS_E_FIRMWARE, JXFS_E_ILLEGAL, JXFS_E_IO, JXFS_E_NOCONTROL, JXFS_E_NOEXIST, JXFS_E_NOHARDWARE, JXFS_E_NOSERVICE, JXFS_E_NOT_SUPPORTED, JXFS_E_NOTCLAIMED, JXFS_E_NOTREMOTE, JXFS_E_OFFLINE, JXFS_E_OPEN, JXFS_E_PARAMETER_INVALID, JXFS_E_REMOTE, JXFS_E_SYSTEM, JXFS_E_TIMEOUT, JXFS_E_UNREGISTERED, JXFS_FOREVER, JXFS_LEVEL_ACTIVE, JXFS_LEVEL_ALL, JXFS_LEVEL_CONFIGURED, JXFS_LEVEL_WORKSTATION, JXFS_MSD_OFFSET, JXFS_O_CLOSE, JXFS_O_OPEN, JXFS_O_UPDATEFIRMWARE, JXFS_PIN_OFFSET, JXFS_PTR_OFFSET, JXFS_RC_SUCCESSFUL, JXFS_RC_UNSUCCESSFUL, JXFS_S_BIN_STATUS, JXFS_S_CLAIMED, JXFS_S_HARDWAREERROR, JXFS_S_MEDIA_STATUS, JXFS_S_POWERSAVEOFF, JXFS_S_POWERSAVEON, JXFS_S_RELEASED, JXFS_S_REMOTEFAILURE, JXFS_S_SERVICE_STARTED, JXFS_S_SERVICE_STOPPED, JXFS_S_SHUTDOWN, JXFS_S_USERACTIONERROR, JXFS_S_WORKING, JXFS_SIU_OFFSET, JXFS_TIO_OFFSET, JXFS_VALID_CONTROLID, JXFSDEVICE_OFFSET, JXFSDIRECTIO_OFFSET, JXFSERR, JXFSERREXT, NO_MATCH, NO_SOURCE, NO_SUPPORT, OK_NEWER, OK_OLDER, OK_OTHER
 
Fields inherited from interface com.jxfs.control.msd.JxfsMSDConst
JXFS_E_CHK_NOTSUPPORTEDCAP, JXFS_E_MSD_BADDATA, JXFS_E_MSD_INVALIDMEDIA, JXFS_E_MSD_MEDIAJAMMED, JXFS_E_MSD_NO_STRIPE, JXFS_E_MSD_NOMEDIA, JXFS_E_MSD_NOTRACKS, JXFS_E_MSD_NOTSUPPORTEDTRACK, JXFS_E_MSD_PARITY, JXFS_E_MSD_READ_EOF, JXFS_E_MSD_READ_OTHER, JXFS_E_MSD_READFAILURE, JXFS_E_MSD_SHUTTERFAIL, JXFS_E_MSD_WRITEFAILURE, JXFS_I_MSD_MEDIA_INSERTED, JXFS_I_MSD_NO_MEDIA_PRESENT, JXFS_MSD_SEC_NOCHECK, JXFS_MSD_SEC_NOTREADY, JXFS_MSD_SEC_SECFAIL, JXFS_MSD_SEC_SECOK, JXFS_MSD_SECTYPE_CIM86, JXFS_MSD_SECTYPE_MMBOX, JXFS_MSD_SECTYPE_NOTSUPPORTED, JXFS_MSD_TYPE_DIP, JXFS_MSD_TYPE_MOTOR, JXFS_MSD_TYPE_SWIPE, JXFS_O_MSD_READDATA, JXFS_O_MSD_WRITEDATA, JXFS_S_MSD_BIN_STATUS, JXFS_S_MSD_MEDIA_STATUS, JXFS_S_MSD_SEC_NOTREADY, JXFS_S_MSD_SEC_READY, JXFS_S_MSD_SEC_STATUS, JXFS_S_MSD_SEC_UNKNOWN
 
Fields inherited from interface com.jxfs.control.msd.JxfsMotorizedCardConst
JXFS_E_MOTOR_BINFULL, JXFS_E_MOTOR_MEDIAJAMMED, JXFS_E_MOTOR_NOMEDIA, JXFS_E_MOTOR_SHUTTERFAIL, JXFS_I_MOTOR_MEDIATAKEN, JXFS_MOT_OFFSET, JXFS_MOTOR_EJECT, JXFS_MOTOR_EJECT_THEN_RETAIN, JXFS_MOTOR_NOACTION, JXFS_MOTOR_READ_POSITION, JXFS_MOTOR_RETAIN, JXFS_O_MOTOR_EJECTCARD, JXFS_O_MOTOR_RETAINCARD, JXFS_S_MOTOR_BIN_CARDRETAINED
 
Fields inherited from interface com.jxfs.control.msd.JxfsCCDConst
JXFS_CCD_OFFSET, JXFS_CCD_TYPE_CONTACTLESS, JXFS_CCD_TYPE_DIP, JXFS_CCD_TYPE_MOTOR, JXFS_E_CCD_BADDATA, JXFS_E_CCD_BADPROTOCOL, JXFS_E_CCD_INVALIDMEDIA, JXFS_E_CCD_IOERROR, JXFS_E_CCD_MEDIAJAMMED, JXFS_E_CCD_NOMEDIA, JXFS_E_CCD_SHUTTERFAIL, JXFS_I_CCD_MEDIA_INSERTED, JXFS_I_CCD_NO_MEDIA_PRESENT, JXFS_O_CCD_CHIPINIT, JXFS_O_CCD_CHIPIO
 
Fields inherited from interface com.ibm.dse.wosabean.WOSAConst
EXECUTE_EVENTS, SERVICE_EVENTS, SYSTEM_EVENTS, USER_EVENTS, WFS_CLOSE_COMPLETE, WFS_DEREGISTER_COMPLETE, WFS_ERR_ALREADY_STARTED, WFS_ERR_API_VER_TOO_HIGH, WFS_ERR_API_VER_TOO_LOW, WFS_ERR_CANCELED, WFS_ERR_CFG_INVALID_HKEY, WFS_ERR_CFG_INVALID_NAME, WFS_ERR_CFG_INVALID_SUBKEY, WFS_ERR_CFG_INVALID_VALUE, WFS_ERR_CFG_KEY_NOT_EMPTY, WFS_ERR_CFG_NAME_TOO_LONG, WFS_ERR_CFG_NO_MORE_ITEMS, WFS_ERR_CFG_VALUE_TOO_LONG, WFS_ERR_CONNECTION_LOST, WFS_ERR_DEV_NOT_READY, WFS_ERR_HARDWARE_ERROR, WFS_ERR_INTERNAL_ERROR, WFS_ERR_INVALID_ADDRESS, WFS_ERR_INVALID_APP_HANDLE, WFS_ERR_INVALID_BUFFER, WFS_ERR_INVALID_CATEGORY, WFS_ERR_INVALID_COMMAND, WFS_ERR_INVALID_DATA, WFS_ERR_INVALID_EVENT_CLASS, WFS_ERR_INVALID_HPROVIDER, WFS_ERR_INVALID_HSERVICE, WFS_ERR_INVALID_HWND, WFS_ERR_INVALID_HWNDREG, WFS_ERR_INVALID_POINTER, WFS_ERR_INVALID_REQ_ID, WFS_ERR_INVALID_RESULT, WFS_ERR_INVALID_SERVPROV, WFS_ERR_INVALID_TIMER, WFS_ERR_INVALID_TRACELEVEL, WFS_ERR_LOCKED, WFS_ERR_NO_BLOCKING_CALL, WFS_ERR_NO_SERVPROV, WFS_ERR_NO_SUCH_THREAD, WFS_ERR_NO_TIMER, WFS_ERR_NOT_LOCKED, WFS_ERR_NOT_OK_TO_UNLOAD, WFS_ERR_NOT_REGISTERED, WFS_ERR_NOT_STARTED, WFS_ERR_OP_IN_PROGRESS, WFS_ERR_OUT_OF_MEMORY, WFS_ERR_SERVICE_NOT_FOUND, WFS_ERR_SOFTWARE_ERROR, WFS_ERR_SPI_VER_TOO_HIGH, WFS_ERR_SPI_VER_TOO_LOW, WFS_ERR_SRVC_VER_TOO_HIGH, WFS_ERR_SRVC_VER_TOO_LOW, WFS_ERR_TIMEOUT, WFS_ERR_UNSUPP_CATEGORY, WFS_ERR_UNSUPP_COMMAND, WFS_ERR_VERSION_ERROR_IN_SRVC, WFS_EXECUTE_COMPLETE, WFS_EXECUTE_EVENT, WFS_GETINFO_COMPLETE, WFS_INDEFINITE_WAIT, WFS_LOCK_COMPLETE, WFS_OPEN_COMPLETE, WFS_REGISTER_COMPLETE, WFS_SERVICE_EVENT, WFS_STAT_DEVBUSY, WFS_STAT_DEVHWERROR, WFS_STAT_DEVNODEVICE, WFS_STAT_DEVOFFLINE, WFS_STAT_DEVONLINE, WFS_STAT_DEVPOWEROFF, WFS_STAT_DEVUSERERROR, WFS_SUCCESS, WFS_SYSE_APP_DISCONNECT, WFS_SYSE_DEVICE_STATUS, WFS_SYSE_HARDWARE_ERROR, WFS_SYSE_UNDELIVERABLE_MSG, WFS_SYSE_VERSION_ERROR, WFS_SYSTEM_EVENT, WFS_TIMER_EVENT, WFS_TRACE_ALL_API, WFS_TRACE_ALL_SPI, WFS_TRACE_API, WFS_TRACE_MGR, WFS_TRACE_SPI, WFS_UNLOCK_COMPLETE, WFS_USER_EVENT
 
Fields inherited from interface com.ibm.dse.wosabean.WOSAIdcConst
WFS_CMD_IDC_CHIP_IO, WFS_CMD_IDC_EJECT_CARD, WFS_CMD_IDC_READ_RAW_DATA, WFS_CMD_IDC_READ_TRACK, WFS_CMD_IDC_RESET_COUNT, WFS_CMD_IDC_RETAIN_CARD, WFS_CMD_IDC_SETKEY, WFS_CMD_IDC_WRITE_RAW_DATA, WFS_CMD_IDC_WRITE_TRACK, WFS_ERR_IDC_ATRNOTOBTAINED, WFS_ERR_IDC_DATASYNTAX, WFS_ERR_IDC_FORMINVALID, WFS_ERR_IDC_FORMNOTFOUND, WFS_ERR_IDC_INVALIDDATA, WFS_ERR_IDC_INVALIDMEDIA, WFS_ERR_IDC_MEDIAJAM, WFS_ERR_IDC_MEDIARETAINED, WFS_ERR_IDC_NOMEDIA, WFS_ERR_IDC_PROTOCOLNOTSUPP, WFS_ERR_IDC_RETAINBINFULL, WFS_ERR_IDC_SECURITYFAIL, WFS_ERR_IDC_SHUTTERFAIL, WFS_EXEE_IDC_INVALIDMEDIA, WFS_EXEE_IDC_INVALIDTRACKDATA, WFS_EXEE_IDC_MEDIAINSERTED, WFS_IDC_ACTIONREAD, WFS_IDC_ACTIONWRITE, WFS_IDC_CARDEJECTED, WFS_IDC_CARDREADPOSITION, WFS_IDC_CARDRETAINED, WFS_IDC_CHIP, WFS_IDC_CHIPT0, WFS_IDC_CHIPT1, WFS_IDC_CHIPT10, WFS_IDC_CHIPT11, WFS_IDC_CHIPT12, WFS_IDC_CHIPT13, WFS_IDC_CHIPT14, WFS_IDC_CHIPT15, WFS_IDC_CHIPT2, WFS_IDC_CHIPT3, WFS_IDC_CHIPT4, WFS_IDC_CHIPT5, WFS_IDC_CHIPT6, WFS_IDC_CHIPT7, WFS_IDC_CHIPT8, WFS_IDC_CHIPT9, WFS_IDC_DATAINVALID, WFS_IDC_DATAMISSING, WFS_IDC_DATAOK, WFS_IDC_DATASRCMISSING, WFS_IDC_DATASRCNOTSUPP, WFS_IDC_DATATOOLONG, WFS_IDC_DATATOOSHORT, WFS_IDC_EJECT, WFS_IDC_EJECTTHENRETAIN, WFS_IDC_MEDIAENTERING, WFS_IDC_MEDIAJAMMED, WFS_IDC_MEDIANOTPRESENT, WFS_IDC_MEDIANOTSUPP, WFS_IDC_MEDIAPRESENT, WFS_IDC_MEDIAUNKNOWN, WFS_IDC_NOACTION, WFS_IDC_NOTSUPP, WFS_IDC_READPOSITION, WFS_IDC_RETAIN, WFS_IDC_RETAINBINFULL, WFS_IDC_RETAINBINHIGH, WFS_IDC_RETAINBINOK, WFS_IDC_RETAINNOTSUPP, WFS_IDC_SECCIM86, WFS_IDC_SECMMBOX, WFS_IDC_SECNOTREADY, WFS_IDC_SECNOTSUPP, WFS_IDC_SECOPEN, WFS_IDC_SECURITY, WFS_IDC_TRACK1, WFS_IDC_TRACK2, WFS_IDC_TRACK3, WFS_IDC_TYPECONTACTLESS, WFS_IDC_TYPEDIP, WFS_IDC_TYPEMOTOR, WFS_IDC_TYPESWIPE, WFS_INF_IDC_CAPABILITIES, WFS_INF_IDC_FORM_LIST, WFS_INF_IDC_QUERY_FORM, WFS_INF_IDC_STATUS, WFS_SRVE_IDC_CARDACTION, WFS_SRVE_IDC_MEDIAREMOVED, WFS_USRE_IDC_RETAINBINTHRESHOLD
 
Constructor Summary
WosaMSDService()
          class constructor.
 
Method Summary
 void cancel(int identification_id, int control_id)
          Cancels an operation specified by the indentificationID which is received during an asynchronous method call.
 boolean checkInternal()
          This method is called by the QueueControl if Device Service polling is activated by calling QueueControl.checkService(...).
 int chipInit(int controlID)
          /* chipInit /
 int chipIO(byte[] chipData, int protocol, int controlID)
          /* chipIO /
 boolean claim(int timeout, int control_id)
          Used to gain exclusive access to a device.
 void claimInternal(int control_id)
          /* /
 int close(int control_id)
          Finishes the usage of the device by this Device Control.
 void closeInternal(com.jxfs.forum.support.IJxfsServiceJob job)
          Method is called from closeJob Method.
 void connectionFailure(int control_id)
          Informs about a broken connection between Device Control and Service.
 void deregisterControl(int control_id)
          Deregisters the control at the service.
 int directIO(int command, com.jxfs.general.JxfsType serializable, int control_id)
          Performs a device specific function.
 int ejectCard(int controlID)
          /* ejectCard /
 void finalize()
          Proper cleanup before destruction of the object.
 com.jxfs.general.JxfsVersion getDeviceFirmwareVersion(int control_id)
          Gets the version of the current device firmware.
 com.jxfs.general.JxfsVersion getDeviceServiceVersion(int control_id)
          Gets the version of the Device Service.
 int getDeviceType(int controlID)
          /* /
 int getFirmwareStatus(int control_id)
          Checks the current firmware against a firmware found in the repository.
 com.jxfs.general.JxfsMediaStatus getMediaStatus(int controlID)
          /* /
 java.lang.String getPhysicalDeviceDescription(int control_id)
          Gets the device description.
 java.lang.String getPhysicalDeviceName(int control_id)
          Gets the name of the physical device.
 int getPowerOffCapabilities(int controlID)
          /* getPowerOffCapabilities /
 int getPowerOnCapabilities(int controlID)
          /* getPowerOnCapabilities /
 com.jxfs.general.JxfsVersion getRepositoryFirmwareVersion(int control_id)
          Gets the version of the firmware found in the repository.
 com.jxfs.general.JxfsThresholdStatus getRetainBinStatus(int controlID)
          /* getRetainBinStatus /
 int getRetainCardCount(int controlID)
          /* getRetainCardCount /
 byte[] getSecureModuleKey(int controlID)
          /* getSecureModuleKey /
 int getSecureModuleStatus(int controlID)
          /* getSecureModuleStatus /
 int getSecureModuleType(int controlID)
          /* getSecureModuleType /
 com.jxfs.general.JxfsStatus getStatus(int control_id)
          Returns a copy of the current device state.
 com.jxfs.control.msd.JxfsMSDTracks getSupportedReadTracks(int controlID)
          /* /
 com.jxfs.control.msd.JxfsMSDTracks getSupportedWriteTracks(int controlID)
          /* /
 void handleCmd(WOSACmdEvent event)
           
 void handleDevEvt(WOSADevEvent event)
           
 void initialize(com.jxfs.general.JxfsLocalDeviceInformation your_info)
          This method is used by the Device Manager to deliver the detailed device information to the service.
 boolean isCcdT(int noOfProtocol, int controlID)
          /* isCcdT /
 boolean isPowerSaveModeSupported(int control_id)
          Indicates if a power-save mode is supported.
 boolean isRetainCapability(int controlID)
          /* isRetainCapability /
 int open(int control_id)
          To be called first in order to use all other methods (except adding event listeners).
 void openInternal(com.jxfs.forum.support.IJxfsServiceJob job)
          Method is called from openJob Method.
 int readData(com.jxfs.control.msd.JxfsMSDTrackSelection tracksToRead, int controlID)
          /* readData /
 int readData(com.jxfs.control.msd.JxfsMSDTrackSelection tracksToRead, com.jxfs.control.msd.JxfsMSDSecureMode secureMode, int controlID)
          /* readData secure /
 int readWMtrack(int controlID)
          /* readWMtrack /
 int registerControl(java.lang.String device_control_type, com.jxfs.events.IJxfsEventNotification callbacks_implementing_control)
          Registers an IJxfsEventNotification implementing object at the service.
 boolean release(int timeout, int control_id)
          Removes exclusive access to the device.
 void releaseInternal(int control_id)
          /* /
 void resetRetainCardCount(int controlID)
          /* resetRetainCardCount /
 int retainCard(int controlID)
          /* retainCard /
 void setSecureModuleKey(byte[] key, int controlID)
          /* setSecureModuleKey /
 void shutdown()
          This method is used by the Device Manager to deactivate a Device Service.
 boolean updateFirmware(int control_id)
          Starts updating of the firmware.
 int wakeUpFromPowerSave(int control_id)
          Causes a device in power-save mode to return to a active state.
 int writeData(java.util.Vector wdata, boolean newCard, int controlID)
          /* writeData /
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JXFS_VERSION_CONTROL

public static final java.lang.String JXFS_VERSION_CONTROL
String containing version information for this class. This String holds the following values :

See Also:
Constant Field Values

JXFS_COPYRIGHT

public static final java.lang.String JXFS_COPYRIGHT
String containing the copyright for this class.

See Also:
Constant Field Values
Constructor Detail

WosaMSDService

public WosaMSDService()
class constructor.

Method Detail

cancel

public void cancel(int identification_id,
                   int control_id)
            throws com.jxfs.events.JxfsException
Cancels an operation specified by the indentificationID which is received during an asynchronous method call.

Specified by:
cancel in interface com.jxfs.service.IJxfsBaseService
Parameters:
identification_id - an integer, specifies an operation to cancel that is just in process or waiting to be processed.
control_id - an identifier for the calling Device Control.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED.

checkInternal

public boolean checkInternal()
This method is called by the QueueControl if Device Service polling is activated by calling QueueControl.checkService(...). Use checkInternal() for instance to check the status of the device.

Specified by:
checkInternal in interface com.jxfs.forum.support.IQueueResponse
Returns:
true - if the Device Service has to be called again,
false - otherwise.

chipInit

public int chipInit(int controlID)
             throws com.jxfs.events.JxfsException
/* chipInit /

Specified by:
chipInit in interface com.jxfs.service.IJxfsChipCardService
Throws:
com.jxfs.events.JxfsException

chipIO

public int chipIO(byte[] chipData,
                  int protocol,
                  int controlID)
           throws com.jxfs.events.JxfsException
/* chipIO /

Specified by:
chipIO in interface com.jxfs.service.IJxfsChipCardService
Throws:
com.jxfs.events.JxfsException

claim

public boolean claim(int timeout,
                     int control_id)
              throws com.jxfs.events.JxfsException
Used to gain exclusive access to a device. This is a synchronous call.

Specified by:
claim in interface com.jxfs.service.IJxfsBaseService
Parameters:
timeout - an integer, a timeout specified in milliseconds. The time an application wants to wait for getting exclusive access to the device.
control_id - an identifier for the calling Device Control.
Returns:
boolean true if successful, false otherwise.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_CLAIMED.

claimInternal

public void claimInternal(int control_id)
/* /

Specified by:
claimInternal in interface com.jxfs.forum.support.IQueueResponse

close

public int close(int control_id)
          throws com.jxfs.events.JxfsException
Finishes the usage of the device by this Device Control. If only one control has an open state its close causes a physical close of the device.

Specified by:
close in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
int - an identification_id for this asynchronous call.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_CLAIMED, JXFS_E_REMOTE.

closeInternal

public void closeInternal(com.jxfs.forum.support.IJxfsServiceJob job)
Method is called from closeJob Method. This method counts down the open counter. If this was the last close call, the device will be finalized physically.

Specified by:
closeInternal in interface com.jxfs.forum.support.IQueueResponse
Parameters:
job - the job who has called the method
Throws:
com.jxfs.events.JxfsException

connectionFailure

public void connectionFailure(int control_id)
Informs about a broken connection between Device Control and Service. Called by the communication layer in case of a network error which is not detected during a call caused by this object. The Device Service will deregister the specified Device Control.

Specified by:
connectionFailure in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - the id of the Device Control to which the connection is broken.

deregisterControl

public void deregisterControl(int control_id)
                       throws com.jxfs.events.JxfsException
Deregisters the control at the service.

Specified by:
deregisterControl in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Throws:
JXFS_E_UNREGISTERED
com.jxfs.events.JxfsException

directIO

public int directIO(int command,
                    com.jxfs.general.JxfsType serializable,
                    int control_id)
             throws com.jxfs.events.JxfsException
Performs a device specific function.

Specified by:
directIO in interface com.jxfs.service.IJxfsBaseService
Parameters:
command - an identifier for a device specific operation to start.
serializable - an operation specific data object with parameters inside.
control_id - an identifier for the calling Device Control.
Returns:
an identification_id for this asynchronous call.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_REMOTE, JXFS_E_CLAIMED, JXFS_E_NOHARDWARE, JXFS_E_NOT_SUPPORTED.

ejectCard

public int ejectCard(int controlID)
              throws com.jxfs.events.JxfsException
/* ejectCard /

Specified by:
ejectCard in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

finalize

public void finalize()
Proper cleanup before destruction of the object. This method overwrites Object.finalize();


getDeviceFirmwareVersion

public com.jxfs.general.JxfsVersion getDeviceFirmwareVersion(int control_id)
                                                      throws com.jxfs.events.JxfsException
Gets the version of the current device firmware.

Specified by:
getDeviceFirmwareVersion in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
JxfsVersion - the version information.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_NOT_SUPPORTED.

getDeviceServiceVersion

public com.jxfs.general.JxfsVersion getDeviceServiceVersion(int control_id)
                                                     throws com.jxfs.events.JxfsException
Gets the version of the Device Service.

Specified by:
getDeviceServiceVersion in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
JxfsVersion - contains the version information.
Throws:
com.jxfs.events.JxfsException - JXFS_E_REMOTE.

getDeviceType

public int getDeviceType(int controlID)
                  throws com.jxfs.events.JxfsException
/* /

Specified by:
getDeviceType in interface com.jxfs.service.IJxfsMagStripeService
Throws:
com.jxfs.events.JxfsException

getFirmwareStatus

public int getFirmwareStatus(int control_id)
                      throws com.jxfs.events.JxfsException
Checks the current firmware against a firmware found in the repository.

Specified by:
getFirmwareStatus in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
int - OK_NEWER - firmware in repository is newer than current firmware, OK_OLDER - current firmware is newer but update possible, OK_OTHER - different firmware functionality but update possible, NO_SOURCE - no firmware found in the repository, NO_MATCH - firmware in the repository is not correct for this device, NO_SUPPORT - firmware update is not possible with this device.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_NOHARDWARE.

getMediaStatus

public com.jxfs.general.JxfsMediaStatus getMediaStatus(int controlID)
                                                throws com.jxfs.events.JxfsException
/* /

Specified by:
getMediaStatus in interface com.jxfs.service.IJxfsMagStripeService
Throws:
com.jxfs.events.JxfsException

getPhysicalDeviceDescription

public java.lang.String getPhysicalDeviceDescription(int control_id)
                                              throws com.jxfs.events.JxfsException
Gets the device description.

Specified by:
getPhysicalDeviceDescription in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
String - the device description.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_NOHARDWARE.

getPhysicalDeviceName

public java.lang.String getPhysicalDeviceName(int control_id)
                                       throws com.jxfs.events.JxfsException
Gets the name of the physical device.

Specified by:
getPhysicalDeviceName in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
String - the device name.
Throws:
com.jxfs.events.JxfsException - JXFS_E_CLOSED,, JXFS_E_NOHARDWARE.

getPowerOffCapabilities

public int getPowerOffCapabilities(int controlID)
                            throws com.jxfs.events.JxfsException
/* getPowerOffCapabilities /

Specified by:
getPowerOffCapabilities in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

getPowerOnCapabilities

public int getPowerOnCapabilities(int controlID)
                           throws com.jxfs.events.JxfsException
/* getPowerOnCapabilities /

Specified by:
getPowerOnCapabilities in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

getRepositoryFirmwareVersion

public com.jxfs.general.JxfsVersion getRepositoryFirmwareVersion(int control_id)
                                                          throws com.jxfs.events.JxfsException
Gets the version of the firmware found in the repository.

Specified by:
getRepositoryFirmwareVersion in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
JxfsVersion - the version information.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_NOT_SUPPORTED.

getRetainBinStatus

public com.jxfs.general.JxfsThresholdStatus getRetainBinStatus(int controlID)
                                                        throws com.jxfs.events.JxfsException
/* getRetainBinStatus /

Specified by:
getRetainBinStatus in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

getRetainCardCount

public int getRetainCardCount(int controlID)
                       throws com.jxfs.events.JxfsException
/* getRetainCardCount /

Specified by:
getRetainCardCount in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

getSecureModuleKey

public byte[] getSecureModuleKey(int controlID)
                          throws com.jxfs.events.JxfsException
/* getSecureModuleKey /

Specified by:
getSecureModuleKey in interface com.jxfs.service.IJxfsMSDSecureService
Throws:
com.jxfs.events.JxfsException

getSecureModuleStatus

public int getSecureModuleStatus(int controlID)
                          throws com.jxfs.events.JxfsException
/* getSecureModuleStatus /

Specified by:
getSecureModuleStatus in interface com.jxfs.service.IJxfsMSDSecureService
Throws:
com.jxfs.events.JxfsException

getSecureModuleType

public int getSecureModuleType(int controlID)
                        throws com.jxfs.events.JxfsException
/* getSecureModuleType /

Specified by:
getSecureModuleType in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

getStatus

public com.jxfs.general.JxfsStatus getStatus(int control_id)
                                      throws com.jxfs.events.JxfsException
Returns a copy of the current device state.

Specified by:
getStatus in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
JxfsStatus - an object which is a clone of the original JxfsStatus object maintained by the Device Service. So, actuality of the delivered information is a matter of time.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_REMOTE.

getSupportedReadTracks

public com.jxfs.control.msd.JxfsMSDTracks getSupportedReadTracks(int controlID)
                                                          throws com.jxfs.events.JxfsException
/* /

Specified by:
getSupportedReadTracks in interface com.jxfs.service.IJxfsMagStripeService
Throws:
com.jxfs.events.JxfsException

getSupportedWriteTracks

public com.jxfs.control.msd.JxfsMSDTracks getSupportedWriteTracks(int controlID)
                                                           throws com.jxfs.events.JxfsException
/* /

Specified by:
getSupportedWriteTracks in interface com.jxfs.service.IJxfsMagStripeService
Throws:
com.jxfs.events.JxfsException

handleCmd

public void handleCmd(WOSACmdEvent event)
Specified by:
handleCmd in interface WOSACmdListener
Parameters:
event - WOSACmdEvent

handleDevEvt

public void handleDevEvt(WOSADevEvent event)
Specified by:
handleDevEvt in interface WOSADevListener
Parameters:
event - WOSADevEvent

initialize

public void initialize(com.jxfs.general.JxfsLocalDeviceInformation your_info)
                throws com.jxfs.events.JxfsException
This method is used by the Device Manager to deliver the detailed device information to the service.

Specified by:
initialize in interface com.jxfs.service.IJxfsBaseService
Parameters:
your_info - the Device Information.
Throws:
com.jxfs.events.JxfsException - JXFS_E_REMOTE - in case of unsuccessful lookup performed by the client side of the communication layer.

isCcdT

public boolean isCcdT(int noOfProtocol,
                      int controlID)
               throws com.jxfs.events.JxfsException
/* isCcdT /

Specified by:
isCcdT in interface com.jxfs.service.IJxfsChipCardService
Throws:
com.jxfs.events.JxfsException

isPowerSaveModeSupported

public boolean isPowerSaveModeSupported(int control_id)
                                 throws com.jxfs.events.JxfsException
Indicates if a power-save mode is supported.

Specified by:
isPowerSaveModeSupported in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
boolean - true, if supported.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED.

isRetainCapability

public boolean isRetainCapability(int controlID)
                           throws com.jxfs.events.JxfsException
/* isRetainCapability /

Specified by:
isRetainCapability in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

open

public int open(int control_id)
         throws com.jxfs.events.JxfsException
To be called first in order to use all other methods (except adding event listeners). The first open a Device Service receives from a Device Control causes a physical initialization of the device.

Specified by:
open in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
int - an identification_id for this asynchronous call.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_OPEN.

openInternal

public void openInternal(com.jxfs.forum.support.IJxfsServiceJob job)
                  throws com.jxfs.events.JxfsException
Method is called from openJob Method. This method counts up the open counter. If this was the first open call, the device will be initialized physically.

Specified by:
openInternal in interface com.jxfs.forum.support.IQueueResponse
Parameters:
job - the job who has called the method
Throws:
com.jxfs.events.JxfsException

readData

public int readData(com.jxfs.control.msd.JxfsMSDTrackSelection tracksToRead,
                    int controlID)
             throws com.jxfs.events.JxfsException
/* readData /

Specified by:
readData in interface com.jxfs.service.IJxfsMagStripeService
Throws:
com.jxfs.events.JxfsException

readData

public int readData(com.jxfs.control.msd.JxfsMSDTrackSelection tracksToRead,
                    com.jxfs.control.msd.JxfsMSDSecureMode secureMode,
                    int controlID)
             throws com.jxfs.events.JxfsException
/* readData secure /

Specified by:
readData in interface com.jxfs.service.IJxfsMSDSecureService
Throws:
com.jxfs.events.JxfsException

readWMtrack

public int readWMtrack(int controlID)
                throws com.jxfs.events.JxfsException
/* readWMtrack /

Specified by:
readWMtrack in interface com.jxfs.service.IJxfsMSDSecureService
Throws:
com.jxfs.events.JxfsException

registerControl

public int registerControl(java.lang.String device_control_type,
                           com.jxfs.events.IJxfsEventNotification callbacks_implementing_control)
                    throws com.jxfs.events.JxfsException
Registers an IJxfsEventNotification implementing object at the service.

Specified by:
registerControl in interface com.jxfs.service.IJxfsBaseService
Parameters:
device_control_type - the name of the Device Control type.
Returns:
the controlId (control_id);
Throws:
com.jxfs.events.JxfsException - JXFS_E_REMOTE - in case of network error.

release

public boolean release(int timeout,
                       int control_id)
                throws com.jxfs.events.JxfsException
Removes exclusive access to the device. This is a synchronous call.

Specified by:
release in interface com.jxfs.service.IJxfsBaseService
Parameters:
timeout - an integer, a timeout specified in milliseconds. The time an application wants to wait for removing an exclusive access to the device.
control_id - an identifier for the calling Device Control.
Returns:
boolean - true if successful, false otherwise.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_NOTCLAIMED.

releaseInternal

public void releaseInternal(int control_id)
/* /

Specified by:
releaseInternal in interface com.jxfs.forum.support.IQueueResponse

resetRetainCardCount

public void resetRetainCardCount(int controlID)
                          throws com.jxfs.events.JxfsException
/* resetRetainCardCount /

Specified by:
resetRetainCardCount in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

retainCard

public int retainCard(int controlID)
               throws com.jxfs.events.JxfsException
/* retainCard /

Specified by:
retainCard in interface com.jxfs.service.IJxfsMotorizedCardService
Throws:
com.jxfs.events.JxfsException

setSecureModuleKey

public void setSecureModuleKey(byte[] key,
                               int controlID)
                        throws com.jxfs.events.JxfsException
/* setSecureModuleKey /

Specified by:
setSecureModuleKey in interface com.jxfs.service.IJxfsMSDSecureService
Throws:
com.jxfs.events.JxfsException

shutdown

public void shutdown()
              throws com.jxfs.events.JxfsException
This method is used by the Device Manager to deactivate a Device Service. The DS ends the current job (if not possible it terminates it) and throws away all the pending jobs (without sending OperationCompleteEvents). Then it shuts down the physical device and writes any remaining persistent data into the repository. Finally, it sends a StatusEvent with the status JXFS_S_SHUTDOWN to all registered Device Controls. They have to delete their reference to the Device Service and disable themselves (i.e. always return JXFS_E_UNREGISTERED out of any operation from now on). This event is then propagated to the application by the DC’s.

Specified by:
shutdown in interface com.jxfs.service.IJxfsBaseService
Throws:
com.jxfs.events.JxfsException - common exceptions.

updateFirmware

public boolean updateFirmware(int control_id)
                       throws com.jxfs.events.JxfsException
Starts updating of the firmware.

Specified by:
updateFirmware in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
boolean - true, if the update process could be started.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_NOHARDWARE, JXFS_E_FIRMWARE, JXFS_E_NOT_SUPPORTED.

wakeUpFromPowerSave

public int wakeUpFromPowerSave(int control_id)
                        throws com.jxfs.events.JxfsException
Causes a device in power-save mode to return to a active state.

Specified by:
wakeUpFromPowerSave in interface com.jxfs.service.IJxfsBaseService
Parameters:
control_id - an identifier for the calling Device Control.
Returns:
int - the number of seconds the device needs to get back to an active status or -1 if n/a.
Throws:
com.jxfs.events.JxfsException - JXFS_E_UNREGISTERED, JXFS_E_CLOSED, JXFS_E_REMOTE.

writeData

public int writeData(java.util.Vector wdata,
                     boolean newCard,
                     int controlID)
              throws com.jxfs.events.JxfsException
/* writeData /

Specified by:
writeData in interface com.jxfs.service.IJxfsMagStripeService
Throws:
com.jxfs.events.JxfsException

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005