Examples of StopRequestFromUserException


Examples of com.atolsystems.atolutilities.StopRequestFromUserException

    public static void executeTaskWithDefaultCardManager(SmartCardTask task, boolean allowDummySC, String helloMsg, boolean requireConfirmationToDisconnect) throws IOException, CardException, StopRequestFromUserException, Throwable {
        executeTaskWithDefaultCardManager(task, allowDummySC, helloMsg, requireConfirmationToDisconnect, false);
    }

    public static void executeTaskWithDefaultCardManager(SmartCardTask task, boolean allowDummySC, String helloMsg, boolean requireConfirmationToDisconnect, boolean useOldCommandLineStyle) throws IOException, CardException, StopRequestFromUserException, Throwable {
        StopRequestFromUserException ex = null;
        BasicCardReaderTaskExecutor executor = new BasicCardReaderTaskExecutor(allowDummySC, useOldCommandLineStyle);
        try{
            executor.enableAuxLogging(true, helloMsg);
            try {
                //System.out.println("exec stage");
View Full Code Here

Examples of com.atolsystems.atolutilities.StopRequestFromUserException

                int choice = JOptionPane.showConfirmDialog(null, msg, "Waiting for card", JOptionPane.OK_CANCEL_OPTION);
                if (JOptionPane.OK_OPTION == choice) {
                    //nothing to do
                }
                if (JOptionPane.CANCEL_OPTION == choice) {
                    throw new StopRequestFromUserException("Operation cancelled by user.");
                }
            }
            if (1 == candidates.size()) {
                terminal = candidates.get(0);
                break;
            }
            if (1 < candidates.size()) {
                Object[] names = new Object[candidates.size()];
                for (int i = 0; i < candidates.size(); i++) {
                    names[i] = candidates.get(i).getName();
                }
                String s = (String) JOptionPane.showInputDialog(
                        null,
                        "Please select a terminal",
                        "Terminal selection",
                        JOptionPane.PLAIN_MESSAGE,
                        null,
                        names,
                        names[0]);


                if (s == null) {
                    throw new StopRequestFromUserException();
                }
                for (int i = 0; i < candidates.size(); i++) {
                    if (candidates.get(i).getName().equals(s)) {
                        terminal = candidates.get(i);
                        break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.