Skip navigation links

Package com.ibm.tivoli.nm.collectors.framework.corba.impl.huawei

Classes providing functionality to support the Huawei TMF814 CORBA definition.

See: Description

Package com.ibm.tivoli.nm.collectors.framework.corba.impl.huawei Description

Classes providing functionality to support the Huawei TMF814 CORBA definition.

The Huawei CORBA TMF814 Collector demonstrates the usage of the Huawei TMF814 CORBA implementation (which is based on the TMF814 v2.1 definition).

Below is example code to use the Huawei TMF814 CORBA implementation in a Collector:

 
 // Get the Collector Property file
 propsFile = loadPropertiesFile(propsFileName);
 
 // Create HuaweiTMF814CorbaProperties
 HuaweiTMF814CorbaPropertiesFactory propFac = new HuaweiTMF814CorbaPropertiesFactory();
 HuaweiTMF814CorbaProperties corbaProp = propFac.create(propsFile);
 
 // Create HuaweiTMF814CorbaProvider
 HuaweiTMF814CorbaProviderFactory provFac = new HuaweiTMF814CorbaProviderFactory();
 HuaweiTMF814CorbaProvider corba = provFac.create(corbaProp);
 
 // Start a CORBA session
 corba.startCorbaSession();
 
 // Invoke a CORBA method and retrieve the results through the CORBA Iterator
 HuaweiTMF814CorbaIterator iterator = corba.getAllManagedElements(corbaProp.getIntResultSize(),corbaProp.isBlnDestroyIterator());
 while (iterator.hasNext()) {
  List<Object> meList = (List<Object>) iterator.next();
  // Process all returned results...
  for (Object obj : meList) {
      // Perform some data processing...
      ...
  }
 }
 
 // Invoke a CORBA method and retrieve the results from the ArrayList
 List<ManagedElement_T> meResult = new ArrayList<ManagedElement_T>();
 try {
  meResult = corba.getManagedElement(name);
 }
 catch (CorbaCollectorException e) {
  throw e;
 }
 
 // Retrieve the returned result
 if ( !meResult.isEmpty() ) {
  ManagedElement_T me = (ManagedElement_T) meResult.get(0);
  // Perform some data processing...
 }
 ...
 
 // End the CORBA session
 corba.endCorbaSession();
 
 

All classes from this package can be found in huawei-tmf814-corba-collector-framework.jar and reference the IDL-generated classes, methods and variables from huawei-tmf814-corba-gc.jar.

Skip navigation links