IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.services.landp
Interface MsreServiceInterface

All Known Implementing Classes:
MsreService

public interface MsreServiceInterface

Interface to be implemented by LANDP MSRE services.


Method Summary
 void addReadListener(ReadListener newListener)
           
 void addTimeoutListener(TimeoutListener newListener)
           
 void addWriteListener(WriteListener newListener)
           
 int cancel()
          Cancels a previous read or write operation.
 int close()
          Closes the device.
 int getAllTrackParams(MsreTrackParams[] tp)
          Gets the track parameters for all three tracks
 int getCapabilities(MsreCapabilities cap)
          Gets the device capabilities.
 int getCounters(MsreErrorCounters ec)
          Gets the error counters
 DeviceStatus getStatus()
          Gets the device status: OPEN,CLOSED,READING or WRITING.
 int getTrackParams(int trackNum, MsreTrackParams tp)
          Gets track parameters.
 int getTrackSelFlags(MsreTrackSelFlags tf)
          Gets the track selection flags.
 int open()
          Opens the device with its default server name.
 int open(java.lang.String name)
          Opens the device.
 int read()
          Prepares (arms) the device for reading.
 int read(int timeout)
          Prepares (arms) the device for reading.
 void removeReadListener(ReadListener newListener)
           
 void removeTimeoutListener(TimeoutListener newListener)
           
 void removeWriteListener(WriteListener newListener)
           
 int setAllTrackParams(MsreTrackParams[] tps)
          Sets the track parameters for all three tracks.
 int setTrackParams(int trackNum, MsreTrackParams tp)
          Sets track parameters.
 int setTrackSelFlags(MsreTrackSelFlags tf)
          Sets the track selection flags.
 int write(java.lang.String data)
          Prepares the device for writing.
 int write(java.lang.String data, int timeout)
          Prepares the device for writing.
 

Method Detail

addReadListener

public void addReadListener(ReadListener newListener)
Parameters:
newListener - ReadListener

addTimeoutListener

public void addTimeoutListener(TimeoutListener newListener)
Parameters:
newListener - TimeoutListener

addWriteListener

public void addWriteListener(WriteListener newListener)
Parameters:
newListener - WriteListener

cancel

public int cancel()
           throws LandpException
Cancels a previous read or write operation.

Returns:
int an integer return code.
Throws:
LandpException - thrown when the remote request returned some unexpected error.

close

public int close()
          throws LandpException
Closes the device.

Returns:
int - an integer return code.
Throws:
LandpException - thrown when the remote request returned some unexpected error.

getAllTrackParams

public int getAllTrackParams(MsreTrackParams[] tp)
                      throws LandpException
Gets the track parameters for all three tracks

Parameters:
tp - array of track parameters
Returns:
- the operation return code
Throws:
LandpException - thrown when the remote request returned some unexpected error.

getCapabilities

public int getCapabilities(MsreCapabilities cap)
                    throws LandpException
Gets the device capabilities.

Parameters:
cap - destination capabilities object
Returns:
- the operation return code
Throws:
LandpException - thrown when the remote request returned some unexpected error.

getCounters

public int getCounters(MsreErrorCounters ec)
                throws LandpException
Gets the error counters

Parameters:
ec - destination error counter object
Returns:
- the operation return code
Throws:
LandpException - thrown when the remote request returned some unexpected error.

getStatus

public DeviceStatus getStatus()
Gets the device status: OPEN,CLOSED,READING or WRITING.

Returns:
DeviceStatus the device status.

getTrackParams

public int getTrackParams(int trackNum,
                          MsreTrackParams tp)
                   throws LandpException
Gets track parameters.

Parameters:
trackNum - number of track, 1 to 3.
tp - destination track parameters
Returns:
- the operation return code
Throws:
LandpException - thrown when the remote request returned some unexpected error.

getTrackSelFlags

public int getTrackSelFlags(MsreTrackSelFlags tf)
                     throws LandpException
Gets the track selection flags.

Parameters:
tf - destination flags
Returns:
- the operation return code
Throws:
LandpException - thrown when the remote request returned some unexpected error.

open

public int open()
         throws LandpException
Opens the device with its default server name.

Returns:
int the return code of the operation.
Throws:
LandpException - thrown when the remote request returned some unexpected error.

open

public int open(java.lang.String name)
         throws LandpException
Opens the device.

Parameters:
name - - the LANDP MSRE server name.
Throws:
LandpException - thrown when the remote request returned some unexpected error.

read

public int read()
         throws LandpException
Prepares (arms) the device for reading. Generates a read event when a card is read.

Throws:
LandpException - thrown when the remote request returned some unexpected error.

read

public int read(int timeout)
         throws LandpException
Prepares (arms) the device for reading. Generates a read event when a card is read, or a timeout event if no card is read in that time.

Parameters:
timeout - - Time out in seconds.
Throws:
LandpException - thrown when the remote request returned some unexpected error.

removeReadListener

public void removeReadListener(ReadListener newListener)
Parameters:
newListener - ReadListener

removeTimeoutListener

public void removeTimeoutListener(TimeoutListener newListener)
Parameters:
newListener - TimeoutListener

removeWriteListener

public void removeWriteListener(WriteListener newListener)
Parameters:
newListener - WriteListener

setAllTrackParams

public int setAllTrackParams(MsreTrackParams[] tps)
                      throws LandpException
Sets the track parameters for all three tracks.

Returns:
- the operation return code
Throws:
LandpException - thrown when the remote request returned some unexpected error.

setTrackParams

public int setTrackParams(int trackNum,
                          MsreTrackParams tp)
                   throws LandpException
Sets track parameters.

Parameters:
trackNum - number of track, 1 to 3.
tp - track parameters
Returns:
- the operation return code
Throws:
LandpException - thrown when the remote request returned some unexpected error.

setTrackSelFlags

public int setTrackSelFlags(MsreTrackSelFlags tf)
                     throws LandpException
Sets the track selection flags.

Returns:
- the operation return code
Throws:
LandpException - thrown when the remote request returned some unexpected error.

write

public int write(java.lang.String data)
          throws LandpException
Prepares the device for writing. Generates a write event when a card is written.

Parameters:
data - String - the data to write to the magnetic stripe.
Returns:
int - the operation return code.
Throws:
LandpException - thrown when the remote request returned some unexpected error.

write

public int write(java.lang.String data,
                 int timeout)
          throws LandpException
Prepares the device for writing. Generates a write event when a card is written, or a timeout event if no card is written in that time.

Parameters:
timeout - - Time out in seconds.
data - String - the data to write to the stripe.
Returns:
int - the operation return code.
Throws:
LandpException - thrown when the remote request returned some unexpected error.

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005