The toolkit JXFS Service acts as a layer between the Java(TM) client
application and the J/XFS Device Control. To do this, the service provides
the following functionality:
- Integration of context data with J/XFS forms data. Instead of specifying
all data and contents one at a time as required by the J/FXS Device Control
API, the JXFS Service accesses context data and prepares the form field list
for the J/XFS requests.
- Synchronous calls to make application programming easier with no need
to manage events for these calls.
- The ability to listen to all events from the J/XFS Device Control and
to generate the corresponding toolkit events.
- The service constructor can optionally open the J/XFS Device Control automatically
at instantiation by setting a service attribute. The service monitors the
open status of the Device Control throughout the standard J/XFS asynchronous
opening process; if the service receives a request before the device is opened,
it blocks that request until the device is open. There is also a method available
for the application to wait until this occurs.
- The terminate method service closes the Device Control if it is not closed.
The architecture of the JXFS Service is the following:
An application can instantiate many instances of a JXFSService class. If
an application needs to use two devices, it must instantiate one instance
for each device. If two Java processes need to access the same device,
each one can instantiate one J/XFS Service instance for the same device, and
then they can use the claim() and release() methods for getting exclusive
use of the device. Each of the JXFS Service instances has a different J/XFS
Device Control that corresponds to a physical device, whose J/XFS name is
specified as an attribute tag of the service tag.
To support the various types of devices, the toolkit provides the following JavaBeans(TM) that
extend the JXFSService class:
- JXFSMsd for Magnetic Stripe Device Service
- JXFSPrt for Printer Device Service
- JXFSChk for JXFS Check Reader Device Service
Note that you can create other JavaBeans to support other devices
such as alarms, cash dispensers (recyclers), depositories, printers, and sensors.