1 28 29 package ist.coach.coachEmsMibComponents.IpRoutingEntryProviderComposition; 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 import java.util.Hashtable ; 44 50 public class mgmtSegImpl 51 extends ist.coach.coachEmsMibComponents.IpRoutingEntryProviderComposition.mgmtSeg 52 { 53 59 65 public mgmtSegImpl() 66 { 67 } 68 69 75 78 public void 79 create(org.omg.CosNaming.NameComponent [] name, 80 String objectClass, 81 String [] packages, 82 short deletePolicy, 83 intt.itu.itut_x780.SourceIndicatorType sourceIndicator, 84 org.omg.CosNaming.NameComponent [] superior, 85 byte[] ipRouteDest, 86 byte[] mgmtIpAddress, 87 int supportedSnmpVersions, 88 int snmpPort) 89 throws intt.itu.itut_x780.ApplicationError, 90 91 intt.itu.itut_x780.CreateError 92 { 93 if (IpRoutingEntryProviderImpl.elements.containsKey(Utils.name2string(name))) { 94 95 CreateErrorInfoTypeImpl errorCode = 96 new CreateErrorInfoTypeImpl(); 97 98 errorCode.error = new UIDType( 99 intt.itu.itut_x780.CreateErrorConst.moduleName.value, 100 intt.itu.itut_x780.CreateErrorConst.duplicateName.value); 101 102 errorCode.details = new String (Utils.name2string(name) + 103 " object already exists."); 104 throw new intt.itu.itut_x780.CreateError(errorCode); 105 } 106 107 IpRoutingEntryStructure ipRoutingEntry = 108 new IpRoutingEntryStructure( 109 name, 110 objectClass, 111 packages, 112 sourceIndicator, 113 deletePolicy, 114 new String (ipRouteDest), 115 new String (mgmtIpAddress), 116 snmpPort, 117 supportedSnmpVersions); 118 119 synchronized(IpRoutingEntryProviderImpl.elements) { 120 IpRoutingEntryProviderImpl.elements.put(Utils.name2string(name), ipRoutingEntry); 121 } 122 org.omg.TimeBase.UtcT eventTime = new org.omg.TimeBase.UtcT (System.currentTimeMillis(), 123 0, (short) 0, (short) 0); 124 get_context().push_objectCreation(new ObjectCreationImpl(eventTime, 125 name, 126 objectClass, 127 IpRoutingEntryProviderImpl.getUniqueNotificationIdentifier(), 128 sourceIndicator, 129 new AttributeValueType[0])); 130 } 131 132 135 public String 136 facade_name() 137 { 138 return get_main_segment().facade_name(); 142 } 143 144 } 145 | Popular Tags |