/** * Perform a Kerberos login and launch a daemon thread to periodically perfrom renewals of that * Kerberos login. Exceptions are intentionally caught and rethrown as unchecked exceptions as * there is nothing Avatica itself can do if the Kerberos login fails. * * @throws RuntimeException If the Kerberos login fails */ public synchronized void login() { final Entry<LoginContext, Subject> securityMaterial = performKerberosLogin(); subject = securityMaterial.getValue(); // Launch a thread to periodically perform renewals final Entry<RenewalTask, Thread> renewalMaterial = createRenewalThread( securityMaterial.getKey(), subject, KerberosConnection.RENEWAL_PERIOD); renewalTask = renewalMaterial.getKey(); renewalThread = renewalMaterial.getValue(); renewalThread.start(); }
/** * Perform a Kerberos login and launch a daemon thread to periodically perfrom renewals of that * Kerberos login. Exceptions are intentionally caught and rethrown as unchecked exceptions as * there is nothing Avatica itself can do if the Kerberos login fails. * * @throws RuntimeException If the Kerberos login fails */ public synchronized void login() { final Entry<LoginContext, Subject> securityMaterial = performKerberosLogin(); subject = securityMaterial.getValue(); // Launch a thread to periodically perform renewals final Entry<RenewalTask, Thread> renewalMaterial = createRenewalThread( securityMaterial.getKey(), subject, KerberosConnection.RENEWAL_PERIOD); renewalTask = renewalMaterial.getKey(); renewalThread = renewalMaterial.getValue(); renewalThread.start(); }