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();
}
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();
}
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;
}
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;
}
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;
}
Aggregations