Package opencard.core.terminal
Interface CardTerminalFactory
-
- All Known Implementing Classes:
CTAPICardTerminalFactory,JCOPSimCardTerminalFactory,SmartCardIOFactory
public interface CardTerminalFactoryA CardTerminalFactory produces CardTerminal objects of a certain type attached at an address.As with the opencard.core.service.CardServiceFactory the idea here is that a card terminal manufacturer shall provide his own version of a CardTerminalFactory that can produce appropriate CardTerminal objects.
- Author:
- Dirk Husemann (hud@zurich.ibm.com), Stephan Breideneich (sbreiden@de.ibm.com)
- See Also:
CardTerminal,CardTerminalRegistry
-
-
Field Summary
Fields Modifier and Type Field Description static intTERMINAL_ADDRESS_ENTRYthird element in terminal configuration arraystatic intTERMINAL_NAME_ENTRYfirst element in terminal configuration arraystatic intTERMINAL_TYPE_ENTRYsecond element in terminal configuration array
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()deinitialize the CardTerminalFactoryvoidcreateCardTerminals(CardTerminalRegistry ctr, java.lang.String[] terminalInfo)create a specific CardTerminal object that knows how to handle a specific card terminal and register it to the CardTerminalRegistry.voidopen()initialize the CardTerminalFactory
-
-
-
Field Detail
-
TERMINAL_NAME_ENTRY
static final int TERMINAL_NAME_ENTRY
first element in terminal configuration array- See Also:
- Constant Field Values
-
TERMINAL_TYPE_ENTRY
static final int TERMINAL_TYPE_ENTRY
second element in terminal configuration array- See Also:
- Constant Field Values
-
TERMINAL_ADDRESS_ENTRY
static final int TERMINAL_ADDRESS_ENTRY
third element in terminal configuration array- See Also:
- Constant Field Values
-
-
Method Detail
-
createCardTerminals
void createCardTerminals(CardTerminalRegistry ctr, java.lang.String[] terminalInfo) throws CardTerminalException, TerminalInitException
create a specific CardTerminal object that knows how to handle a specific card terminal and register it to the CardTerminalRegistry.- Parameters:
ctr- the CardTerminalRegistry for registration-processterminalInfo- the parameter array for the terminal. {TerminalName, TerminalType, factory-specific count of parameters....}.- Throws:
OpenCardInitializationException- thrown when initialization error occuredCardTerminalException- thrown when CardTerminal error occuredTerminalInitException- thrown when terminalInfo is incorrect or factory not able to support requested terminal type.
-
open
void open() throws CardTerminalException
initialize the CardTerminalFactory- Throws:
CardTerminalException- thrown when error occurred while open initializes the factory.
-
close
void close() throws CardTerminalExceptiondeinitialize the CardTerminalFactory- Throws:
CardTerminalException- thrown when error occurred while close deinitializes the factory.
-
-