Search in sources :

Example 1 with si.ijs.maci._ManagerStub

use of si.ijs.maci._ManagerStub in project ACS by ACS-Community.

the class RemoteLoggingTest method initRemoteLogging.

///////////////////////////////////////////////////////////
//////////////////    Helper methods    ///////////////////
///////////////////////////////////////////////////////////
/**
	 * Calls {@linkplain ClientLogManagerStandalone#initRemoteLogging(ORB, Manager, int, boolean)}
	 * with appropriate dummy parameters.
	 * @param clm The instance to call initRemoteLogging on.
	 * @return true if simulated remote logging was initialized successfully
	 */
private boolean initRemoteLogging(ClientLogManagerStandalone clm) {
    // An unconfigured ORB will do, just needed to produce Any objects for sending remote logs.
    // There is however the ugly side effect that the constructor org.jacorb.orb.ORBSingleton
    // will use slf4j and thus call ClientLogManager#getAcsLogManager, so that we have another
    // instance of ClientLogManager in addition to our ClientLogManagerStandalone instance.
    ORB orb = ORB.init();
    // will only be used for != null check.
    Manager managerDummy = new _ManagerStub();
    return clm.initRemoteLogging(orb, managerDummy, 1, true);
}
Also used : si.ijs.maci._ManagerStub(si.ijs.maci._ManagerStub) Manager(si.ijs.maci.Manager) ORB(org.omg.CORBA.ORB)

Aggregations

ORB (org.omg.CORBA.ORB)1 Manager (si.ijs.maci.Manager)1 si.ijs.maci._ManagerStub (si.ijs.maci._ManagerStub)1