Search in sources :

Example 6 with ServicesDaemon

use of alma.acsdaemon.ServicesDaemon in project ACS by ACS-Community.

the class ServicesDaemonTest method getServicesDaemon.

private ServicesDaemon getServicesDaemon(String host) {
    String daemonLoc = AcsLocations.convertToServicesDaemonLocation(host);
    assertNotNull("corbaloc for service daemon must not be null", daemonLoc);
    logger.fine("Using services daemon corbaloc " + daemonLoc);
    ORB orb = acsCorba.getORB();
    assertNotNull("ORB provided by inherited acsCorba must not be null", daemonLoc);
    org.omg.CORBA.Object obj = orb.string_to_object(daemonLoc);
    ServicesDaemon ret = null;
    try {
        ret = ServicesDaemonHelper.narrow(obj);
    } catch (TRANSIENT ex) {
        fail("Failed to get reference to services daemon '" + daemonLoc + "' because of TRANSIENT ex");
    }
    assertNotNull("Corba ref to services daemon must not be null", ret);
    return ret;
}
Also used : ServicesDaemon(alma.acsdaemon.ServicesDaemon) TRANSIENT(org.omg.CORBA.TRANSIENT) ORB(org.omg.CORBA.ORB)

Aggregations

ServicesDaemon (alma.acsdaemon.ServicesDaemon)6 DaemonSequenceCallback (alma.acsdaemon.DaemonSequenceCallback)2 Completion (alma.ACSErr.Completion)1 OrbInitException (alma.acs.commandcenter.meta.Firestarter.OrbInitException)1 PreparedString (alma.acs.commandcenter.util.PreparedString)1 AcsCorba (alma.acs.container.corba.AcsCorba)1 AcsJCompletion (alma.acs.exceptions.AcsJCompletion)1 AcsJException (alma.acs.exceptions.AcsJException)1 DaemonSequenceCallbackPOA (alma.acsdaemon.DaemonSequenceCallbackPOA)1 ServiceDefinitionBuilder (alma.acsdaemon.ServiceDefinitionBuilder)1 IOException (java.io.IOException)1 ArrayBlockingQueue (java.util.concurrent.ArrayBlockingQueue)1 TimeUnit (java.util.concurrent.TimeUnit)1 ORB (org.omg.CORBA.ORB)1 StringHolder (org.omg.CORBA.StringHolder)1 TRANSIENT (org.omg.CORBA.TRANSIENT)1