KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ist > coach > coachEmsMibComponents > IpProtocolMonitorProviderComposition > IpProtocolMonitorProviderImpl


1 /*====================================================================
2 Tnis file was produced by the OpenCCM ir3_jimpl generator.
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2002 USTL - LIFL - GOAL
5 Contact: openccm-team@objectweb.org
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17 USA
18 Initial developer(s): Philippe Merle, Mathieu Vadet.
19 Contributor(s): Sylvain Leblanc_______________________.
20 ====================================================================*/

21 package ist.coach.coachEmsMibComponents.IpProtocolMonitorProviderComposition;
22
23 import intt.itu.itut_x780.UIDType;
24 import intt.itu.itut_x780.CreateError;
25 import intt.itu.itut_x780.ApplicationError;
26 import intt.itu.itut_x780.SourceIndicatorType;
27 import intt.itu.itut_x780.AttributeValueType;
28
29 import ist.coach.coachEmfCommon.Utils;
30
31 import ist.coach.coachEmfCommon.ObjectDeletionImpl;
32 import ist.coach.coachEmfCommon.ExceptionMessages;
33
34 import ist.coach.coachEmfCommon.ApplicationErrorInfoTypeImpl;
35 import ist.coach.coachEmfCommon.DataTypeImpl;
36 import ist.coach.coachEmfServices.SnmpAdapter.DataType;
37 import ist.coach.coachEmfServices.SnmpAdapter.SnmpApplicationError;
38
39 import ist.coach.coachEmsMib.IpProtocolMonitorValueType;
40 //import ist.coach.coachEmsMib.IpProtocolMonitor_F;
41
//import ist.coach.coachEmsMibComponents.IpProtocolMonitorProviderHelper;
42
import ist.coach.coachEmsCommon.SnmpIdentifiers;
43
44 import ist.coach.coachEmsCommon.IpProtocolMonitorValueTypeImpl;
45 import org.omg.CosNaming.NameComponent JavaDoc;
46 import org.omg.CORBA.TCKind JavaDoc;
47
48 import org.opennms.protocols.snmp.SnmpSMI;
49 import ist.coach.coachEmfServices.EmfBasicLog.*;
50 import java.util.Hashtable JavaDoc;
51
52 /**
53  * This is the CIDL-based implementation of the
54  * OMG IDL3 IDL:coach.ist/coachEmsMibComponents/IpProtocolMonitorProvider:1.0 component type.
55  *
56  * @author OpenCCM CIF_Jimpl Compiler.
57  */

58 public class IpProtocolMonitorProviderImpl
59      extends ist.coach.coachEmsMibComponents.IpProtocolMonitorProviderComposition.IpProtocolMonitorProvider_impl
60 {
61     // ==================================================================
62
//
63
// Internal State.
64
//
65
// ===================================================================
66
/**
67      ** Context reference.
68      **/

69
70     org.omg.CORBA.ORB JavaDoc orb = null;
71     private String JavaDoc _facade_name;
72
73     protected static Hashtable JavaDoc elements;
74     private static int notifId = 12000;
75     private BasicLog logSupport;
76
77     ist.coach.coachEmfServices.SnmpAdapter.SnmpConnector connector = null;
78
79     private static final String JavaDoc IP_PROTOCOL_CONFIG_PACKAGE = "ipProtocolConfigurationSetPackage";
80
81     private static final String JavaDoc READ_COMMUNITY = SnmpIdentifiers.READ_COMMUNITY;
82     private static final String JavaDoc WRITE_COMMUNITY = SnmpIdentifiers.WRITE_COMMUNITY;
83
84     // ==================================================================
85
//
86
// Constructor.
87
//
88
// ===================================================================
89
/**
90      ** The default constructor.
91      **/

92     public
93     IpProtocolMonitorProviderImpl()
94     {
95         elements = new Hashtable JavaDoc();
96     }
97     // ==================================================================
98
//
99
// Internal methods.
100
//
101
// ===================================================================
102

103     // ==================================================================
104
//
105
// Public methods.
106
//
107

108     // ==================================================================
109
//
110
// Methods for the OMG IDL Components::EnterpriseComponent local interface.
111
//
112
// ==================================================================
113
//
114
// IDL:omg.org/Components/EnterpriseComponent/configuration_complete:1.0
115
//
116
/**
117      ** Completes the component configuration.
118      **
119      ** @throws org.omg.Components.InvalidConfiguration
120      ** Thrown if the configuration is invalid.
121      **/

122     public void
123     configuration_complete()
124     throws org.omg.Components.InvalidConfiguration
125     {
126         //
127
// DONE : implement !!!
128
//
129

130         if ((connector = get_context().get_connection_connector()) == null)
131             throw new org.omg.Components.InvalidConfiguration();
132         if ((logSupport = get_context().get_connection_basic_log()) == null)
133             throw new org.omg.Components.InvalidConfiguration();
134
135         orb = org.objectweb.ccm.CORBA.TheORB.getORB();
136
137         System.err.println("IpProtocolMonitorProvider configuration completed...");
138
139     }
140     // ==================================================================
141
//
142
// Methods for the OMG IDL Components::SessionComponent local interface.
143
//
144
// ==================================================================
145
//
146
// IDL:omg.org/Components/SessionComponent/set_session_context:1.0
147
//
148

149     /**
150      ** Implementation of the ::itut_x780Components::CCM_NamedComponent_Executor::facade_name attribute as mutator operation.
151      **/

152     public void
153     facade_name(java.lang.String JavaDoc val)
154     {
155         //
156
// DONE : implement
157
//
158
if (val != null)
159             _facade_name = new String JavaDoc(val);
160
161     }
162     //
163
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipForwardingGet:1.0
164
//
165
/**
166      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipForwardingGet operation.
167      **/

168     public int
169     ipForwardingGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
170     throws intt.itu.itut_x780.ApplicationError
171     {
172         //
173
// DONE : implement
174
//
175

176         String JavaDoc key = Utils.name2string(name);
177
178         if (elements.containsKey(key) == false) {
179             ApplicationErrorInfoTypeImpl error_code =
180                 new ApplicationErrorInfoTypeImpl();
181
182             error_code.error = new UIDType(
183                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
184                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
185
186             error_code.details = new String JavaDoc("object with name " +
187                 key + " does not exist.");
188
189             throw new ApplicationError(error_code);
190         }
191
192         IpProtocolMonitorDataStructure data =
193             (IpProtocolMonitorDataStructure) elements.get(key);
194
195         DataType ipForwaringData = null;
196
197         try {
198             ipForwaringData = connector.get(
199                 SnmpIdentifiers.IP_FWD_TYPE_OID,
200                 new String JavaDoc (data.mgmtIpAddress),
201                 data.getSnmpPort(),
202                 READ_COMMUNITY);
203         }
204         catch (SnmpApplicationError e) {
205
206             ApplicationErrorInfoTypeImpl error_code =
207                 new ApplicationErrorInfoTypeImpl();
208
209             error_code.error = new UIDType(
210                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
211                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
212
213             if (e.reason.equals(ExceptionMessages.agent_response_error))
214                 error_code.details = ExceptionMessages.agent_response_error;
215             else
216                 error_code.details = new String JavaDoc ("Could not retrieve ipForwaring " +
217                     "for IpProtocolMonitor Object with name " + key + ":" +
218                     " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FWD_TYPE_OID +
219                     " does not exist.");
220
221             Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
222               (short) LogSeverity._Error,
223               "SNMP Error getting ip forwarding: " + e.reason);
224             throw new ApplicationError (error_code);
225         }
226
227         org.omg.CORBA.Any JavaDoc value = ipForwaringData.value;
228
229         if (value.type().kind().value() != TCKind._tk_long) {
230
231             ApplicationErrorInfoTypeImpl error_code =
232                 new ApplicationErrorInfoTypeImpl();
233
234             error_code.error = new UIDType(
235                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
236                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
237
238             error_code.details = new String JavaDoc ("Could not retrieve ipForwaring " +
239                 "for IpProtocolMonitor Object with name " + key + ":" +
240                 " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FWD_TYPE_OID +
241                 " is not of type integer, as expected.");
242
243             throw new ApplicationError (error_code);
244         }
245
246         int ipForwarding = value.extract_long();
247
248         return ipForwarding;
249
250     }
251     //
252
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipForwardingSet:1.0
253
//
254
/**
255      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipForwardingSet operation.
256      **/

257     public void
258     ipForwardingSet(org.omg.CosNaming.NameComponent JavaDoc[] name, int ipForwarding)
259     throws intt.itu.itut_x780.ApplicationError, ist.coach.coachEmsMib.NOipProtocolConfigurationSetPackageException
260     {
261         //
262
// DONE : implement
263
//
264
String JavaDoc key = Utils.name2string(name);
265
266         if (elements.containsKey(key) == false) {
267             ApplicationErrorInfoTypeImpl error_code =
268                 new ApplicationErrorInfoTypeImpl();
269
270             error_code.error = new UIDType(
271                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
272                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
273
274             error_code.details = new String JavaDoc("object with name " +
275                 key + " does not exist.");
276
277             throw new ApplicationError(error_code);
278         }
279
280         IpProtocolMonitorDataStructure data =
281             (IpProtocolMonitorDataStructure) elements.get(key);
282
283         if (!Utils.packageIsSupported(IP_PROTOCOL_CONFIG_PACKAGE, packagesGet(name))) {
284             System.err.println("Package " + IP_PROTOCOL_CONFIG_PACKAGE + " is not supported " +
285                 "by IpProtocolMonitor Object " + key);
286
287             throw new ist.coach.coachEmsMib.NOipProtocolConfigurationSetPackageException();
288         }
289
290         org.omg.CORBA.Any JavaDoc value = orb.create_any();
291
292         value.insert_long(ipForwarding);
293         DataTypeImpl ipForwardingData = new DataTypeImpl(
294             SnmpIdentifiers.IP_FWDDATAGRAMS_OID,
295             value,
296             SnmpSMI.SMI_INTEGER);
297
298         try {
299             connector.set(
300                 ipForwardingData,
301                 new String JavaDoc (data.getMgmtIpAddress()),
302                 data.getSnmpPort(),
303                 WRITE_COMMUNITY);
304         }
305         catch (SnmpApplicationError e) {
306
307             ApplicationErrorInfoTypeImpl error_code =
308                 new ApplicationErrorInfoTypeImpl();
309
310             error_code.error = new UIDType(
311                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
312                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
313
314             error_code.details = new String JavaDoc("Could not set ipForwarding " +
315                 "for IpProtocolMonitor Object with name " + key + ".");
316
317             Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
318               (short) LogSeverity._Error,
319               "SNMP Error setting ip forwarding: " + e.reason);
320             throw new ApplicationError(error_code);
321
322         }
323
324
325     }
326     //
327
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipDefaultTTLGet:1.0
328
//
329
/**
330      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipDefaultTTLGet operation.
331      **/

332     public int
333     ipDefaultTTLGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
334     throws intt.itu.itut_x780.ApplicationError
335     {
336         //
337
// DONE : implement
338
//
339
String JavaDoc key = Utils.name2string(name);
340
341     if (elements.containsKey(key) == false) {
342         ApplicationErrorInfoTypeImpl error_code =
343             new ApplicationErrorInfoTypeImpl();
344
345         error_code.error = new UIDType(
346             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
347             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
348
349         error_code.details = new String JavaDoc("object with name " +
350             key + " does not exist.");
351
352         throw new ApplicationError(error_code);
353     }
354
355     IpProtocolMonitorDataStructure data =
356         (IpProtocolMonitorDataStructure) elements.get(key);
357
358     DataType ipDefaultTTLData = null;
359
360     try {
361         ipDefaultTTLData = connector.get(
362             SnmpIdentifiers.IP_DEFAULT_TTL_OID,
363             new String JavaDoc (data.mgmtIpAddress),
364             data.getSnmpPort(),
365             READ_COMMUNITY);
366     }
367     catch (SnmpApplicationError e) {
368
369         ApplicationErrorInfoTypeImpl error_code =
370             new ApplicationErrorInfoTypeImpl();
371
372         error_code.error = new UIDType(
373             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
374             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
375
376         if (e.reason.equals(ExceptionMessages.agent_response_error))
377             error_code.details = ExceptionMessages.agent_response_error;
378         else
379             error_code.details = new String JavaDoc ("Could not retrieve ipDefaultTTL " +
380                 "for IpProtocolMonitor Object with name " + key + ":" +
381                 " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_DEFAULT_TTL_OID +
382                 " does not exist.");
383
384           Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
385               (short) LogSeverity._Error,
386               "SNMP Error getting ip default TTL: " + e.reason);
387
388         throw new ApplicationError (error_code);
389     }
390
391     org.omg.CORBA.Any JavaDoc value = ipDefaultTTLData.value;
392
393     if (value.type().kind().value() != TCKind._tk_long) {
394
395         ApplicationErrorInfoTypeImpl error_code =
396             new ApplicationErrorInfoTypeImpl();
397
398         error_code.error = new UIDType(
399             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
400             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
401
402         error_code.details = new String JavaDoc ("Could not retrieve ipDefaultTTL " +
403             "for IpProtocolMonitor Object with name " + key + ":" +
404             " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_DEFAULT_TTL_OID +
405             " is not of type integer, as expected.");
406
407         throw new ApplicationError (error_code);
408     }
409
410     int ipDefaultTTL = value.extract_long();
411
412     return ipDefaultTTL;
413
414     }
415     //
416
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipDefaultTTLSet:1.0
417
//
418
/**
419      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipDefaultTTLSet operation.
420      **/

421     public void
422     ipDefaultTTLSet(org.omg.CosNaming.NameComponent JavaDoc[] name, int ipDefaultTTL)
423     throws intt.itu.itut_x780.ApplicationError, ist.coach.coachEmsMib.NOipProtocolConfigurationSetPackageException
424     {
425         //
426
// DONE : implement
427
//
428
String JavaDoc key = Utils.name2string(name);
429
430         if (elements.containsKey(key) == false) {
431             ApplicationErrorInfoTypeImpl error_code =
432                 new ApplicationErrorInfoTypeImpl();
433
434             error_code.error = new UIDType(
435                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
436                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
437
438             error_code.details = new String JavaDoc("object with name " +
439                 key + " does not exist.");
440
441             throw new ApplicationError(error_code);
442         }
443
444         IpProtocolMonitorDataStructure data =
445             (IpProtocolMonitorDataStructure) elements.get(key);
446
447         if (!Utils.packageIsSupported(IP_PROTOCOL_CONFIG_PACKAGE, packagesGet(name))) {
448             System.err.println("Package " + IP_PROTOCOL_CONFIG_PACKAGE + " is not supported " +
449                 "by IpProtocolMonitor Object " + key);
450
451             throw new ist.coach.coachEmsMib.NOipProtocolConfigurationSetPackageException();
452         }
453
454         org.omg.CORBA.Any JavaDoc value = orb.create_any();
455
456         value.insert_long(ipDefaultTTL);
457         DataTypeImpl ipDefaultTTLData = new DataTypeImpl(
458             SnmpIdentifiers.IP_DEFAULT_TTL_OID,
459             value,
460             SnmpSMI.SMI_INTEGER);
461
462         try {
463             connector.set(
464                 ipDefaultTTLData,
465                 new String JavaDoc (data.getMgmtIpAddress()),
466                 data.getSnmpPort(),
467                 WRITE_COMMUNITY);
468         }
469         catch (SnmpApplicationError e) {
470
471             ApplicationErrorInfoTypeImpl error_code =
472                 new ApplicationErrorInfoTypeImpl();
473
474             error_code.error = new UIDType(
475                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
476                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
477
478             error_code.details = new String JavaDoc("Could not set ipDefaultTTL " +
479                 "for IpProtocolMonitor Object with name " + key + ".");
480
481           Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
482               (short) LogSeverity._Error,
483               "SNMP Error setting ip default TTL: " + e.reason);
484             throw new ApplicationError(error_code);
485
486         }
487
488     }
489     //
490
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipInReceivesGet:1.0
491
//
492
/**
493      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipInReceivesGet operation.
494      **/

495     public long
496     ipInReceivesGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
497     throws intt.itu.itut_x780.ApplicationError
498     {
499         //
500
// DONE : implement
501
//
502
String JavaDoc key = Utils.name2string(name);
503
504     if (elements.containsKey(key) == false) {
505         ApplicationErrorInfoTypeImpl error_code =
506             new ApplicationErrorInfoTypeImpl();
507
508         error_code.error = new UIDType(
509             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
510             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
511
512         error_code.details = new String JavaDoc("object with name " +
513             key + " does not exist.");
514
515         throw new ApplicationError(error_code);
516     }
517
518     IpProtocolMonitorDataStructure data =
519         (IpProtocolMonitorDataStructure) elements.get(key);
520
521     DataType ipInReceivesData = null;
522
523     try {
524         ipInReceivesData = connector.get(
525             SnmpIdentifiers.IP_INRECEIVE_OID,
526             new String JavaDoc (data.mgmtIpAddress),
527             data.getSnmpPort(),
528             READ_COMMUNITY);
529     }
530     catch (SnmpApplicationError e) {
531
532         ApplicationErrorInfoTypeImpl error_code =
533             new ApplicationErrorInfoTypeImpl();
534
535         error_code.error = new UIDType(
536             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
537             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
538
539         if (e.reason.equals(ExceptionMessages.agent_response_error))
540             error_code.details = ExceptionMessages.agent_response_error;
541         else
542             error_code.details = new String JavaDoc ("Could not retrieve ipInReceivesData " +
543                 "for IpProtocolMonitor Object with name " + key + ":" +
544                 " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INRECEIVE_OID +
545                 " does not exist.");
546
547           Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
548               (short) LogSeverity._Error,
549               "SNMP Error getting ipInReceivesData: " + e.reason);
550
551         throw new ApplicationError (error_code);
552     }
553
554     org.omg.CORBA.Any JavaDoc value = ipInReceivesData.value;
555
556     if (value.type().kind().value() != TCKind._tk_longlong) {
557
558         ApplicationErrorInfoTypeImpl error_code =
559             new ApplicationErrorInfoTypeImpl();
560
561         error_code.error = new UIDType(
562             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
563             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
564
565         error_code.details = new String JavaDoc ("Could not retrieve ipInReceivesData " +
566             "for IpProtocolMonitor Object with name " + key + ":" +
567             " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INRECEIVE_OID +
568             " is not of type integer, as expected.");
569
570         throw new ApplicationError (error_code);
571     }
572
573     long ipInReceives = value.extract_longlong();
574
575     return ipInReceives;
576     }
577     //
578
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipInHdrErrorsGet:1.0
579
//
580
/**
581      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipInHdrErrorsGet operation.
582      **/

583     public long
584     ipInHdrErrorsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
585     throws intt.itu.itut_x780.ApplicationError
586     {
587         //
588
// DONE : implement
589
//
590
String JavaDoc key = Utils.name2string(name);
591
592     if (elements.containsKey(key) == false) {
593         ApplicationErrorInfoTypeImpl error_code =
594             new ApplicationErrorInfoTypeImpl();
595
596         error_code.error = new UIDType(
597             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
598             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
599
600         error_code.details = new String JavaDoc("object with name " +
601             key + " does not exist.");
602
603         throw new ApplicationError(error_code);
604     }
605
606     IpProtocolMonitorDataStructure data =
607         (IpProtocolMonitorDataStructure) elements.get(key);
608
609     DataType ipInHeaderErrorsData = null;
610
611     try {
612         ipInHeaderErrorsData = connector.get(
613             SnmpIdentifiers.IP_INHDRERRORS_OID,
614             new String JavaDoc (data.mgmtIpAddress),
615             data.getSnmpPort(),
616             READ_COMMUNITY);
617     }
618     catch (SnmpApplicationError e) {
619
620         ApplicationErrorInfoTypeImpl error_code =
621             new ApplicationErrorInfoTypeImpl();
622
623         error_code.error = new UIDType(
624             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
625             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
626
627         if (e.reason.equals(ExceptionMessages.agent_response_error))
628             error_code.details = ExceptionMessages.agent_response_error;
629         else
630             error_code.details = new String JavaDoc ("Could not retrieve ipInErrorHeaders " +
631                 "for IpProtocolMonitor Object with name " + key + ":" +
632                 " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INHDRERRORS_OID +
633                 " does not exist.");
634
635           Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
636               (short) LogSeverity._Error,
637               "SNMP Error getting ipInErrorHeaders: " + e.reason);
638
639         throw new ApplicationError (error_code);
640     }
641
642     org.omg.CORBA.Any JavaDoc value = ipInHeaderErrorsData.value;
643
644     if (value.type().kind().value() != TCKind._tk_longlong) {
645
646         ApplicationErrorInfoTypeImpl error_code =
647             new ApplicationErrorInfoTypeImpl();
648
649         error_code.error = new UIDType(
650             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
651             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
652
653         error_code.details = new String JavaDoc ("Could not retrieve ipInHeaderErrors " +
654             "for IpProtocolMonitor Object with name " + key + ":" +
655             " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INHDRERRORS_OID +
656             " is not of type long, as expected.");
657
658         throw new ApplicationError (error_code);
659     }
660
661     long ipInHeaderErrors = value.extract_longlong();
662
663     return ipInHeaderErrors;
664     }
665     //
666
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipInAddrErrorsGet:1.0
667
//
668
/**
669      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipInAddrErrorsGet operation.
670      **/

671     public long
672     ipInAddrErrorsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
673     throws intt.itu.itut_x780.ApplicationError
674     {
675         //
676
// DOPE : implement
677
//
678
String JavaDoc key = Utils.name2string(name);
679
680     if (elements.containsKey(key) == false) {
681         ApplicationErrorInfoTypeImpl error_code =
682             new ApplicationErrorInfoTypeImpl();
683
684         error_code.error = new UIDType(
685             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
686             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
687
688         error_code.details = new String JavaDoc("object with name " +
689             key + " does not exist.");
690
691         throw new ApplicationError(error_code);
692     }
693
694     IpProtocolMonitorDataStructure data =
695         (IpProtocolMonitorDataStructure) elements.get(key);
696
697     DataType ipInAddrErrorsData = null;
698
699     try {
700         ipInAddrErrorsData = connector.get(
701             SnmpIdentifiers.IP_INADDRERRORRS_OID,
702             new String JavaDoc (data.mgmtIpAddress),
703             data.getSnmpPort(),
704             READ_COMMUNITY);
705     }
706     catch (SnmpApplicationError e) {
707
708         ApplicationErrorInfoTypeImpl error_code =
709             new ApplicationErrorInfoTypeImpl();
710
711         error_code.error = new UIDType(
712             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
713             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
714
715         if (e.reason.equals(ExceptionMessages.agent_response_error))
716             error_code.details = ExceptionMessages.agent_response_error;
717         else
718             error_code.details = new String JavaDoc ("Could not retrieve ipInAddrErrors " +
719                 "for IpProtocolMonitor Object with name " + key + ":" +
720                 " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INADDRERRORRS_OID +
721                 " does not exist.");
722
723           Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
724               (short) LogSeverity._Error,
725               "SNMP Error getting ipInAddrErrors: " + e.reason);
726
727         throw new ApplicationError (error_code);
728     }
729
730     org.omg.CORBA.Any JavaDoc value = ipInAddrErrorsData.value;
731
732     if (value.type().kind().value() != TCKind._tk_longlong) {
733
734         ApplicationErrorInfoTypeImpl error_code =
735             new ApplicationErrorInfoTypeImpl();
736
737         error_code.error = new UIDType(
738             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
739             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
740
741         error_code.details = new String JavaDoc ("Could not retrieve ipInAddrErrors " +
742             "for IpProtocolMonitor Object with name " + key + ":" +
743             " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INADDRERRORRS_OID +
744             " is not of type long, as expected.");
745
746         throw new ApplicationError (error_code);
747     }
748
749     long ipInAddrErrors = value.extract_longlong();
750
751     return ipInAddrErrors;
752     }
753     //
754
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipForwDatagramsGet:1.0
755
//
756
/**
757      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipForwDatagramsGet operation.
758      **/

759     public long
760     ipForwDatagramsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
761     throws intt.itu.itut_x780.ApplicationError
762     {
763         //
764
// DONE : implement
765
//
766
String JavaDoc key = Utils.name2string(name);
767
768         if (elements.containsKey(key) == false) {
769             ApplicationErrorInfoTypeImpl error_code =
770                 new ApplicationErrorInfoTypeImpl();
771
772             error_code.error = new UIDType(
773                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
774                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
775
776             error_code.details = new String JavaDoc("object with name " +
777                 key + " does not exist.");
778
779             throw new ApplicationError(error_code);
780         }
781
782         IpProtocolMonitorDataStructure data =
783             (IpProtocolMonitorDataStructure) elements.get(key);
784
785         DataType ipForwardedDatagramsData = null;
786
787         try {
788             ipForwardedDatagramsData = connector.get(
789                 SnmpIdentifiers.IP_FWDDATAGRAMS_OID,
790                 new String JavaDoc (data.mgmtIpAddress),
791                 data.getSnmpPort(),
792                 READ_COMMUNITY);
793         }
794         catch (SnmpApplicationError e) {
795
796             ApplicationErrorInfoTypeImpl error_code =
797                 new ApplicationErrorInfoTypeImpl();
798
799             error_code.error = new UIDType(
800                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
801                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
802
803             if (e.reason.equals(ExceptionMessages.agent_response_error))
804                 error_code.details = ExceptionMessages.agent_response_error;
805             else
806                 error_code.details = new String JavaDoc ("Could not retrieve ipForwardedDatagrams " +
807                     "for IpProtocolMonitor Object with name " + key + ":" +
808                     " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FWDDATAGRAMS_OID +
809                     " does not exist.");
810
811             Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
812               (short) LogSeverity._Error,
813               "SNMP Error getting ipForwardedDatagrams: " + e.reason);
814             throw new ApplicationError (error_code);
815         }
816
817         org.omg.CORBA.Any JavaDoc value = ipForwardedDatagramsData.value;
818
819         if (value.type().kind().value() != TCKind._tk_longlong) {
820
821             ApplicationErrorInfoTypeImpl error_code =
822                 new ApplicationErrorInfoTypeImpl();
823
824             error_code.error = new UIDType(
825                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
826                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
827
828             error_code.details = new String JavaDoc ("Could not retrieve ipForwardedDatagrams " +
829                 "for IpProtocolMonitor Object with name " + key + ":" +
830                 " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FWDDATAGRAMS_OID +
831                 " is not of type long, as expected.");
832
833             throw new ApplicationError (error_code);
834         }
835
836         long ipForwardedDatagrams = value.extract_longlong();
837
838         return ipForwardedDatagrams;
839     }
840     //
841
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipInUnknownProtosGet:1.0
842
//
843
/**
844      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipInUnknownProtosGet operation.
845      **/

846     public long
847     ipInUnknownProtosGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
848     throws intt.itu.itut_x780.ApplicationError
849     {
850         //
851
// TODO : implement
852
//
853
String JavaDoc key = Utils.name2string(name);
854
855         if (elements.containsKey(key) == false) {
856             ApplicationErrorInfoTypeImpl error_code =
857                 new ApplicationErrorInfoTypeImpl();
858
859             error_code.error = new UIDType(
860                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
861                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
862
863             error_code.details = new String JavaDoc("object with name " +
864                 key + " does not exist.");
865
866             throw new ApplicationError(error_code);
867         }
868
869         IpProtocolMonitorDataStructure data =
870             (IpProtocolMonitorDataStructure) elements.get(key);
871
872         DataType ipInUnknownProtosData = null;
873
874         try {
875             ipInUnknownProtosData = connector.get(
876                 SnmpIdentifiers.IP_INUNKNOWNPROTO_OID,
877                 new String JavaDoc (data.mgmtIpAddress),
878                 data.getSnmpPort(),
879                 READ_COMMUNITY);
880         }
881         catch (SnmpApplicationError e) {
882
883             ApplicationErrorInfoTypeImpl error_code =
884                 new ApplicationErrorInfoTypeImpl();
885
886             error_code.error = new UIDType(
887                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
888                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
889
890             if (e.reason.equals(ExceptionMessages.agent_response_error))
891                 error_code.details = ExceptionMessages.agent_response_error;
892         else
893             error_code.details = new String JavaDoc ("Could not retrieve ipInUnknownProtos " +
894                 "for IpProtocolMonitor Object with name " + key + ":" +
895                 " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INUNKNOWNPROTO_OID +
896                 " does not exist.");
897
898         Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
899               (short) LogSeverity._Error,
900               "SNMP Error getting ipInUnknownProtos: " + e.reason);
901
902         throw new ApplicationError (error_code);
903     }
904
905     org.omg.CORBA.Any JavaDoc value = ipInUnknownProtosData.value;
906
907     if (value.type().kind().value() != TCKind._tk_longlong) {
908
909         ApplicationErrorInfoTypeImpl error_code =
910             new ApplicationErrorInfoTypeImpl();
911
912         error_code.error = new UIDType(
913             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
914             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
915
916         error_code.details = new String JavaDoc ("Could not retrieve ipInUnknownProtos " +
917             "for IpProtocolMonitor Object with name " + key + ":" +
918             " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INUNKNOWNPROTO_OID +
919             " is not of type long, as expected.");
920
921         throw new ApplicationError (error_code);
922     }
923
924     long ipInUnknownProtos = value.extract_longlong();
925
926     return ipInUnknownProtos;
927
928     }
929     //
930
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipInDiscardsGet:1.0
931
//
932
/**
933      ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipInDiscardsGet operation.
934      **/

935     public long
936     ipInDiscardsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
937     throws intt.itu.itut_x780.ApplicationError
938     {
939         //
940
// DONE : implement
941
//
942
String JavaDoc key = Utils.name2string(name);
943
944         if (elements.containsKey(key) == false) {
945             ApplicationErrorInfoTypeImpl error_code =
946                 new ApplicationErrorInfoTypeImpl();
947
948             error_code.error = new UIDType(
949                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
950                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
951
952             error_code.details = new String JavaDoc("object with name " +
953                 key + " does not exist.");
954
955             throw new ApplicationError(error_code);
956         }
957
958         IpProtocolMonitorDataStructure data =
959             (IpProtocolMonitorDataStructure) elements.get(key);
960
961         DataType ipInDiscardsData = null;
962
963         try {
964             ipInDiscardsData = connector.get(
965                 SnmpIdentifiers.IP_INDISCARDS_OID,
966                 new String JavaDoc (data.mgmtIpAddress),
967                 data.getSnmpPort(),
968                 READ_COMMUNITY);
969         }
970         catch (SnmpApplicationError e) {
971
972             ApplicationErrorInfoTypeImpl error_code =
973                 new ApplicationErrorInfoTypeImpl();
974
975             error_code.error = new UIDType(
976                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
977                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
978
979             if (e.reason.equals(ExceptionMessages.agent_response_error))
980                 error_code.details = ExceptionMessages.agent_response_error;
981             else
982                 error_code.details = new String JavaDoc ("Could not retrieve ipInDiscards " +
983                     "for IpProtocolMonitor Object with name " + key + ":" +
984                     " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INDISCARDS_OID +
985                     " does not exist.");
986
987             Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
988               (short) LogSeverity._Error,
989               "SNMP Error getting ipInDiscards: " + e.reason);
990
991             throw new ApplicationError (error_code);
992         }
993
994         org.omg.CORBA.Any JavaDoc value = ipInDiscardsData.value;
995
996         if (value.type().kind().value() != TCKind._tk_longlong) {
997
998             ApplicationErrorInfoTypeImpl error_code =
999                 new ApplicationErrorInfoTypeImpl();
1000
1001            error_code.error = new UIDType(
1002                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1003                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1004
1005            error_code.details = new String JavaDoc ("Could not retrieve ipInDiscards " +
1006                "for IpProtocolMonitor Object with name " + key + ":" +
1007                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INDISCARDS_OID +
1008                " is not of type long, as expected.");
1009
1010            throw new ApplicationError (error_code);
1011        }
1012
1013        long ipInDiscards = value.extract_longlong();
1014
1015        return ipInDiscards;
1016    }
1017    //
1018
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipInDeliversGet:1.0
1019
//
1020
/**
1021     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipInDeliversGet operation.
1022     **/

1023    public long
1024    ipInDeliversGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1025    throws intt.itu.itut_x780.ApplicationError
1026    {
1027        //
1028
// DONE : implement
1029
//
1030
String JavaDoc key = Utils.name2string(name);
1031
1032        if (elements.containsKey(key) == false) {
1033            ApplicationErrorInfoTypeImpl error_code =
1034                new ApplicationErrorInfoTypeImpl();
1035
1036            error_code.error = new UIDType(
1037                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1038                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1039
1040            error_code.details = new String JavaDoc("object with name " +
1041                key + " does not exist.");
1042
1043            throw new ApplicationError(error_code);
1044        }
1045
1046        IpProtocolMonitorDataStructure data =
1047            (IpProtocolMonitorDataStructure) elements.get(key);
1048
1049        DataType ipInDeliversData = null;
1050
1051        try {
1052            ipInDeliversData = connector.get(
1053                SnmpIdentifiers.IP_INDELIVERS_OID,
1054                new String JavaDoc (data.mgmtIpAddress),
1055                data.getSnmpPort(),
1056                READ_COMMUNITY);
1057        }
1058        catch (SnmpApplicationError e) {
1059
1060            ApplicationErrorInfoTypeImpl error_code =
1061                new ApplicationErrorInfoTypeImpl();
1062
1063            error_code.error = new UIDType(
1064                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1065                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1066
1067            if (e.reason.equals(ExceptionMessages.agent_response_error))
1068                error_code.details = ExceptionMessages.agent_response_error;
1069            else
1070                error_code.details = new String JavaDoc ("Could not retrieve ipInDelivers " +
1071                    "for IpProtocolMonitor Object with name " + key + ":" +
1072                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INDELIVERS_OID +
1073                    " does not exist.");
1074
1075            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1076              (short) LogSeverity._Error,
1077              "SNMP Error getting ipInDelivers: " + e.reason);
1078
1079            throw new ApplicationError (error_code);
1080        }
1081
1082        org.omg.CORBA.Any JavaDoc value = ipInDeliversData.value;
1083
1084        if (value.type().kind().value() != TCKind._tk_longlong) {
1085
1086            ApplicationErrorInfoTypeImpl error_code =
1087                new ApplicationErrorInfoTypeImpl();
1088
1089            error_code.error = new UIDType(
1090                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1091                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1092
1093            error_code.details = new String JavaDoc ("Could not retrieve ipInDelivers " +
1094                "for IpProtocolMonitor Object with name " + key + ":" +
1095                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_INDELIVERS_OID +
1096                " is not of type long, as expected.");
1097
1098            throw new ApplicationError (error_code);
1099        }
1100
1101        long ipInDelivers = value.extract_longlong();
1102
1103        return ipInDelivers;
1104    }
1105    //
1106
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipOutRequestsGet:1.0
1107
//
1108
/**
1109     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipOutRequestsGet operation.
1110     **/

1111    public long
1112    ipOutRequestsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1113    throws intt.itu.itut_x780.ApplicationError
1114    {
1115        //
1116
// DONE : implement
1117
//
1118
String JavaDoc key = Utils.name2string(name);
1119
1120        if (elements.containsKey(key) == false) {
1121            ApplicationErrorInfoTypeImpl error_code =
1122                new ApplicationErrorInfoTypeImpl();
1123
1124            error_code.error = new UIDType(
1125                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1126                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1127
1128            error_code.details = new String JavaDoc("object with name " +
1129                key + " does not exist.");
1130
1131            throw new ApplicationError(error_code);
1132        }
1133
1134        IpProtocolMonitorDataStructure data =
1135            (IpProtocolMonitorDataStructure) elements.get(key);
1136
1137        DataType ipOutRequestsData = null;
1138
1139        try {
1140            ipOutRequestsData = connector.get(
1141                SnmpIdentifiers.IP_OUTREQUESTS_OID,
1142                new String JavaDoc (data.mgmtIpAddress),
1143                data.getSnmpPort(),
1144                READ_COMMUNITY);
1145        }
1146        catch (SnmpApplicationError e) {
1147
1148            ApplicationErrorInfoTypeImpl error_code =
1149                new ApplicationErrorInfoTypeImpl();
1150
1151            error_code.error = new UIDType(
1152                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1153                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1154
1155            if (e.reason.equals(ExceptionMessages.agent_response_error))
1156                error_code.details = ExceptionMessages.agent_response_error;
1157            else
1158                error_code.details = new String JavaDoc ("Could not retrieve ipOutRequests " +
1159                    "for IpProtocolMonitor Object with name " + key + ":" +
1160                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_OUTREQUESTS_OID +
1161                    " does not exist.");
1162
1163            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1164              (short) LogSeverity._Error,
1165              "SNMP Error getting ipOutRequests: " + e.reason);
1166
1167              throw new ApplicationError (error_code);
1168        }
1169
1170        org.omg.CORBA.Any JavaDoc value = ipOutRequestsData.value;
1171
1172        if (value.type().kind().value() != TCKind._tk_longlong) {
1173
1174            ApplicationErrorInfoTypeImpl error_code =
1175                new ApplicationErrorInfoTypeImpl();
1176
1177            error_code.error = new UIDType(
1178                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1179                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1180
1181            error_code.details = new String JavaDoc ("Could not retrieve ipOutRequests " +
1182                "for IpProtocolMonitor Object with name " + key + ":" +
1183                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_OUTREQUESTS_OID +
1184                " is not of type long, as expected.");
1185
1186            throw new ApplicationError (error_code);
1187        }
1188
1189        long ipOutRequests = value.extract_longlong();
1190
1191        return ipOutRequests;
1192    }
1193    //
1194
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipOutDiscardsGet:1.0
1195
//
1196
/**
1197     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipOutDiscardsGet operation.
1198     **/

1199    public long
1200    ipOutDiscardsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1201    throws intt.itu.itut_x780.ApplicationError
1202    {
1203        //
1204
// DONE : implement
1205
//
1206
String JavaDoc key = Utils.name2string(name);
1207
1208        if (elements.containsKey(key) == false) {
1209            ApplicationErrorInfoTypeImpl error_code =
1210                new ApplicationErrorInfoTypeImpl();
1211
1212            error_code.error = new UIDType(
1213                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1214                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1215
1216            error_code.details = new String JavaDoc("object with name " +
1217                key + " does not exist.");
1218
1219            throw new ApplicationError(error_code);
1220        }
1221
1222        IpProtocolMonitorDataStructure data =
1223            (IpProtocolMonitorDataStructure) elements.get(key);
1224
1225        DataType ipOutDiscardsData = null;
1226
1227        try {
1228            ipOutDiscardsData = connector.get(
1229                SnmpIdentifiers.IP_OUTDISCARDS_OID,
1230                new String JavaDoc (data.mgmtIpAddress),
1231                data.getSnmpPort(),
1232                READ_COMMUNITY);
1233        }
1234        catch (SnmpApplicationError e) {
1235
1236            ApplicationErrorInfoTypeImpl error_code =
1237                new ApplicationErrorInfoTypeImpl();
1238
1239            error_code.error = new UIDType(
1240                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1241                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1242
1243            if (e.reason.equals(ExceptionMessages.agent_response_error))
1244                error_code.details = ExceptionMessages.agent_response_error;
1245            else
1246                error_code.details = new String JavaDoc ("Could not retrieve ipOutDiscards " +
1247                    "for IpProtocolMonitor Object with name " + key + ":" +
1248                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_OUTDISCARDS_OID +
1249                    " does not exist.");
1250
1251            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1252              (short) LogSeverity._Error,
1253              "SNMP Error getting ipOutDiscards: " + e.reason);
1254
1255              throw new ApplicationError (error_code);
1256        }
1257
1258        org.omg.CORBA.Any JavaDoc value = ipOutDiscardsData.value;
1259
1260        if (value.type().kind().value() != TCKind._tk_longlong) {
1261
1262            ApplicationErrorInfoTypeImpl error_code =
1263                new ApplicationErrorInfoTypeImpl();
1264
1265            error_code.error = new UIDType(
1266                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1267                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1268
1269            error_code.details = new String JavaDoc ("Could not retrieve ipOutDiscards " +
1270                "for IpProtocolMonitor Object with name " + key + ":" +
1271                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_ROUTING_DISCARDS_OID +
1272                " is not of type long, as expected.");
1273
1274            throw new ApplicationError (error_code);
1275        }
1276
1277        long ipOutDiscards = value.extract_longlong();
1278
1279        return ipOutDiscards;
1280    }
1281    //
1282
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipOutNoRoutesGet:1.0
1283
//
1284
/**
1285     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipOutNoRoutesGet operation.
1286     **/

1287    public long
1288    ipOutNoRoutesGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1289    throws intt.itu.itut_x780.ApplicationError
1290    {
1291        //
1292
// DONE : implement
1293
//
1294
String JavaDoc key = Utils.name2string(name);
1295
1296        if (elements.containsKey(key) == false) {
1297            ApplicationErrorInfoTypeImpl error_code =
1298                new ApplicationErrorInfoTypeImpl();
1299
1300            error_code.error = new UIDType(
1301                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1302                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1303
1304            error_code.details = new String JavaDoc("object with name " +
1305                key + " does not exist.");
1306
1307            throw new ApplicationError(error_code);
1308        }
1309
1310        IpProtocolMonitorDataStructure data =
1311            (IpProtocolMonitorDataStructure) elements.get(key);
1312
1313        DataType ipNoRoutesData = null;
1314
1315        try {
1316            ipNoRoutesData = connector.get(
1317                SnmpIdentifiers.IP_NOROUTE_OID,
1318                new String JavaDoc (data.mgmtIpAddress),
1319                data.getSnmpPort(),
1320                READ_COMMUNITY);
1321        }
1322        catch (SnmpApplicationError e) {
1323
1324            ApplicationErrorInfoTypeImpl error_code =
1325                new ApplicationErrorInfoTypeImpl();
1326
1327            error_code.error = new UIDType(
1328                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1329                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1330
1331            if (e.reason.equals(ExceptionMessages.agent_response_error))
1332                error_code.details = ExceptionMessages.agent_response_error;
1333            else
1334                error_code.details = new String JavaDoc ("Could not retrieve ipNoRoutes " +
1335                    "for IpProtocolMonitor Object with name " + key + ":" +
1336                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_NOROUTE_OID +
1337                    " does not exist.");
1338
1339            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1340              (short) LogSeverity._Error,
1341              "SNMP Error getting ipNoRoutes: " + e.reason);
1342
1343             throw new ApplicationError (error_code);
1344        }
1345
1346        org.omg.CORBA.Any JavaDoc value = ipNoRoutesData.value;
1347
1348        if (value.type().kind().value() != TCKind._tk_longlong) {
1349
1350            ApplicationErrorInfoTypeImpl error_code =
1351                new ApplicationErrorInfoTypeImpl();
1352
1353            error_code.error = new UIDType(
1354                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1355                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1356
1357            error_code.details = new String JavaDoc ("Could not retrieve ipNoRoutes " +
1358                "for IpProtocolMonitor Object with name " + key + ":" +
1359                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_NOROUTE_OID +
1360                " is not of type long, as expected.");
1361
1362            throw new ApplicationError (error_code);
1363        }
1364
1365        long ipNoRoutes = value.extract_longlong();
1366
1367        return ipNoRoutes;
1368    }
1369    //
1370
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipReasmTimeoutGet:1.0
1371
//
1372
/**
1373     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipReasmTimeoutGet operation.
1374     **/

1375    public int
1376    ipReasmTimeoutGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1377    throws intt.itu.itut_x780.ApplicationError
1378    {
1379        //
1380
// DONE : implement
1381
//
1382
String JavaDoc key = Utils.name2string(name);
1383
1384        if (elements.containsKey(key) == false) {
1385            ApplicationErrorInfoTypeImpl error_code =
1386                new ApplicationErrorInfoTypeImpl();
1387
1388            error_code.error = new UIDType(
1389                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1390                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1391
1392            error_code.details = new String JavaDoc("object with name " +
1393                key + " does not exist.");
1394
1395            throw new ApplicationError(error_code);
1396        }
1397
1398        IpProtocolMonitorDataStructure data =
1399            (IpProtocolMonitorDataStructure) elements.get(key);
1400
1401        DataType ipReasmTimeoutData = null;
1402
1403        try {
1404            ipReasmTimeoutData = connector.get(
1405                SnmpIdentifiers.IP_REASMTIMEOUT_OID,
1406                new String JavaDoc (data.mgmtIpAddress),
1407                data.getSnmpPort(),
1408                READ_COMMUNITY);
1409        }
1410        catch (SnmpApplicationError e) {
1411
1412            ApplicationErrorInfoTypeImpl error_code =
1413                new ApplicationErrorInfoTypeImpl();
1414
1415            error_code.error = new UIDType(
1416                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1417                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1418
1419            if (e.reason.equals(ExceptionMessages.agent_response_error))
1420                error_code.details = ExceptionMessages.agent_response_error;
1421            else
1422                error_code.details = new String JavaDoc ("Could not retrieve ipReasmTimeouts " +
1423                    "for IpProtocolMonitor Object with name " + key + ":" +
1424                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_REASMTIMEOUT_OID +
1425                    " does not exist.");
1426
1427            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1428              (short) LogSeverity._Error,
1429              "SNMP Error getting ipReasmTimeouts: " + e.reason);
1430
1431            throw new ApplicationError (error_code);
1432        }
1433
1434        org.omg.CORBA.Any JavaDoc value = ipReasmTimeoutData.value;
1435
1436        if (value.type().kind().value() != TCKind._tk_long) {
1437
1438            ApplicationErrorInfoTypeImpl error_code =
1439                new ApplicationErrorInfoTypeImpl();
1440
1441            error_code.error = new UIDType(
1442                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1443                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1444
1445            error_code.details = new String JavaDoc ("Could not retrieve ipReasmTimeouts " +
1446                "for IpProtocolMonitor Object with name " + key + ":" +
1447                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_REASMTIMEOUT_OID +
1448                " is not of type long, as expected.");
1449
1450            throw new ApplicationError (error_code);
1451        }
1452
1453        int ipReasmTimeouts = value.extract_long();
1454
1455        return ipReasmTimeouts;
1456    }
1457    //
1458
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipReasmReqdsGet:1.0
1459
//
1460
/**
1461     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipReasmReqdsGet operation.
1462     **/

1463    public long
1464    ipReasmReqdsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1465    throws intt.itu.itut_x780.ApplicationError
1466    {
1467        //
1468
// DONE : implement
1469
//
1470
String JavaDoc key = Utils.name2string(name);
1471
1472        if (elements.containsKey(key) == false) {
1473            ApplicationErrorInfoTypeImpl error_code =
1474                new ApplicationErrorInfoTypeImpl();
1475
1476            error_code.error = new UIDType(
1477                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1478                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1479
1480            error_code.details = new String JavaDoc("object with name " +
1481                key + " does not exist.");
1482
1483            throw new ApplicationError(error_code);
1484        }
1485
1486        IpProtocolMonitorDataStructure data =
1487            (IpProtocolMonitorDataStructure) elements.get(key);
1488
1489        DataType ipReasmReqsData = null;
1490
1491        try {
1492            ipReasmReqsData = connector.get(
1493                SnmpIdentifiers.IP_REASMREQ_OID,
1494                new String JavaDoc (data.mgmtIpAddress),
1495                data.getSnmpPort(),
1496                READ_COMMUNITY);
1497        }
1498        catch (SnmpApplicationError e) {
1499
1500            ApplicationErrorInfoTypeImpl error_code =
1501                new ApplicationErrorInfoTypeImpl();
1502
1503            error_code.error = new UIDType(
1504                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1505                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1506
1507            if (e.reason.equals(ExceptionMessages.agent_response_error))
1508                error_code.details = ExceptionMessages.agent_response_error;
1509            else
1510                error_code.details = new String JavaDoc ("Could not retrieve ipReasmReqs " +
1511                    "for IpProtocolMonitor Object with name " + key + ":" +
1512                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_REASMREQ_OID +
1513                    " does not exist.");
1514
1515            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1516              (short) LogSeverity._Error,
1517              "SNMP Error getting ipReasmReqs: " + e.reason);
1518
1519            throw new ApplicationError (error_code);
1520        }
1521
1522        org.omg.CORBA.Any JavaDoc value = ipReasmReqsData.value;
1523
1524        if (value.type().kind().value() != TCKind._tk_longlong) {
1525
1526            ApplicationErrorInfoTypeImpl error_code =
1527                new ApplicationErrorInfoTypeImpl();
1528
1529            error_code.error = new UIDType(
1530                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1531                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1532
1533            error_code.details = new String JavaDoc ("Could not retrieve ipReasmReqs " +
1534                "for IpProtocolMonitor Object with name " + key + ":" +
1535                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_REASMREQ_OID +
1536                " is not of type long, as expected.");
1537
1538            throw new ApplicationError (error_code);
1539        }
1540
1541        long ipReasmReqs = value.extract_longlong();
1542
1543        return ipReasmReqs;
1544    }
1545    //
1546
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipReasmOKsGet:1.0
1547
//
1548
/**
1549     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipReasmOKsGet operation.
1550     **/

1551    public long
1552    ipReasmOKsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1553    throws intt.itu.itut_x780.ApplicationError
1554    {
1555        //
1556
// DONE : implement
1557
//
1558
String JavaDoc key = Utils.name2string(name);
1559
1560        if (elements.containsKey(key) == false) {
1561            ApplicationErrorInfoTypeImpl error_code =
1562                new ApplicationErrorInfoTypeImpl();
1563
1564            error_code.error = new UIDType(
1565                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1566                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1567
1568            error_code.details = new String JavaDoc("object with name " +
1569                key + " does not exist.");
1570
1571            throw new ApplicationError(error_code);
1572        }
1573
1574        IpProtocolMonitorDataStructure data =
1575            (IpProtocolMonitorDataStructure) elements.get(key);
1576
1577        DataType ipReasmOKsData = null;
1578
1579        try {
1580            ipReasmOKsData = connector.get(
1581                SnmpIdentifiers.IP_REASMOK_OID,
1582                new String JavaDoc (data.mgmtIpAddress),
1583                data.getSnmpPort(),
1584                READ_COMMUNITY);
1585        }
1586        catch (SnmpApplicationError e) {
1587
1588            ApplicationErrorInfoTypeImpl error_code =
1589                new ApplicationErrorInfoTypeImpl();
1590
1591            error_code.error = new UIDType(
1592                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1593                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1594
1595            if (e.reason.equals(ExceptionMessages.agent_response_error))
1596                error_code.details = ExceptionMessages.agent_response_error;
1597            else
1598                error_code.details = new String JavaDoc ("Could not retrieve ipReasmOKs " +
1599                    "for IpProtocolMonitor Object with name " + key + ":" +
1600                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_REASMOK_OID +
1601                    " does not exist.");
1602
1603            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1604              (short) LogSeverity._Error,
1605              "SNMP Error getting ipReasmOKs: " + e.reason);
1606
1607            throw new ApplicationError (error_code);
1608        }
1609
1610        org.omg.CORBA.Any JavaDoc value = ipReasmOKsData.value;
1611
1612        if (value.type().kind().value() != TCKind._tk_longlong) {
1613
1614            ApplicationErrorInfoTypeImpl error_code =
1615                new ApplicationErrorInfoTypeImpl();
1616
1617            error_code.error = new UIDType(
1618                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1619                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1620
1621            error_code.details = new String JavaDoc ("Could not retrieve ipReasmOKs " +
1622                "for IpProtocolMonitor Object with name " + key + ":" +
1623                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_REASMOK_OID +
1624                " is not of type long, as expected.");
1625
1626            throw new ApplicationError (error_code);
1627        }
1628
1629        long ipReasmOKs = value.extract_longlong();
1630
1631        return ipReasmOKs;
1632    }
1633    //
1634
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipReasmFailsGet:1.0
1635
//
1636
/**
1637     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipReasmFailsGet operation.
1638     **/

1639    public long
1640    ipReasmFailsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1641    throws intt.itu.itut_x780.ApplicationError
1642    {
1643        //
1644
// DONE : implement
1645
//
1646
String JavaDoc key = Utils.name2string(name);
1647
1648        if (elements.containsKey(key) == false) {
1649            ApplicationErrorInfoTypeImpl error_code =
1650                new ApplicationErrorInfoTypeImpl();
1651
1652            error_code.error = new UIDType(
1653                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1654                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1655
1656            error_code.details = new String JavaDoc("object with name " +
1657                key + " does not exist.");
1658
1659            throw new ApplicationError(error_code);
1660        }
1661
1662        IpProtocolMonitorDataStructure data =
1663            (IpProtocolMonitorDataStructure) elements.get(key);
1664
1665        DataType ipReasmFailsData = null;
1666
1667        try {
1668            ipReasmFailsData = connector.get(
1669                SnmpIdentifiers.IP_REASMFAIL_OID,
1670                new String JavaDoc (data.mgmtIpAddress),
1671                data.getSnmpPort(),
1672                READ_COMMUNITY);
1673        }
1674        catch (SnmpApplicationError e) {
1675
1676            ApplicationErrorInfoTypeImpl error_code =
1677                new ApplicationErrorInfoTypeImpl();
1678
1679            error_code.error = new UIDType(
1680                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1681                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1682
1683            if (e.reason.equals(ExceptionMessages.agent_response_error))
1684                error_code.details = ExceptionMessages.agent_response_error;
1685            else
1686                error_code.details = new String JavaDoc ("Could not retrieve ipReasmFails " +
1687                    "for IpProtocolMonitor Object with name " + key + ":" +
1688                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_REASMFAIL_OID +
1689                    " does not exist.");
1690
1691            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1692              (short) LogSeverity._Error,
1693              "SNMP Error getting ipReasmFails: " + e.reason);
1694
1695            throw new ApplicationError (error_code);
1696        }
1697
1698        org.omg.CORBA.Any JavaDoc value = ipReasmFailsData.value;
1699
1700        if (value.type().kind().value() != TCKind._tk_longlong) {
1701
1702            ApplicationErrorInfoTypeImpl error_code =
1703                new ApplicationErrorInfoTypeImpl();
1704
1705            error_code.error = new UIDType(
1706                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1707                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1708
1709            error_code.details = new String JavaDoc ("Could not retrieve ipReasmFails " +
1710                "for IpProtocolMonitor Object with name " + key + ":" +
1711                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_REASMFAIL_OID +
1712                " is not of type long, as expected.");
1713
1714            throw new ApplicationError (error_code);
1715        }
1716
1717        long ipReasmFails = value.extract_longlong();
1718
1719        return ipReasmFails;
1720    }
1721    //
1722
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipFragOKsGet:1.0
1723
//
1724
/**
1725     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipFragOKsGet operation.
1726     **/

1727    public long
1728    ipFragOKsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1729    throws intt.itu.itut_x780.ApplicationError
1730    {
1731        //
1732
// TODO : implement
1733
//
1734
String JavaDoc key = Utils.name2string(name);
1735
1736        if (elements.containsKey(key) == false) {
1737            ApplicationErrorInfoTypeImpl error_code =
1738                new ApplicationErrorInfoTypeImpl();
1739
1740            error_code.error = new UIDType(
1741                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1742                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1743
1744            error_code.details = new String JavaDoc("object with name " +
1745                key + " does not exist.");
1746
1747            throw new ApplicationError(error_code);
1748        }
1749
1750        IpProtocolMonitorDataStructure data =
1751            (IpProtocolMonitorDataStructure) elements.get(key);
1752
1753        DataType ipFragOKsData = null;
1754
1755        try {
1756            ipFragOKsData = connector.get(
1757                SnmpIdentifiers.IP_FRAGOK_OID,
1758                new String JavaDoc (data.mgmtIpAddress),
1759                data.getSnmpPort(),
1760                READ_COMMUNITY);
1761        }
1762        catch (SnmpApplicationError e) {
1763
1764            ApplicationErrorInfoTypeImpl error_code =
1765                new ApplicationErrorInfoTypeImpl();
1766
1767            error_code.error = new UIDType(
1768                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1769                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1770
1771            if (e.reason.equals(ExceptionMessages.agent_response_error))
1772                error_code.details = ExceptionMessages.agent_response_error;
1773            else
1774                error_code.details = new String JavaDoc ("Could not retrieve ipFragOKs " +
1775                    "for IpProtocolMonitor Object with name " + key + ":" +
1776                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FRAGOK_OID +
1777                    " does not exist.");
1778
1779            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1780              (short) LogSeverity._Error,
1781              "SNMP Error getting ipFragOKs: " + e.reason);
1782            throw new ApplicationError (error_code);
1783        }
1784
1785        org.omg.CORBA.Any JavaDoc value = ipFragOKsData.value;
1786
1787        if (value.type().kind().value() != TCKind._tk_longlong) {
1788
1789            ApplicationErrorInfoTypeImpl error_code =
1790                new ApplicationErrorInfoTypeImpl();
1791
1792            error_code.error = new UIDType(
1793                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1794                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1795
1796            error_code.details = new String JavaDoc ("Could not retrieve ipFragOKs " +
1797                "for IpProtocolMonitor Object with name " + key + ":" +
1798                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FRAGOK_OID +
1799                " is not of type long, as expected.");
1800
1801            throw new ApplicationError (error_code);
1802        }
1803
1804        long ipFragOKs = value.extract_longlong();
1805
1806        return ipFragOKs;
1807    }
1808    //
1809
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipFragFailsGet:1.0
1810
//
1811
/**
1812     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipFragFailsGet operation.
1813     **/

1814    public long
1815    ipFragFailsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1816    throws intt.itu.itut_x780.ApplicationError
1817    {
1818        //
1819
// DONE : implement
1820
//
1821
String JavaDoc key = Utils.name2string(name);
1822
1823        if (elements.containsKey(key) == false) {
1824            ApplicationErrorInfoTypeImpl error_code =
1825                new ApplicationErrorInfoTypeImpl();
1826
1827            error_code.error = new UIDType(
1828                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1829                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1830
1831            error_code.details = new String JavaDoc("object with name " +
1832                key + " does not exist.");
1833
1834            throw new ApplicationError(error_code);
1835        }
1836
1837        IpProtocolMonitorDataStructure data =
1838            (IpProtocolMonitorDataStructure) elements.get(key);
1839
1840        DataType ipFragFailsData = null;
1841
1842        try {
1843            ipFragFailsData = connector.get(
1844                SnmpIdentifiers.IP_FRAGFAIL_OID,
1845                new String JavaDoc (data.mgmtIpAddress),
1846                data.getSnmpPort(),
1847                READ_COMMUNITY);
1848        }
1849        catch (SnmpApplicationError e) {
1850
1851            ApplicationErrorInfoTypeImpl error_code =
1852                new ApplicationErrorInfoTypeImpl();
1853
1854            error_code.error = new UIDType(
1855                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1856                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1857
1858            if (e.reason.equals(ExceptionMessages.agent_response_error))
1859                error_code.details = ExceptionMessages.agent_response_error;
1860            else
1861                error_code.details = new String JavaDoc ("Could not retrieve ipFragFails " +
1862                    "for IpProtocolMonitor Object with name " + key + ":" +
1863                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FRAGFAIL_OID +
1864                    " does not exist.");
1865
1866              Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1867              (short) LogSeverity._Error,
1868              "SNMP Error getting ipFragFails: " + e.reason);
1869              throw new ApplicationError (error_code);
1870        }
1871
1872        org.omg.CORBA.Any JavaDoc value = ipFragFailsData.value;
1873
1874        if (value.type().kind().value() != TCKind._tk_longlong) {
1875
1876            ApplicationErrorInfoTypeImpl error_code =
1877                new ApplicationErrorInfoTypeImpl();
1878
1879            error_code.error = new UIDType(
1880                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1881                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1882
1883            error_code.details = new String JavaDoc ("Could not retrieve ipFragFails " +
1884                "for IpProtocolMonitor Object with name " + key + ":" +
1885                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FRAGFAIL_OID +
1886                " is not of type long, as expected.");
1887
1888            throw new ApplicationError (error_code);
1889        }
1890
1891        long ipFragFails = value.extract_longlong();
1892
1893        return ipFragFails;
1894    }
1895    //
1896
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipFragCreatesGet:1.0
1897
//
1898
/**
1899     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipFragCreatesGet operation.
1900     **/

1901    public long
1902    ipFragCreatesGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1903    throws intt.itu.itut_x780.ApplicationError
1904    {
1905        //
1906
// DONE : implement
1907
//
1908
String JavaDoc key = Utils.name2string(name);
1909
1910        if (elements.containsKey(key) == false) {
1911            ApplicationErrorInfoTypeImpl error_code =
1912                new ApplicationErrorInfoTypeImpl();
1913
1914            error_code.error = new UIDType(
1915                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1916                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1917
1918            error_code.details = new String JavaDoc("object with name " +
1919                key + " does not exist.");
1920
1921            throw new ApplicationError(error_code);
1922        }
1923
1924        IpProtocolMonitorDataStructure data =
1925            (IpProtocolMonitorDataStructure) elements.get(key);
1926
1927        DataType ipFragCreatesData = null;
1928
1929        try {
1930            ipFragCreatesData = connector.get(
1931                SnmpIdentifiers.IP_FRAGCREATE_OID,
1932                new String JavaDoc (data.mgmtIpAddress),
1933                data.getSnmpPort(),
1934                READ_COMMUNITY);
1935        }
1936        catch (SnmpApplicationError e) {
1937
1938            ApplicationErrorInfoTypeImpl error_code =
1939                new ApplicationErrorInfoTypeImpl();
1940
1941            error_code.error = new UIDType(
1942                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1943                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1944
1945            if (e.reason.equals(ExceptionMessages.agent_response_error))
1946                error_code.details = ExceptionMessages.agent_response_error;
1947            else
1948                error_code.details = new String JavaDoc ("Could not retrieve ipFragCreates " +
1949                    "for IpProtocolMonitor Object with name " + key + ":" +
1950                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FRAGCREATE_OID +
1951                    " does not exist.");
1952
1953              Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
1954              (short) LogSeverity._Error,
1955              "SNMP Error getting ipFragCreates: " + e.reason);
1956
1957            throw new ApplicationError (error_code);
1958        }
1959
1960        org.omg.CORBA.Any JavaDoc value = ipFragCreatesData.value;
1961
1962        if (value.type().kind().value() != TCKind._tk_longlong) {
1963
1964            ApplicationErrorInfoTypeImpl error_code =
1965                new ApplicationErrorInfoTypeImpl();
1966
1967            error_code.error = new UIDType(
1968                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
1969                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
1970
1971            error_code.details = new String JavaDoc ("Could not retrieve ipFragCreates " +
1972                "for IpProtocolMonitor Object with name " + key + ":" +
1973                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_FRAGCREATE_OID +
1974                " is not of type long, as expected.");
1975
1976            throw new ApplicationError (error_code);
1977        }
1978
1979        long ipFragCreates = value.extract_longlong();
1980
1981        return ipFragCreates;
1982    }
1983    //
1984
// IDL:coach.ist/coachEmsMib/IpProtocolMonitor_F/ipRoutingDiscardsGet:1.0
1985
//
1986
/**
1987     ** Implementation of the ::coachEmsMib::IpProtocolMonitor_F::ipRoutingDiscardsGet operation.
1988     **/

1989    public long
1990    ipRoutingDiscardsGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
1991    throws intt.itu.itut_x780.ApplicationError
1992    {
1993        //
1994
// DONE : implement
1995
//
1996
String JavaDoc key = Utils.name2string(name);
1997
1998        if (elements.containsKey(key) == false) {
1999            ApplicationErrorInfoTypeImpl error_code =
2000                new ApplicationErrorInfoTypeImpl();
2001
2002            error_code.error = new UIDType(
2003                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2004                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2005
2006            error_code.details = new String JavaDoc("object with name " +
2007                key + " does not exist.");
2008
2009            throw new ApplicationError(error_code);
2010        }
2011
2012        IpProtocolMonitorDataStructure data =
2013            (IpProtocolMonitorDataStructure) elements.get(key);
2014
2015        DataType ipRoutingDiscardsData = null;
2016
2017        try {
2018            ipRoutingDiscardsData = connector.get(
2019                SnmpIdentifiers.IP_ROUTING_DISCARDS_OID,
2020                new String JavaDoc (data.mgmtIpAddress),
2021                data.getSnmpPort(),
2022                READ_COMMUNITY);
2023        }
2024        catch (SnmpApplicationError e) {
2025
2026            ApplicationErrorInfoTypeImpl error_code =
2027                new ApplicationErrorInfoTypeImpl();
2028
2029            error_code.error = new UIDType(
2030                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2031                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2032
2033            if (e.reason.equals(ExceptionMessages.agent_response_error))
2034                error_code.details = ExceptionMessages.agent_response_error;
2035            else
2036                error_code.details = new String JavaDoc ("Could not retrieve ipRoutingDiscards " +
2037                    "for IpProtocolMonitor Object with name " + key + ":" +
2038                    " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_ROUTING_DISCARDS_OID +
2039                    " does not exist.");
2040
2041
2042              Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
2043              (short) LogSeverity._Error,
2044              "SNMP Error getting ipRoutingDiscards: " + e.reason);
2045
2046            throw new ApplicationError (error_code);
2047        }
2048
2049        org.omg.CORBA.Any JavaDoc value = ipRoutingDiscardsData.value;
2050
2051        if (value.type().kind().value() != TCKind._tk_longlong) {
2052
2053            ApplicationErrorInfoTypeImpl error_code =
2054                new ApplicationErrorInfoTypeImpl();
2055
2056            error_code.error = new UIDType(
2057                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2058                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2059
2060            error_code.details = new String JavaDoc ("Could not retrieve ipRoutingDiscards " +
2061                "for IpProtocolMonitor Object with name " + key + ":" +
2062                " Object with Snmp Object Identifier " + SnmpIdentifiers.IP_ROUTING_DISCARDS_OID +
2063                " is not of type long, as expected.");
2064
2065            throw new ApplicationError (error_code);
2066        }
2067
2068        long ipRoutingDiscards = value.extract_longlong();
2069
2070        return ipRoutingDiscards;
2071    }
2072    //
2073
// IDL:itu.intt/itut_x780/ManagedObject_F/nameGet:1.0
2074
//
2075
/**
2076     ** Implementation of the ::itut_x780::ManagedObject_F::nameGet operation.
2077     **/

2078    public org.omg.CosNaming.NameComponent JavaDoc[]
2079    nameGet()
2080    {
2081        //
2082
// DONE : implement
2083
//
2084
return Utils.string2name(_facade_name);
2085    }
2086    //
2087
// IDL:itu.intt/itut_x780/ManagedObject_F/objectClassGet:1.0
2088
//
2089
/**
2090     ** Implementation of the ::itut_x780::ManagedObject_F::objectClassGet operation.
2091     **/

2092    public java.lang.String JavaDoc
2093    objectClassGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
2094    throws intt.itu.itut_x780.ApplicationError
2095    {
2096        //
2097
// DONE : implement
2098
//
2099
String JavaDoc key = Utils.name2string(name);
2100
2101        if (elements.containsKey(key) == false) {
2102            ApplicationErrorInfoTypeImpl error_code =
2103                new ApplicationErrorInfoTypeImpl();
2104
2105            error_code.error = new UIDType(
2106                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2107                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2108
2109            error_code.details = new String JavaDoc("object with name " +
2110                key + " does not exist.");
2111
2112            throw new ApplicationError(error_code);
2113        }
2114
2115        IpProtocolMonitorDataStructure data =
2116            (IpProtocolMonitorDataStructure) elements.get(key);
2117
2118        return data.objectclass;
2119
2120    }
2121    //
2122
// IDL:itu.intt/itut_x780/ManagedObject_F/attributesGet:1.0
2123
//
2124
/**
2125     ** Implementation of the ::itut_x780::ManagedObject_F::attributesGet operation.
2126     **/

2127    public intt.itu.itut_x780.ManagedObjectValueType
2128    attributesGet(org.omg.CosNaming.NameComponent JavaDoc[] name, intt.itu.itut_x780.StringSetTypeHolder attributeNames)
2129    throws intt.itu.itut_x780.ApplicationError
2130    {
2131        //
2132
// DONE : implement
2133
//
2134
String JavaDoc key = Utils.name2string(name);
2135
2136        if (elements.containsKey(key) == false) {
2137            ApplicationErrorInfoTypeImpl error_code =
2138                new ApplicationErrorInfoTypeImpl();
2139
2140            error_code.error = new UIDType(
2141                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2142                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2143
2144            error_code.details = new String JavaDoc("object with name " +
2145                key + " does not exist.");
2146
2147            throw new ApplicationError(error_code);
2148        }
2149
2150        IpProtocolMonitorDataStructure data =
2151            (IpProtocolMonitorDataStructure) elements.get(key);
2152
2153        IpProtocolMonitorValueTypeImpl ipProtocolMonitorValueType =
2154            new IpProtocolMonitorValueTypeImpl(
2155                ipForwardingGet(name),
2156                ipDefaultTTLGet(name),
2157                ipInReceivesGet(name),
2158                ipInHdrErrorsGet(name),
2159                ipInAddrErrorsGet(name),
2160                ipForwDatagramsGet(name),
2161                ipInUnknownProtosGet(name),
2162                ipInDiscardsGet(name),
2163                ipInDeliversGet(name),
2164                ipOutRequestsGet(name),
2165                ipOutDiscardsGet(name),
2166                ipOutNoRoutesGet(name),
2167                ipReasmTimeoutGet(name),
2168                ipReasmReqdsGet(name),
2169                ipReasmOKsGet(name),
2170                ipReasmFailsGet(name),
2171                ipFragOKsGet(name),
2172                ipFragFailsGet(name),
2173                ipFragCreatesGet(name),
2174                ipRoutingDiscardsGet(name),
2175
2176                data.name,
2177                data.objectclass,
2178                data.packages,
2179                data.sourceIndicator,
2180                data.deletePolicy
2181            );
2182            Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
2183            (short) LogSeverity._Info,
2184            "attributesGet finished successfully");
2185            return ipProtocolMonitorValueType;
2186    }
2187    //
2188
// IDL:itu.intt/itut_x780/ManagedObject_F/packagesGet:1.0
2189
//
2190
/**
2191     ** Implementation of the ::itut_x780::ManagedObject_F::packagesGet operation.
2192     **/

2193    public java.lang.String JavaDoc[]
2194    packagesGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
2195    throws intt.itu.itut_x780.ApplicationError
2196    {
2197        //
2198
// DONE : implement
2199
//
2200
String JavaDoc key = Utils.name2string(name);
2201
2202        if (elements.containsKey(key) == false) {
2203            ApplicationErrorInfoTypeImpl error_code =
2204                new ApplicationErrorInfoTypeImpl();
2205
2206            error_code.error = new UIDType(
2207                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2208                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2209
2210            error_code.details = new String JavaDoc("object with name " +
2211                key + " does not exist.");
2212
2213            throw new ApplicationError(error_code);
2214        }
2215
2216        IpProtocolMonitorDataStructure data =
2217            (IpProtocolMonitorDataStructure) elements.get(key);
2218
2219        return data.packages;
2220    }
2221    //
2222
// IDL:itu.intt/itut_x780/ManagedObject_F/creationSourceGet:1.0
2223
//
2224
/**
2225     ** Implementation of the ::itut_x780::ManagedObject_F::creationSourceGet operation.
2226     **/

2227    public intt.itu.itut_x780.SourceIndicatorType
2228    creationSourceGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
2229    throws intt.itu.itut_x780.ApplicationError
2230    {
2231        //
2232
// DONE : implement
2233
//
2234
String JavaDoc key = Utils.name2string(name);
2235
2236        if (elements.containsKey(key) == false) {
2237            ApplicationErrorInfoTypeImpl error_code =
2238                new ApplicationErrorInfoTypeImpl();
2239
2240            error_code.error = new UIDType(
2241                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2242                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2243
2244            error_code.details = new String JavaDoc("object with name " +
2245                key + " does not exist.");
2246
2247            throw new ApplicationError(error_code);
2248        }
2249
2250        IpProtocolMonitorDataStructure data =
2251            (IpProtocolMonitorDataStructure) elements.get(key);
2252
2253        return data.sourceIndicator;
2254    }
2255    //
2256
// IDL:itu.intt/itut_x780/ManagedObject_F/deletePolicyGet:1.0
2257
//
2258
/**
2259     ** Implementation of the ::itut_x780::ManagedObject_F::deletePolicyGet operation.
2260     **/

2261    public short
2262    deletePolicyGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
2263    throws intt.itu.itut_x780.ApplicationError
2264    {
2265        //
2266
// DONE : implement
2267
//
2268
String JavaDoc key = Utils.name2string(name);
2269
2270        if (elements.containsKey(key) == false) {
2271            ApplicationErrorInfoTypeImpl error_code =
2272                new ApplicationErrorInfoTypeImpl();
2273
2274            error_code.error = new UIDType(
2275                intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2276                intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2277
2278            error_code.details = new String JavaDoc("object with name " +
2279                key + " does not exist.");
2280
2281            throw new ApplicationError(error_code);
2282        }
2283
2284        IpProtocolMonitorDataStructure data =
2285            (IpProtocolMonitorDataStructure) elements.get(key);
2286
2287        return data.deletePolicy;
2288    }
2289    //
2290
// IDL:itu.intt/itut_x780/ManagedObject_F/destroy:1.0
2291
//
2292
/**
2293     ** Implementation of the ::itut_x780::ManagedObject_F::destroy operation.
2294     **/

2295    public void
2296    destroy(org.omg.CosNaming.NameComponent JavaDoc[] name)
2297    throws intt.itu.itut_x780.ApplicationError, intt.itu.itut_x780.DeleteError
2298    {
2299        //
2300
// DONE : implement
2301
//
2302

2303    if (!elements.containsKey(Utils.name2string(name))) {
2304
2305            ApplicationErrorInfoTypeImpl error_code =
2306            new ApplicationErrorInfoTypeImpl();
2307
2308            error_code.error = new UIDType(
2309            intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
2310            intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
2311
2312            error_code.details = new String JavaDoc ("object with name " +
2313            Utils.name2string(name) + " does not exist.");
2314
2315            throw new ApplicationError(error_code);
2316
2317    }
2318    IpProtocolMonitorDataStructure ipProtocolMonitorData = null;
2319    synchronized(elements) {
2320        ipProtocolMonitorData =
2321            (IpProtocolMonitorDataStructure) elements.remove(
2322            Utils.name2string(name));
2323    }
2324    org.omg.TimeBase.UtcT eventTime = new org.omg.TimeBase.UtcT(System.currentTimeMillis(),
2325        0, (short) 0, (short) 0);
2326    get_context().push_objectDeletion(new ObjectDeletionImpl(eventTime, name,
2327                        ipProtocolMonitorData.objectclass,
2328                        getUniqueNotificationIdentifier(),
2329// ipProtocolMonitorData.getUniqueNotificationIdentifier(),
2330
ipProtocolMonitorData.sourceIndicator,
2331                        new AttributeValueType[0]));
2332
2333        Utils.pretty_log(logSupport, Utils.name2string(name),
2334            ipProtocolMonitorData.objectclass, //objectClassGet(name),
2335
(short) LogSeverity._Info,
2336          "successfully removed from management system");
2337
2338    }
2339    // ==================================================================
2340
//
2341
// Public methods for the ::coachEmsMibComponents::CCM_IpProtocolMonitorMgmt local interface.
2342
//
2343
// ==================================================================
2344
//
2345
// IDL:coach.ist/coachEmsMibComponents/IpProtocolMonitorMgmt/facade_name:1.0
2346
//
2347
/**
2348     ** Implementation of the ::coachEmsMibComponents::IpProtocolMonitorMgmt::facade_name operation.
2349     **/

2350    public java.lang.String JavaDoc
2351    facade_name()
2352    {
2353        //
2354
// DONE : implement
2355
//
2356
return _facade_name;
2357    }
2358
2359    protected static int getUniqueNotificationIdentifier() {
2360
2361        notifId++;
2362        return notifId;
2363    }
2364
2365
2366}
2367
Popular Tags