Search in sources :

Example 6 with Client

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;
    }
}
Also used : ClientInfo(si.ijs.maci.ClientInfo) Client(si.ijs.maci.Client)

Example 7 with Client

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;
    }
}
Also used : ClientInfo(si.ijs.maci.ClientInfo) Client(si.ijs.maci.Client)

Aggregations

Client (si.ijs.maci.Client)7 ClientInfo (si.ijs.maci.ClientInfo)6 AcsJContainerServicesEx (alma.JavaContainerError.wrappers.AcsJContainerServicesEx)1 AcsManagerProxy (alma.acs.container.AcsManagerProxy)1 CleaningDaemonThreadFactory (alma.acs.container.CleaningDaemonThreadFactory)1 ContainerServicesImpl (alma.acs.container.ContainerServicesImpl)1 AcsJException (alma.acs.exceptions.AcsJException)1 AcsLogger (alma.acs.logging.AcsLogger)1 DAL (com.cosylab.CDB.DAL)1 ThreadFactory (java.util.concurrent.ThreadFactory)1 DataException (si.ijs.acs.objectexplorer.engine.DataException)1 IntrospectionInconsistentException (si.ijs.acs.objectexplorer.engine.IntrospectionInconsistentException)1 NonStickyConnectFailedRemoteException (si.ijs.acs.objectexplorer.engine.NonStickyConnectFailedRemoteException)1 RemoteException (si.ijs.acs.objectexplorer.engine.RemoteException)1