Code example for UnsupportedCallbackException

Methods: getCallback

0
            pc.clearPassword();
            return login;
        } catch (IOException ioe) {
            throw new LoginException(ioe.toString());
        } catch (UnsupportedCallbackException uce) {
            throw new LoginException("Error: " + uce.getCallback().toString()
                    + " not available to gather authentication information " 
                    + "from the user"); 
        } 
    } 
 
    @SuppressWarnings("unchecked") 
    @Override 
    public boolean login() throws LoginException { 
        String[] login = retrieveLogin();
        try { 
            principal = authenticate(login);
        } catch (Exception e) {
            throw new LoginException("Authentication failed for "+login[0]);
        }