Cisco Cisco Prime Optical 10.6 Developer's Guide

Page of 665
Cisco Prime Optical 10.6 GateWay/CORBA Programmer Reference Guide 
 
 
629
 
Information 
Detail 
with Prime Optical. 
Traceability 
— 
7.2  Developing a GateWay/CORBA Client 
GateWay/CORBA implements APIs defined by the TeleManagement Forum’s Multi Technology 
Network Management (MTNM) group. These APIs are defined for communication between an NMS and 
the EMS. The NMS must develop a client application that uses these APIs. The following sections 
describe the tools required for developing a client application. Sample code is provided. 
7.2.1  Recommended Tools 
You can develop the CORBA client on UNIX or PC platforms. Cisco recommends the following 
development tools:  
•  Oracle Java 1.7 (available at 
) 
•  jacORB 2.x 
7.2.2  Sample Code in Java 
A typical CORBA client application involves the following steps:  
Step 1 
Initialize the client connection to the object request broker (ORB).  
Step 2 
Obtain a reference to the naming service. 
Step 3 
Resolve the reference to EMSSessionFactory. See 
 
Step 4 
Implement NmsSession_IOperations. See 
 
Step 5 
Retrieve EmsSession by supplying the username and password. See 
. 
Step 6 
Query EmsSession and obtain a list of managers available for operations. See 
. 
Step 7 
Invoke the desired method on that manager. See 
. 
If you want your client to receive notifications from GateWay/CORBA, the following 
additional steps are required:  
Step 8 
Obtain a reference to an EventChannel object in the notification server in Step 2. 
Step 9 
Obtain a ConsumerAdmin object reference. 
Step 10 
Invoke obtain_notification_push_consumer() on the SupplierAdmin object, specifying 
CosNotifyChannelAdmin::STRUCTURED_EVENT as a parameter. This operation returns a 
reference to the StructuredProxyPushSupplier. 
Step 11 
Implement an instance of StructuredPushConsumer (defined by the OMG). 
Step 12 
Invoke the connect_structured_push_consumer() operation on the 
StructuredProxyPushSupplier object to connect the StructuredPushConsumer 
implementation object to the notification channel. 
Step 13 
Monitor incoming notifications. 
The following sections show sample Java code for the steps required to develop a client application.  
  The sample code shown is for illustrative purposes only; the code might not compile as shown. The 
sample code does not handle all exceptions. 
 
7.2.2.1 
Initialize the Client Connection