com.ibm.dse.services.checkreader
Interface CheckReaderInterface

All Known Implementing Classes:
CheckReader

public interface CheckReaderInterface
extends Notifier

Interface implemented by the CheckReader service. Has to be also implemented by user written services accessing a reader device using the Amper Standard protocol.


Field Summary
static java.lang.String BAD_CHARACTER_EVENT
           
static java.lang.String CANCEL_EVENT
           
static java.lang.String COMPLETED_EVENT
           
static java.lang.String MALFUNCTION_EVENT
           
static java.lang.String TIMEOUT_EVENT
           
static java.lang.String UNKNOWN_EVENT
           
 
Method Summary
 void cancel()
          Cancels the read function.
 void close()
          Closes the serial communications port.
 java.lang.String getDataRead()
          Gets the data read from the reader.
 void open()
          Opens and initializes the serial communications port.
 void read()
          Reads the data from the device using the asyncronous mode.
 void readAndUnformat(Context aContext, FormatElement aFormat)
          Reads the data from the device using the asyncronous mode and unformats it.
 java.lang.String readAndWait()
          Reads the data from the device using the syncronous mode.
 void readAndWaitAndUnformat(Context aContext, FormatElement aFormat)
          Reads the data from the device using the syncronous mode and unformats it.
 
Methods inherited from interface com.ibm.dse.base.Notifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, terminate
 

Field Detail

COMPLETED_EVENT

public static final java.lang.String COMPLETED_EVENT

CANCEL_EVENT

public static final java.lang.String CANCEL_EVENT

TIMEOUT_EVENT

public static final java.lang.String TIMEOUT_EVENT

MALFUNCTION_EVENT

public static final java.lang.String MALFUNCTION_EVENT

BAD_CHARACTER_EVENT

public static final java.lang.String BAD_CHARACTER_EVENT

UNKNOWN_EVENT

public static final java.lang.String UNKNOWN_EVENT
Method Detail

cancel

public void cancel()
            throws DSECheckReaderException
Cancels the read function.
Throws:
com.ibm.dse.services.checkreader.DSECheckReaderException. -  

close

public void close()
           throws DSECheckReaderException
Closes the serial communications port.
Throws:
com.ibm.dse.services.checkreader.DSECheckReaderException. -  

getDataRead

public java.lang.String getDataRead()
Gets the data read from the reader.
Returns:
java.lang.String

open

public void open()
          throws DSECheckReaderException
Opens and initializes the serial communications port.
Throws:
com.ibm.dse.services.checkreader.DSECheckReaderException. -  

read

public void read()
          throws DSECheckReaderException
Reads the data from the device using the asyncronous mode.
Throws:
com.ibm.dse.services.checkreader.DSECheckReaderException. -  

readAndUnformat

public void readAndUnformat(Context aContext,
                            FormatElement aFormat)
                     throws DSECheckReaderException
Reads the data from the device using the asyncronous mode and unformats it.
Parameters:
aContext - Context
aFormat - FormatElement
Throws:
com.ibm.dse.services.checkreader.DSECheckReaderException. -  

readAndWait

public java.lang.String readAndWait()
                             throws DSECheckReaderException
Reads the data from the device using the syncronous mode.
Returns:
java.lang.String
Throws:
com.ibm.dse.services.checkreader.DSECheckReaderException. -  

readAndWaitAndUnformat

public void readAndWaitAndUnformat(Context aContext,
                                   FormatElement aFormat)
                            throws DSEInvalidArgumentException,
                                   DSEInvalidRequestException,
                                   DSECheckReaderException
Reads the data from the device using the syncronous mode and unformats it.
Parameters:
aContext - Context
aFormat - FormatElement
Throws:
com.ibm.dse.base.DSEInvalidArgumentException. -  
com.ibm.dse.base.DSEInvalidRequestException. -  
com.ibm.dse.services.checkreader.DSECheckReaderException. -