private static void initPropertyCollector() { if (PROP_COLLECTOR == null) { try { PROP_COLLECTOR = SERVICE_CONTENT.getPropertyCollector(); } catch (Exception e) { e.printStackTrace(); } } }
private static void initRootFolder() { if (ROOT_FOLDER == null) { try { ROOT_FOLDER = SERVICE_CONTENT.getRootFolder(); } catch (Exception e) { e.printStackTrace(); } } }
/** * Disconnects the user session * * @throws Exception */ private static void disconnect() throws Exception { VIM_PORT.logout(SERVICE_CONTENT.getSessionManager()); }
/** * @param url The URL of the server * @param uname The user name for the session * @param pword The password for the user * <p>Establishes session with the virtual center / ESX server * @throws Exception */ private static void connect(String url, String uname, String pword) throws Exception { VIM_PORT.login(SERVICE_CONTENT.getSessionManager(), uname, pword, null); }