1 package com.sslexplorer.security; 2 3 4 public class LogonControllerFactory { 5 6 7 static Class logonControllerClass = DefaultLogonController.class; 8 static LogonController logonController = null; 9 static private boolean locked = false; 10 11 public static LogonController getInstance() { 12 13 if(logonController!=null) 14 return logonController; 15 16 try { 18 logonController = (LogonController) logonControllerClass.newInstance(); 19 logonController.init(); 20 } catch (Exception e) { 21 logonController = new DefaultLogonController(); 22 } 23 24 return logonController; 25 } 26 27 public static void setLogonControllerClass(Class logonControllerClass, boolean lock) { 28 29 LogonControllerFactory.logonControllerClass = logonControllerClass; 31 logonController = null; 32 locked = lock; 33 } 34 } 35 | Popular Tags |