public static final LoginManager acquireLoginManager ( LoginType loginType , Map < String , ? > configs ) throws IOException , LoginException { synchronized ( LoginManager . class ) { LoginManager loginManager = CACHED_INSTANCES . get ( loginType ) ; if ( loginManager == null ) { loginManager = new LoginManager ( loginType , configs ) ; CACHED_INSTANCES . put ( loginType , loginManager ) ; } return loginManager . acquire ( ) ; } }
Returns an instance of LoginManager and increases its reference count .