@Override
public void run() {
{
try {
MP300TC3TerminalManager.initContext();
MP300TC3TerminalManager manager = new MP300TC3TerminalManager();
List<GenericTerminal> terminals = manager.list();
if(0==terminals.size())
throw new RuntimeException("MP300 TC3 not found");
MP300TC3Terminal terminal = (MP300TC3Terminal) terminals.get(0);
terminal.addLogHandler(new ScardPrintStreamLogHandler(System.out));
System.out.println("Try to connect to " + terminal.getName());