The advantage to this is that a lot of the required functionality is already implemented. If the terminal comes with prebuilt libraries, you can use those by means of Java's native method interface (JNI). This can be accomplished in one of several ways. Your Java terminal class must somehow communicate with the physical device. Enable communication over m or native methods The number of slots will default to one in most cases, but as the smart card market expands we'll see devices with more than one slot.ĭ. So take this name and make a name string from it that complies with the Java syntax. The card terminal device should come with a name. Determine the name of the terminal family
If you don't have a factory class yet, well, write one from scratch! (We'll explain how to do this later on in the article.)ī. If you already have such a factory class, reuse it and change it such that it can handle the new CardTerminal class too. Objects of subclasses of CardTerminal are brought into being by means of a factory object. Create a new factory class or reuse an existing one The missing terminal-dependent functionality is comprised of the following facilities:Ī. This means some work remains to be done by the "terminal integrator" - yes, that's you! Including a concrete card terminal class simply isn't possible due to the sheer variety of existing devices. (Although they're often called card readers, the OCF uses the more general, all-encompassing term card terminal for these devices.) Unfortunately, no concrete card terminal class was provided in the core and opt packages (although there are a few example implementations in the OCF Reference Implementation). The OpenCard Framework offers general functionality for dealing with card terminals. We hope this article will convince you that this is a fairly easy process!
Now, what exactly do you need to do to make the two work together? In this edition of Java Developer, we'll explain, step-by-step, exactly how to get your software and hardware to cooperate. You have the OpenCard Framework software and your card terminal device. So, you've been reading previous Java Developer columns on smart cards and the OpenCard Framework (OCF).