Class SmartCardIOFactory
- java.lang.Object
-
- de.cardcontact.opencard.terminal.smartcardio.SmartCardIOFactory
-
- All Implemented Interfaces:
CardTerminalFactory,Pollable
public class SmartCardIOFactory extends java.lang.Object implements CardTerminalFactory, Pollable
Factory that creates a CardTerminal object for each card reader listed via the javax.smartcardio interface.
-
-
Field Summary
-
Fields inherited from interface opencard.core.terminal.CardTerminalFactory
TERMINAL_ADDRESS_ENTRY, TERMINAL_NAME_ENTRY, TERMINAL_TYPE_ENTRY
-
-
Constructor Summary
Constructors Constructor Description SmartCardIOFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()deinitialize the CardTerminalFactoryvoidcreateCardTerminals(CardTerminalRegistry ctr, java.lang.String[] terminalInfo)Creates an instance for each card listed.voidopen()initialize the CardTerminalFactoryvoidpoll()Check whether a new physical terminal was plugged in or removed.
-
-
-
Method Detail
-
close
public void close() throws CardTerminalExceptionDescription copied from interface:CardTerminalFactorydeinitialize the CardTerminalFactory- Specified by:
closein interfaceCardTerminalFactory- Throws:
CardTerminalException- thrown when error occurred while close deinitializes the factory.
-
createCardTerminals
public void createCardTerminals(CardTerminalRegistry ctr, java.lang.String[] terminalInfo) throws CardTerminalException, TerminalInitException
Creates an instance for each card listed.- Specified by:
createCardTerminalsin interfaceCardTerminalFactory- Parameters:
ctr- the CardTerminalRegistry for registration-processterminalInfo- the parameter array for the terminal. {TerminalName, TerminalType, factory-specific count of parameters....}.- Throws:
CardTerminalException- thrown when CardTerminal error occuredTerminalInitException- thrown when terminalInfo is incorrect or factory not able to support requested terminal type.
-
open
public void open() throws CardTerminalExceptionDescription copied from interface:CardTerminalFactoryinitialize the CardTerminalFactory- Specified by:
openin interfaceCardTerminalFactory- Throws:
CardTerminalException- thrown when error occurred while open initializes the factory.
-
poll
public void poll() throws CardTerminalExceptionCheck whether a new physical terminal was plugged in or removed. If so update the CardTerminalRegistry.- Specified by:
pollin interfacePollable- Throws:
CardTerminalException- Thrown when error occurred in poll-mechanism.
-
-