User guide
C-10
Cisco Transport Manager Release 9.2 GateWay/CORBA User Guide and Programmer Manual
OL-20937-01
Appendix C OSS Use Cases and Client Development
C.2.2 Sample Code in Java
try {
ConsumerAdmin cadmin = notifChannel.get_consumeradmin(0);
}
catch (AdminNotFound anfSe) {
// Exception handling
}
C.2.2.10 Obtain ProxyPushSupplier
IntHolder id = new IntHolder();
try {
ProxySupplier baseSupplier =
cadmin.obtain_notification_push_supplier(
ClientType.STRUCTURED_EVENT, id);
structuredProxyPushSupplier =
StructuredProxyPushSupplierHelper.narrow(baseSupplier);
}
catch (AdminLimitExceeded aleEx) {
// Exception handling
}
C.2.2.11 Implement StructuredPushConsumer
class StructuredPushConsumerImpl extends _StructuredPushConsumerPOA
{
StructuredPushConsumerImpl() {
super();
System.out.println("StructuredPushConsumerImpl created.");
}
public void disconnect_structured_push_consumer() {
System.out.println("Disconnect structured push consumer.:");
}
public void push_structured_event(StructuredEvent notification) {
System.out.println("Received notification.");
}
public void offer_change(EventType[] added,
EventType[] removed)
throws InvalidEventType
{
System.out.println("Offer changed.");
}
}