com.dalsemi.onewire.jib.terminal
Class JiBCardTerminalFactory

java.lang.Object
  |
  +--com.dalsemi.onewire.jib.terminal.JiBCardTerminalFactory
All Implemented Interfaces:
opencard.core.terminal.CardTerminalFactory

public class JiBCardTerminalFactory
extends Object
implements opencard.core.terminal.CardTerminalFactory

A JiBCardTerminalFactory produces CardTerminal objects that know how to communicate with Java Powered iButtons attached at an address.

To use a JiBCardTerminalFactory, the proper opencard.properties file entry must be found by the OpenCard software. An opencard.properties file contains entries that resemble the following:

    #Only the last uncommented line will be used to search for iButtons.
    #Uncomment the next line to search COM1 using native code
    #OpenCard.terminals=com.dalsemi.onewire.jib.terminal.JiBCardTerminalFactory|OneWireAdapter|ONEWIRE_PORT_TYPE_LEGACY_SERIAL|COM1

    #Uncomment the next line to search COM1 using pure java code
    OpenCard.terminals=com.dalsemi.onewire.jib.terminal.JiBCardTerminalFactory|OneWireAdapter|ONEWIRE_PORT_TYPE_SERIAL|COM1

    #Uncomment the next line to search COM2 using native code
    #OpenCard.terminals=com.dalsemi.onewire.jib.terminal.JiBCardTerminalFactory|OneWireAdapter|ONEWIRE_PORT_TYPE_LEGACY_SERIAL|COM2

    #This line will search the LPT1 for iButtons.
    #OpenCard.terminals=com.dalsemi.onewire.jib.terminal.JiBCardTerminalFactory|OneWireAdapter|ONEWIRE_PORT_TYPE_LEGACY_PARALLEL|LPT1

    #Uncomment the next line to search LPT2 using native code
    #OpenCard.terminals=com.dalsemi.onewire.jib.terminal.JiBCardTerminalFactory|OneWireAdapter|ONEWIRE_PORT_TYPE_LEGACY_PARALLEL|LPT2
 

In this case, the port COM1 will be searched using code based on the Java COMM API.


Fields inherited from interface opencard.core.terminal.CardTerminalFactory
TERMINAL_ADDRESS_ENTRY, TERMINAL_NAME_ENTRY, TERMINAL_TYPE_ENTRY
 
Constructor Summary
JiBCardTerminalFactory()
           
 
Method Summary
 void close()
          Deinitialize the CardTerminalFactory.
 void createCardTerminals(opencard.core.terminal.CardTerminalRegistry ctr, String[] terminalInfo)
          Create a specific CardTerminal object that knows how to handle a specific card terminal and register it to the CardTerminalRegistry.
 void open()
          Initialize the CardTerminalFactory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiBCardTerminalFactory

public JiBCardTerminalFactory()
Method Detail

createCardTerminals

public void createCardTerminals(opencard.core.terminal.CardTerminalRegistry ctr,
                                String[] terminalInfo)
                         throws opencard.core.terminal.CardTerminalException
Create a specific CardTerminal object that knows how to handle a specific card terminal and register it to the CardTerminalRegistry.
Specified by:
createCardTerminals in interface opencard.core.terminal.CardTerminalFactory
Parameters:
ctr - the CardTerminalRegistry for registration-process
terminalInfo - the parameter array for the terminal. {TerminalName, TerminalType, factory-specific count of parameters....}.
Throws:
OpenCardInitializationException - thrown when initialization error occured
opencard.core.terminal.CardTerminalException - thrown when CardTerminal error occured
opencard.core.terminal.TerminalInitException - thrown when terminalInfo is incorrect or factory not able to support requested terminal type.

open

public void open()
Initialize the CardTerminalFactory. This method does nothing in the JiBCardTerminalFactory class.
Specified by:
open in interface opencard.core.terminal.CardTerminalFactory

close

public void close()
Deinitialize the CardTerminalFactory. This method does nothing in the JiBCardTerminalFactory class.
Specified by:
close in interface opencard.core.terminal.CardTerminalFactory