Search in sources :

Example 1 with InvalidComponentSpecEx

use of alma.maciErrType.InvalidComponentSpecEx in project ACS by ACS-Community.

the class ManagerDynComponentTest method test.

/**
	 * Main test routine.
	 */
public void test() {
    initializeCORBA();
    Manager manager = resolveManager();
    if (manager != null) {
        ClientInfo clientInfo = login(manager);
        if (clientInfo != null) {
            System.out.println("All initialization done.");
            try {
                /* ------------------------------------------------- */
                manager.restart_component(clientInfo.h, "invalid");
                manager.get_component(clientInfo.h, "MOUNT1", true);
                manager.restart_component(clientInfo.h, "MOUNT1");
                try {
                    manager.get_default_component(clientInfo.h, "invalid");
                    System.err.println("NoDefaultComponent exception expected.");
                } catch (NoDefaultComponentEx nde) {
                // this is OK
                }
                try {
                    manager.get_dynamic_component(clientInfo.h, new ComponentSpec("*", "invalidType", "*", "*"), true);
                    System.err.println("InvalidComponentSpec exception expected.");
                } catch (InvalidComponentSpecEx ics) {
                // this is OK
                }
                /* ------------------------------------------------- */
                ComponentInfo componentInfo = manager.get_dynamic_component(clientInfo.h, new ComponentSpec("FULL_DYNAMIC", "IDL:alma/PS/PowerSupply:1.0", "acsexmplPS", "Container"), true);
                System.out.println(componentInfo.h);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
            logout(manager, clientInfo);
        }
    }
    finalizeCORBA();
}
Also used : InvalidComponentSpecEx(alma.maciErrType.InvalidComponentSpecEx) ClientInfo(si.ijs.maci.ClientInfo) ComponentInfo(si.ijs.maci.ComponentInfo) POAManager(org.omg.PortableServer.POAManager) Manager(si.ijs.maci.Manager) ComponentSpec(si.ijs.maci.ComponentSpec) NoDefaultComponentEx(alma.maciErrType.NoDefaultComponentEx)

Aggregations

InvalidComponentSpecEx (alma.maciErrType.InvalidComponentSpecEx)1 NoDefaultComponentEx (alma.maciErrType.NoDefaultComponentEx)1 POAManager (org.omg.PortableServer.POAManager)1 ClientInfo (si.ijs.maci.ClientInfo)1 ComponentInfo (si.ijs.maci.ComponentInfo)1 ComponentSpec (si.ijs.maci.ComponentSpec)1 Manager (si.ijs.maci.Manager)1