Search in sources :

Example 51 with ORB

use of org.omg.CORBA.ORB in project ACS by ACS-Community.

the class BCTClient method getPropertyAsync.

/**
	 * TEST_2_2_1_* & TEST_3_2_1_*
	 * @param loop
	 * @param delay
	 * @return
	 */
public boolean getPropertyAsync(long loop, long delay) {
    m_cbReturned.setReturns(loop);
    ORB orb = ComponentClientSingleton.getInstance().getORB();
    m_startTime = System.currentTimeMillis();
    for (int i = 0; i < loop; i++) {
        m_property.get_async(m_cbReturned._this(orb), descIn);
        try {
            Thread.sleep(delay);
        } catch (Exception e) {
        }
    }
    m_midTime = System.currentTimeMillis();
    synchronized (m_cbReturned) {
        if (!m_cbReturned.isDone())
            try {
                m_cbReturned.wait();
            } catch (InterruptedException ie) {
            }
        m_endTime = System.currentTimeMillis();
    }
    return m_cbReturned.isDone();
}
Also used : ORB(org.omg.CORBA.ORB)

Example 52 with ORB

use of org.omg.CORBA.ORB in project ACS by ACS-Community.

the class BCTClient method actionAsync.

/**
	 * TEST_2_2_3_* & TEST_3_2_3_*
	 * @param loop
	 * @param delay
	 * @return
	 */
public boolean actionAsync(long loop, long delay) {
    m_cbNotified.setReturns(loop);
    ORB orb = ComponentClientSingleton.getInstance().getORB();
    m_startTime = System.currentTimeMillis();
    for (int i = 0; i < loop; i++) {
        m_SBC.action(m_cbNotified._this(orb), descIn);
        try {
            Thread.sleep(delay);
        } catch (Exception e) {
        }
    }
    m_midTime = System.currentTimeMillis();
    synchronized (m_cbNotified) {
        if (!m_cbNotified.isDone())
            try {
                m_cbNotified.wait();
            } catch (InterruptedException ie) {
            }
        m_endTime = System.currentTimeMillis();
    }
    return m_cbNotified.isDone();
}
Also used : ORB(org.omg.CORBA.ORB)

Example 53 with ORB

use of org.omg.CORBA.ORB in project ACS by ACS-Community.

the class AlarmSystemAdvancedContainerServices method corbaObjectToString.

@Override
public String corbaObjectToString(org.omg.CORBA.Object objRef) {
    ORB orb = getORB();
    String str = orb.object_to_string(objRef);
    logger.finer("converted corba object reference of type " + objRef.getClass().getName() + " to the string " + str);
    return str;
}
Also used : ORB(org.omg.CORBA.ORB)

Example 54 with ORB

use of org.omg.CORBA.ORB in project ACS by ACS-Community.

the class AlarmSystemAdvancedContainerServices method getAny.

@Override
public Any getAny() {
    ORB orb = getORB();
    org.omg.CORBA.Any any = orb.create_any();
    if (any == null) {
        // should never happen, but we check just in case, 
        // since there is a difficult to verify NPE when Any is created by MC for sending alarms.
        String msg = "Failed to create org.omg.CORBA.Any";
        logger.warning(msg);
        throw new NullPointerException(msg);
    }
    return any;
}
Also used : Any(org.omg.CORBA.Any) ORB(org.omg.CORBA.ORB)

Example 55 with ORB

use of org.omg.CORBA.ORB in project ACS by ACS-Community.

the class AlarmSystemAdvancedContainerServices method corbaObjectFromString.

@Override
public org.omg.CORBA.Object corbaObjectFromString(String strObjRef) {
    ORB orb = alSysContSvcs.getOrb();
    org.omg.CORBA.Object objRef = orb.string_to_object(strObjRef);
    logger.finer("converted corba object reference string " + strObjRef + " back to a corba object reference.");
    return objRef;
}
Also used : ORB(org.omg.CORBA.ORB)

Aggregations

ORB (org.omg.CORBA.ORB)73 POA (org.omg.PortableServer.POA)12 Properties (java.util.Properties)10 NamingException (javax.naming.NamingException)8 Test (org.junit.Test)7 AcsProfilingORB (org.jacorb.orb.acs.AcsProfilingORB)6 IOException (java.io.IOException)5 Logger (java.util.logging.Logger)5 HashMap (java.util.HashMap)4 StartException (org.jboss.msc.service.StartException)4 Any (org.omg.CORBA.Any)4 ManagerImpl (com.cosylab.acs.maci.manager.ManagerImpl)3 FileWriter (java.io.FileWriter)3 PrintWriter (java.io.PrintWriter)3 MessageImpl (org.apache.cxf.message.MessageImpl)3 Monitorlong (alma.ACS.Monitorlong)2 DAL (com.cosylab.CDB.DAL)2 HandleDataStore (com.cosylab.acs.maci.manager.HandleDataStore)2 OutputStream (java.io.OutputStream)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)2