Package uk.co.nimp.scard.log

Examples of uk.co.nimp.scard.log.ScardPrintStreamLogHandler


                System.out.println("Remote terminal not detected.");
                return;
            }
            GenericTerminal terminal = terminals.get(0);
            terminals = manager.list();
            terminal.addLogHandler(new ScardPrintStreamLogHandler(System.out));
            System.out.println("Please insert a card in terminal " + terminal.getName());
            while (false == terminal.isCardPresent()) {
                try {
                    Thread.sleep(200);
                } catch (InterruptedException ex) {
View Full Code Here


                return;
            }
            //Star265Terminal star265 = (Star265Terminal) terminals.get(0);
            GenericTerminal star265 = terminals.get(0);
            terminals = manager.list();
            star265.addLogHandler(new ScardPrintStreamLogHandler(System.out));
            System.out.println("Please insert a card in terminal " + star265.getName());
            while (false == star265.isCardPresent()) {
                try {
                    Thread.sleep(200);
                } catch (InterruptedException ex) {
View Full Code Here

                    try {
                        MP300TC2TerminalManager.initContext();
                        MP300TC2TerminalManager manager = new MP300TC2TerminalManager();
                        List<GenericTerminal> terminals = manager.list();
                        MP300TC2Terminal terminal = (MP300TC2Terminal) terminals.get(0);
                        terminal.addLogHandler(new ScardPrintStreamLogHandler(System.out));
                        System.out.println("Try to connect to " + terminal.getName());
                        terminal.coldConnect();
                        Apdu apdu = new Apdu(0x00, 0x8A, 0x00, 0x44, 0x02);
                        terminal.sendApdu(apdu);
                        //manager.batchInterfaceTest();
View Full Code Here

    @Override
    public synchronized boolean isLoggingOnSystemOut(){
        for(ScardLogHandler log:logHandlers){
            if(log instanceof ScardPrintStreamLogHandler){
                ScardPrintStreamLogHandler scardPrintStreamLogHandler=(ScardPrintStreamLogHandler) log;
                if(System.out==scardPrintStreamLogHandler.getPrintStream())
                    return true;
            }
        }
        return false;
    }
View Full Code Here

                        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());
                        terminal.coldConnect();
                        Apdu apdu = new Apdu(0x00, 0x8A, 0x00, 0x44, 0x02);
                        terminal.sendApdu(apdu);
                        //manager.batchInterfaceTest();
View Full Code Here

            return ps;
        }

        public void setPs(PrintStream ps) {
            this.ps = ps;
            printStreamLogHandler = new ScardPrintStreamLogHandler(ps);
        }
View Full Code Here

    public BasicCardReaderTaskExecutor(boolean allowDummySC, boolean useOldCommandLineStyle,PrintStream outStream, GenericTerminal terminal, Clearable clearable) {
        this.terminal = terminal;
        this.outStream = outStream;
        this.allowDummySC = allowDummySC;
        this.useOldCommandLineStyle=useOldCommandLineStyle;
        logHandler = new ScardPrintStreamLogHandler(outStream, clearable);
    }
View Full Code Here

    public BasicCardReaderTaskExecutor(boolean allowDummySC, boolean useOldCommandLineStyle, PrintStream outStream, GenericTerminal terminal) {
        this.terminal = terminal;
        this.outStream = outStream;
        this.allowDummySC = allowDummySC;
        this.useOldCommandLineStyle=useOldCommandLineStyle;
        logHandler = new ScardPrintStreamLogHandler(outStream);
    }
View Full Code Here

    public BasicCardReaderTaskExecutor(boolean allowDummySC, boolean useOldCommandLineStyle, PrintStream outStream) {
        this.outStream = outStream;
        this.allowDummySC = allowDummySC;
        this.useOldCommandLineStyle=useOldCommandLineStyle;
        logHandler = new ScardPrintStreamLogHandler(outStream);
    }
View Full Code Here

        outStream = new PrintStream(pos);
        //dialog = new ATextScreenOutput(null, false, true);
        dialog = new ATextScreenOutputJFrame(true);
        dialog.setTitle(this.getClass().getSimpleName()+" "+ATimeUtilities.getTimeForUi());
        dialog.monitorStream(pos);
        logHandler = new ScardPrintStreamLogHandler(outStream);
        //dialog.setVisible(true);
    }
View Full Code Here

TOP

Related Classes of uk.co.nimp.scard.log.ScardPrintStreamLogHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.