use of si.ijs.maci.Client in project ACS by ACS-Community.
the class BuildingTest method login.
/**
* Login to the manager.
* @param manager manager reference.
* @return client info, <code>null</code> on failure.
*/
private ClientInfo login(Manager manager) {
if (orb == null || manager == null)
return null;
System.out.println("Logging to the manager...");
try {
ClientImpl clientImpl = new ClientImpl();
Client client = clientImpl._this(orb);
ClientInfo info = manager.login(client);
if (info == null)
throw new Exception("Failed to login to the manager since returned ClientInfo is 'null'.");
System.out.println("Logged in to the manager.");
return info;
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("Failed to login to the manager.");
return null;
}
}
use of si.ijs.maci.Client in project ACS by ACS-Community.
the class SimpleMasterComponentTest method login.
/**
* Login to the manager.
* @param manager manager reference.
* @return client info, <code>null</code> on failure.
*/
private ClientInfo login(Manager manager) {
if (orb == null || manager == null)
return null;
System.out.println("Logging to the manager...");
try {
ClientImpl clientImpl = new ClientImpl();
Client client = clientImpl._this(orb);
ClientInfo info = manager.login(client);
if (info == null)
throw new Exception("Failed to login to the manager since returned ClientInfo is 'null'.");
System.out.println("Logged in to the manager.");
return info;
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("Failed to login to the manager.");
return null;
}
}
Aggregations