1 28 29 package ist.coach.coachEmsMibComponents.IpAddressDataProviderComposition; 30 31 import intt.itu.itut_x780.UIDType; 32 import intt.itu.itut_x780.ApplicationError; 33 34 import ist.coach.coachEmfCommon.Utils; 35 import ist.coach.coachEmfCommon.ObjectCreationImpl; 36 37 import intt.itu.itut_x780.AttributeValueType; 38 import ist.coach.coachEmfCommon.ExceptionMessages; 39 import ist.coach.coachEmfCommon.CreateErrorInfoTypeImpl; 40 41 import org.omg.CosNaming.NameComponent ; 42 43 44 45 import java.util.Hashtable ; 46 52 public class mgmtSegImpl 53 extends ist.coach.coachEmsMibComponents.IpAddressDataProviderComposition.mgmtSeg 54 { 55 61 67 public mgmtSegImpl() 68 { 69 } 70 71 77 80 public void 81 create(org.omg.CosNaming.NameComponent [] name, 82 String objectClass, 83 String [] packages, 84 short deletePolicy, 85 intt.itu.itut_x780.SourceIndicatorType sourceIndicator, 86 org.omg.CosNaming.NameComponent [] superior, 87 byte[] ipAdEntAddress, 88 byte[] mgmtIpAddress, 89 int supportedSnmpVersions, 90 int snmpPort) 91 throws intt.itu.itut_x780.ApplicationError, 92 93 intt.itu.itut_x780.CreateError 94 { 95 if (IpAddressDataProviderImpl.elements.containsKey(Utils.name2string(name))) { 99 100 CreateErrorInfoTypeImpl errorCode = 101 new CreateErrorInfoTypeImpl(); 102 103 errorCode.error = new UIDType( 104 intt.itu.itut_x780.CreateErrorConst.moduleName.value, 105 intt.itu.itut_x780.CreateErrorConst.duplicateName.value); 106 107 errorCode.details = new String (Utils.name2string(name) + 108 " object already exists."); 109 throw new intt.itu.itut_x780.CreateError(errorCode); 110 } 111 112 IpAddressDataStructure ipAddressData = 113 new IpAddressDataStructure( 114 name, 115 objectClass, 116 packages, 117 sourceIndicator, 118 deletePolicy, 119 new String (ipAdEntAddress), 120 new String (mgmtIpAddress), 121 snmpPort, 122 supportedSnmpVersions); 123 124 synchronized(IpAddressDataProviderImpl.elements) { 125 IpAddressDataProviderImpl.elements.put(Utils.name2string(name), ipAddressData); 126 } 127 org.omg.TimeBase.UtcT eventTime = new org.omg.TimeBase.UtcT (System.currentTimeMillis(), 128 0, (short) 0, (short) 0); 129 get_context().push_objectCreation(new ObjectCreationImpl(eventTime, 130 name, 131 objectClass, 132 IpAddressDataProviderImpl.getUniqueNotificationIdentifier(), 133 sourceIndicator, 134 new AttributeValueType[0])); 135 136 } 137 138 141 public String 142 facade_name() 143 { 144 return get_main_segment().facade_name(); 148 } 149 150 } 151 | Popular Tags |