KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ist > coach > coachEmsMibComponents > IpToMACAddressProviderComposition > IpToMACAddressProviderImpl


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

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

64 public class IpToMACAddressProviderImpl
65      extends ist.coach.coachEmsMibComponents.IpToMACAddressProviderComposition.IpToMACAddressProvider_impl
66 {
67     org.omg.CORBA.ORB JavaDoc orb = null;
68     private String JavaDoc _facade_name;
69
70     protected static Hashtable JavaDoc elements;
71     private static int notifId = 15000;
72     private BasicLog logSupport;
73
74     ist.coach.coachEmfServices.SnmpAdapter.SnmpConnector connector = null;
75
76     private static final String JavaDoc READ_COMMUNITY = SnmpIdentifiers.READ_COMMUNITY;
77     private static final String JavaDoc WRITE_COMMUNITY = SnmpIdentifiers.WRITE_COMMUNITY;
78     // ==================================================================
79
//
80
// Internal states.
81
//
82
// ==================================================================
83

84     // ==================================================================
85
//
86
// Constructors.
87
//
88
// ==================================================================
89

90     public IpToMACAddressProviderImpl()
91     {
92       elements = new Hashtable JavaDoc();
93     }
94     //
95
// IDL:omg.org/Components/EnterpriseComponent/configuration_complete:1.0
96
//
97
/**
98      ** Completes the component configuration.
99      **
100      ** @throws org.omg.Components.InvalidConfiguration
101      ** Thrown if the configuration is invalid.
102      **/

103     public void
104     configuration_complete()
105     throws org.omg.Components.InvalidConfiguration
106     {
107         //
108
// DONE : implement !!!
109
//
110

111         if ((connector = get_context().get_connection_connector()) == null)
112             throw new org.omg.Components.InvalidConfiguration();
113         if ((logSupport = get_context().get_connection_basic_log()) == null)
114             throw new org.omg.Components.InvalidConfiguration();
115
116         orb = org.objectweb.ccm.CORBA.TheORB.getORB();
117
118         System.err.println("IpToMACAddressProvider configuration completed...");
119
120     }
121     // ==================================================================
122
//
123
// Methods.
124
//
125
// ==================================================================
126

127     /**
128      * Implementation of the ::itut_x780Components::CCM_NamedComponent_Executor::facade_name attribute as accessor operation.
129      */

130     public String JavaDoc
131     facade_name()
132     {
133          //
134
// DONE : Implement
135
//
136
return _facade_name;
137     }
138
139     /**
140      * Implementation of the ::itut_x780Components::CCM_NamedComponent_Executor::facade_name attribute as mutator operation.
141      */

142     public void
143     facade_name(String JavaDoc val)
144     {
145         //
146
// DONE : implement
147
//
148
if (val != null)
149             _facade_name = new String JavaDoc(val);
150     }
151
152     /**
153      * Implementation of the ::coachEmsMib::IpToMACAddress_F::ipNetToMediaIfIndexGet operation.
154      */

155     public int
156     ipNetToMediaIfIndexGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
157     throws intt.itu.itut_x780.ApplicationError
158     {
159         //
160
// DONE : Implement
161
//
162

163         String JavaDoc key = Utils.name2string(name);
164
165         if (elements.containsKey(key) == false) {
166             ApplicationErrorInfoTypeImpl error_code =
167                 new ApplicationErrorInfoTypeImpl();
168
169             error_code.error = new UIDType(
170                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
171                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
172
173             error_code.details = new String JavaDoc("object with name " +
174                 key + " does not exist.");
175
176             throw new ApplicationError(error_code);
177         }
178
179         IpToMACAddressDataStructure data =
180             (IpToMACAddressDataStructure) elements.get(key);
181
182
183         return data.getipNetToMediaIfIndex();
184     }
185
186     /**
187      * Implementation of the ::coachEmsMib::IpToMACAddress_F::ipNetToMediaIfIndexSet operation.
188      */

189     public void
190     ipNetToMediaIfIndexSet(org.omg.CosNaming.NameComponent JavaDoc[] name, int ipNetToMediaIfIndex)
191     throws intt.itu.itut_x780.ApplicationError,
192
193            ist.coach.coachEmsMib.NOipToMACAddressSetPackageException
194     {
195         //
196
// TODO : Implement
197
//
198
}
199
200     /**
201      * Implementation of the ::coachEmsMib::IpToMACAddress_F::ipNetToMediaPhysAddressGet operation.
202      */

203     public byte[]
204     ipNetToMediaPhysAddressGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
205     throws intt.itu.itut_x780.ApplicationError
206     {
207         String JavaDoc key = Utils.name2string(name);
208
209         if (elements.containsKey(key) == false) {
210             ApplicationErrorInfoTypeImpl error_code =
211                 new ApplicationErrorInfoTypeImpl();
212
213             error_code.error = new UIDType(
214                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
215                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
216
217             error_code.details = new String JavaDoc("object with name " +
218                 key + " does not exist.");
219
220             throw new ApplicationError(error_code);
221         }
222
223         IpToMACAddressDataStructure data =
224             (IpToMACAddressDataStructure) elements.get(key);
225
226
227         String JavaDoc mediaIfIndex = String.valueOf(data.getipNetToMediaIfIndex());
228         String JavaDoc mediaNetAddress = new String JavaDoc(data.getipNetToMediaNetAddress());
229
230         String JavaDoc attributeOID = SnmpIdentifiers.IP_NETTOMEDIAPHYSADDRESS_OID + "." +
231                               mediaIfIndex + "." + mediaNetAddress;
232         DataType attributeData = null;
233
234         try {
235             attributeData = connector.get(
236                 attributeOID,
237                 new String JavaDoc (data.getMgmtIpAddress()),
238                 data.getSnmpPort(),
239                 SnmpIdentifiers.READ_COMMUNITY);
240         }
241         catch (SnmpApplicationError e) {
242
243             ApplicationErrorInfoTypeImpl error_code =
244                 new ApplicationErrorInfoTypeImpl();
245
246             error_code.error = new UIDType(
247                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
248                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
249
250             if (e.reason.equals(ExceptionMessages.agent_response_error))
251                 error_code.details = ExceptionMessages.agent_response_error;
252             else
253                 error_code.details = new String JavaDoc ("Could not retrieve attribute " +
254                     "for IpToMACAddress Object with name " + key + ":" +
255                     "\n Object with Snmp Object Identifier " + attributeOID +
256                                 " does not exist.");
257
258             Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
259               (short) LogSeverity._Error,
260               "SNMP Error getting ipNetToMediaPhysAddress: " + e.reason);
261             throw new ApplicationError (error_code);
262         }
263
264         org.omg.CORBA.Any JavaDoc value = attributeData.value;
265
266
267         if (value.type().kind().value() != org.omg.CORBA.OctetSeqHelper.type().kind().value()) {
268             ApplicationErrorInfoTypeImpl error_code =
269                 new ApplicationErrorInfoTypeImpl();
270
271             error_code.error = new UIDType(
272                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
273                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
274
275             error_code.details = new String JavaDoc ("IpToMACAddress> Could not retrieve attribute " +
276                 "for IpToMACAddress Object with name " + key + ":" +
277                 "\n Object with Snmp Object Identifier " + attributeOID +
278                 " is not of expected type.");
279
280             throw new ApplicationError (error_code);
281
282         }
283
284         byte[] attribute_value = org.omg.CORBA.OctetSeqHelper.extract(value);
285         return attribute_value;
286     }
287
288     /**
289      * Implementation of the ::coachEmsMib::IpToMACAddress_F::ipNetToMediaPhysAddressSet operation.
290      */

291     public void
292     ipNetToMediaPhysAddressSet(org.omg.CosNaming.NameComponent JavaDoc[] name, byte[] ipNetToMediaPhysAddress)
293     throws intt.itu.itut_x780.ApplicationError,
294
295            ist.coach.coachEmsMib.NOipToMACAddressSetPackageException
296     {
297
298     }
299
300     /**
301      * Implementation of the ::coachEmsMib::IpToMACAddress_F::ipNetToMediaNetAddressGet operation.
302      */

303     public byte[]
304     ipNetToMediaNetAddressGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
305     throws intt.itu.itut_x780.ApplicationError
306     {
307        //
308
// DONE : Implement
309
//
310

311         String JavaDoc key = Utils.name2string(name);
312
313         if (elements.containsKey(key) == false) {
314             ApplicationErrorInfoTypeImpl error_code =
315                 new ApplicationErrorInfoTypeImpl();
316
317             error_code.error = new UIDType(
318                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
319                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
320
321             error_code.details = new String JavaDoc("object with name " +
322                 key + " does not exist.");
323
324             throw new ApplicationError(error_code);
325         }
326
327         IpToMACAddressDataStructure data =
328             (IpToMACAddressDataStructure) elements.get(key);
329
330
331         return data.getipNetToMediaNetAddress();
332     }
333
334     /**
335      * Implementation of the ::coachEmsMib::IpToMACAddress_F::ipNetToMediaNetAddressSet operation.
336      */

337     public void
338     ipNetToMediaNetAddressSet(org.omg.CosNaming.NameComponent JavaDoc[] name, byte[] ipNetToMediaNetAddress)
339     throws intt.itu.itut_x780.ApplicationError,
340
341            ist.coach.coachEmsMib.NOipToMACAddressSetPackageException
342     {
343         //
344
// TODO : Implement
345
//
346
}
347
348     /**
349      * Implementation of the ::coachEmsMib::IpToMACAddress_F::ipNetToMediaTypeGet operation.
350      */

351     public int
352     ipNetToMediaTypeGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
353     throws intt.itu.itut_x780.ApplicationError
354     {
355
356         String JavaDoc key = Utils.name2string(name);
357
358         if (elements.containsKey(key) == false) {
359             ApplicationErrorInfoTypeImpl error_code =
360                 new ApplicationErrorInfoTypeImpl();
361
362             error_code.error = new UIDType(
363                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
364                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
365
366             error_code.details = new String JavaDoc("object with name " +
367                 key + " does not exist.");
368
369             throw new ApplicationError(error_code);
370         }
371
372         IpToMACAddressDataStructure data =
373             (IpToMACAddressDataStructure) elements.get(key);
374
375
376         String JavaDoc mediaIfIndex = String.valueOf(data.getipNetToMediaIfIndex());
377         String JavaDoc mediaNetAddress = new String JavaDoc(data.getipNetToMediaNetAddress());
378
379         String JavaDoc attributeOID = SnmpIdentifiers.IP_NETTOMEDIATYPE_OID + "." +
380                               mediaIfIndex + "." + mediaNetAddress;
381         DataType attributeData = null;
382
383         try {
384             attributeData = connector.get(
385
386                 attributeOID,
387                 new String JavaDoc (data.getMgmtIpAddress()),
388                 data.getSnmpPort(),
389                 SnmpIdentifiers.READ_COMMUNITY);
390         }
391         catch (SnmpApplicationError e) {
392
393             ApplicationErrorInfoTypeImpl error_code =
394                 new ApplicationErrorInfoTypeImpl();
395
396             error_code.error = new UIDType(
397                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
398                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
399
400             if (e.reason.equals(ExceptionMessages.agent_response_error))
401                 error_code.details = ExceptionMessages.agent_response_error;
402             else
403                 error_code.details = new String JavaDoc ("Could not retrieve attribute " +
404                     "for IpToMACAddress Object with name " + key + ":" +
405                     "\n Object with Snmp Object Identifier " + attributeOID +
406                     " does not exist.");
407
408             Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
409               (short) LogSeverity._Error,
410               "SNMP Error getting ipNetToMediaType: " + e.reason);
411             throw new ApplicationError (error_code);
412         }
413
414         org.omg.CORBA.Any JavaDoc value = attributeData.value;
415
416
417         if (value.type().kind().value() != TCKind._tk_long) {
418             ApplicationErrorInfoTypeImpl error_code =
419                 new ApplicationErrorInfoTypeImpl();
420
421             error_code.error = new UIDType(
422                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
423                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
424
425             error_code.details = new String JavaDoc ("IpToMACAddress> Could not retrieve attribute " +
426                 "for IpToMACAddress Object with name " + key + ":" +
427                 "\n Object with Snmp Object Identifier " + attributeOID +
428                 " is not of expected type.");
429             /***if (value.type().kind().value() == TCKind._tk_string) {
430                 System.err.println("attribute = " +value.extract_string());
431                 return -1;
432             }
433             else
434             ******/

435             throw new ApplicationError (error_code);
436
437         }
438
439         int attribute_value = value.extract_long();
440         return attribute_value;
441     }
442
443     /**
444      * Implementation of the ::coachEmsMib::IpToMACAddress_F::ipNetToMediaTypeSet operation.
445      */

446     public void
447     ipNetToMediaTypeSet(org.omg.CosNaming.NameComponent JavaDoc[] name, int ipNetToMediaType)
448     throws intt.itu.itut_x780.ApplicationError,
449
450            ist.coach.coachEmsMib.NOipToMACAddressSetPackageException
451     {
452         //
453
// TODO : Implement
454
//
455
}
456
457     /**
458      * Implementation of the ::itut_x780::ManagedObject_F::nameGet operation.
459      */

460     public org.omg.CosNaming.NameComponent JavaDoc[]
461     nameGet()
462     {
463         return Utils.string2name(_facade_name);
464     }
465
466     /**
467      * Implementation of the ::itut_x780::ManagedObject_F::objectClassGet operation.
468      */

469     public String JavaDoc
470     objectClassGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
471     throws intt.itu.itut_x780.ApplicationError
472     {
473          //
474
// DONE : implement
475
//
476
String JavaDoc key = Utils.name2string(name);
477
478         if (elements.containsKey(key) == false) {
479             ApplicationErrorInfoTypeImpl error_code =
480                 new ApplicationErrorInfoTypeImpl();
481
482             error_code.error = new UIDType(
483                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
484                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
485
486             error_code.details = new String JavaDoc("object with name " +
487                 key + " does not exist.");
488
489             throw new ApplicationError(error_code);
490         }
491
492         IpToMACAddressDataStructure data =
493             (IpToMACAddressDataStructure) elements.get(key);
494
495         return data.getObjectClass();
496     }
497
498     /**
499      * Implementation of the ::itut_x780::ManagedObject_F::attributesGet operation.
500      */

501     public intt.itu.itut_x780.ManagedObjectValueType
502     attributesGet(org.omg.CosNaming.NameComponent JavaDoc[] name, intt.itu.itut_x780.StringSetTypeHolder attributeNames)
503     throws intt.itu.itut_x780.ApplicationError
504     {
505       //
506
// DONE : implement
507
//
508
String JavaDoc key = Utils.name2string(name);
509
510         if (elements.containsKey(key) == false) {
511             ApplicationErrorInfoTypeImpl error_code =
512                 new ApplicationErrorInfoTypeImpl();
513
514             error_code.error = new UIDType(
515                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
516                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
517
518             error_code.details = new String JavaDoc("object with name " +
519                 key + " does not exist.");
520
521             throw new ApplicationError(error_code);
522         }
523         IpToMACAddressDataStructure data =
524             (IpToMACAddressDataStructure) elements.get(key);
525
526             IpToMACAddressValueTypeImpl ipToMACAddressValueType = new IpToMACAddressValueTypeImpl(
527                 ipNetToMediaIfIndexGet(name),
528                 ipNetToMediaPhysAddressGet(name),
529                 ipNetToMediaNetAddressGet(name),
530                 ipNetToMediaTypeGet(name),
531                 data.getName(),
532                 data.getObjectClass(),
533                 data.getPackages(),
534                 data.getSourceIndicator(),
535                 data.getDeletePolicy()
536             );
537
538       Utils.pretty_log(logSupport, Utils.name2string(name), objectClassGet(name),
539             (short) LogSeverity._Info,
540             "attributesGet finished successfully");
541       return ipToMACAddressValueType;
542     }
543
544     /**
545      * Implementation of the ::itut_x780::ManagedObject_F::packagesGet operation.
546      */

547     public String JavaDoc[]
548     packagesGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
549     throws intt.itu.itut_x780.ApplicationError
550     {
551         //
552
// DONE : implement
553
//
554
String JavaDoc key = Utils.name2string(name);
555
556         if (elements.containsKey(key) == false) {
557             ApplicationErrorInfoTypeImpl error_code =
558                 new ApplicationErrorInfoTypeImpl();
559
560             error_code.error = new UIDType(
561                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
562                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
563
564             error_code.details = new String JavaDoc("object with name " +
565                 key + " does not exist.");
566
567             throw new ApplicationError(error_code);
568         }
569
570         IpToMACAddressDataStructure data =
571             (IpToMACAddressDataStructure) elements.get(key);
572
573         return data.getPackages();
574     }
575
576     /**
577      * Implementation of the ::itut_x780::ManagedObject_F::creationSourceGet operation.
578      */

579     public intt.itu.itut_x780.SourceIndicatorType
580     creationSourceGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
581     throws intt.itu.itut_x780.ApplicationError
582     {
583       String JavaDoc key = Utils.name2string(name);
584
585         if (elements.containsKey(key) == false) {
586             ApplicationErrorInfoTypeImpl error_code =
587                 new ApplicationErrorInfoTypeImpl();
588
589             error_code.error = new UIDType(
590                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
591                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
592
593             error_code.details = new String JavaDoc("object with name " +
594                 key + " does not exist.");
595
596             throw new ApplicationError(error_code);
597         }
598
599         IpToMACAddressDataStructure data =
600             (IpToMACAddressDataStructure) elements.get(key);
601
602         return data.sourceIndicator;
603     }
604
605     /**
606      * Implementation of the ::itut_x780::ManagedObject_F::deletePolicyGet operation.
607      */

608     public short
609     deletePolicyGet(org.omg.CosNaming.NameComponent JavaDoc[] name)
610     throws intt.itu.itut_x780.ApplicationError
611     {
612         String JavaDoc key = Utils.name2string(name);
613
614         if (elements.containsKey(key) == false) {
615             ApplicationErrorInfoTypeImpl error_code =
616                 new ApplicationErrorInfoTypeImpl();
617
618             error_code.error = new UIDType(
619                 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
620                 intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
621
622             error_code.details = new String JavaDoc("object with name " +
623                 key + " does not exist.");
624
625             throw new ApplicationError(error_code);
626         }
627
628         IpToMACAddressDataStructure data =
629             (IpToMACAddressDataStructure) elements.get(key);
630
631         return data.deletePolicy;
632     }
633
634     /**
635      * Implementation of the ::itut_x780::ManagedObject_F::destroy operation.
636      */

637     public void
638     destroy(org.omg.CosNaming.NameComponent JavaDoc[] name)
639     throws intt.itu.itut_x780.ApplicationError,
640
641            intt.itu.itut_x780.DeleteError
642     {
643         if (!elements.containsKey(Utils.name2string(name))) {
644
645             ApplicationErrorInfoTypeImpl error_code =
646             new ApplicationErrorInfoTypeImpl();
647
648             error_code.error = new UIDType(
649             intt.itu.itut_x780.ApplicationErrorConst.moduleName.value,
650             intt.itu.itut_x780.ApplicationErrorConst.invalidParameter.value);
651
652             error_code.details = new String JavaDoc ("object with name " +
653             Utils.name2string(name) + " does not exist.");
654             throw new ApplicationError(error_code);
655
656       }
657
658       IpToMACAddressDataStructure ipToMACAddress = null;
659       synchronized(elements) {
660         ipToMACAddress =
661             (IpToMACAddressDataStructure) elements.remove(
662                 Utils.name2string(name));
663         }
664       org.omg.TimeBase.UtcT eventTime = new org.omg.TimeBase.UtcT(System.currentTimeMillis(),
665           0, (short) 0, (short) 0);
666       get_context().push_objectDeletion(new ObjectDeletionImpl(eventTime,
667                         name,
668                         ipToMACAddress.getObjectClass(),
669                         getUniqueNotificationIdentifier(),
670                         ipToMACAddress.sourceIndicator,
671                         new AttributeValueType[0]));
672
673       Utils.pretty_log(logSupport, Utils.name2string(name),
674                 ipToMACAddress.objectclass, //objectClassGet(name),
675
(short) LogSeverity._Info,
676           "successfully removed from management system");
677     }
678
679
680     public static int getUniqueNotificationIdentifier() {
681
682         notifId++;
683
684         return (notifId);
685    }
686
687 }
688
Popular Tags