Cisco Cisco Prime Optical 10.3 Developer's Guide
Cisco Prime Optical 10.3 GateWay/CORBA Programmer Reference Guide
651
• Sun Microsystems Java Development Kit (JDK) 1.6 (available at http://java.sun.com/)
• jacORB 2.x
• 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
Step 4
Step 5
Step 6
Step 7
If you want your client to receive notifications from GateWay/CORBA, the
following additional steps are required:
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.
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.
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.
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