use of alma.maciErrType.NoDefaultComponentEx 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();
}
Aggregations