001: /*
002: * Generated by Cougaar QoS FrameGen
003: * from c:\marla\mmon\cougaar\HEAD\qos\src\org\cougaar\core\qos\frame\topology\cougaar-topology-protos.xml
004: * at Mar 14, 2007 4:18:10 PM
005: *
006: * Copyright BBN Technologies 2006
007: *
008: */
009: package org.cougaar.core.qos.frame.topology;
010:
011: import org.cougaar.core.qos.frame.DataFrame;
012: import org.cougaar.core.qos.frame.FrameSet;
013: import org.cougaar.core.qos.frame.SlotDescription;
014: import org.cougaar.core.util.UID;
015:
016: public class MsgIndicator extends Indicator {
017: static {
018: org.cougaar.core.qos.frame.FrameMaker __fm = new org.cougaar.core.qos.frame.FrameMaker() {
019: public DataFrame makeFrame(FrameSet frameSet, UID uid) {
020: return new MsgIndicator(frameSet, uid);
021: }
022: };
023: DataFrame.registerFrameMaker(
024: "org.cougaar.core.qos.frame.topology", "msgIndicator",
025: __fm);
026: }
027: private double calmThreshold;
028: private double idleThreshold;
029: private double normalThreshold;
030: private double franticThreshold;
031: private double busyThreshold;
032:
033: public MsgIndicator(UID uid) {
034: this (null, uid);
035: }
036:
037: public MsgIndicator(FrameSet frameSet, UID uid) {
038: super (frameSet, uid);
039: initializeCalmThreshold(1.0);
040: initializeIdleThreshold(0.0);
041: initializeNormalThreshold(10.0);
042: initializeFranticThreshold(1000.0);
043: initializeBusyThreshold(100.0);
044: }
045:
046: public String getKind() {
047: return "msgIndicator";
048: }
049:
050: protected void collectSlotValues(java.util.Properties __props) {
051: super .collectSlotValues(__props);
052: Object __value;
053: __value = getCalmThreshold__AsObject();
054: __props.put("calmThreshold", __value != null ? __value : NIL);
055: __value = getIdleThreshold__AsObject();
056: __props.put("idleThreshold", __value != null ? __value : NIL);
057: __value = getNormalThreshold__AsObject();
058: __props.put("normalThreshold", __value != null ? __value : NIL);
059: __value = getFranticThreshold__AsObject();
060: __props
061: .put("franticThreshold", __value != null ? __value
062: : NIL);
063: __value = getBusyThreshold__AsObject();
064: __props.put("busyThreshold", __value != null ? __value : NIL);
065: }
066:
067: public double getCalmThreshold() {
068: return calmThreshold;
069: }
070:
071: double getCalmThreshold__NoWarn() {
072: return calmThreshold;
073: }
074:
075: Object getCalmThreshold__AsObject() {
076: return new Double(calmThreshold);
077: }
078:
079: public void setCalmThreshold(double __new_value) {
080: double __old_value = calmThreshold;
081: this .calmThreshold = __new_value;
082: slotModified("calmThreshold", new Double(__old_value),
083: new Double(__new_value), true, true);
084: }
085:
086: public void setCalmThreshold__AsObject(Object __new_value) {
087: Object __old_value = getCalmThreshold__AsObject();
088: this .calmThreshold = force_double(__new_value);
089: slotModified("calmThreshold", __old_value, __new_value, true,
090: true);
091: }
092:
093: protected void initializeCalmThreshold(double new_value) {
094: this .calmThreshold = new_value;
095: slotInitialized("calmThreshold", new Double(new_value));
096: }
097:
098: void initializeCalmThreshold__AsObject(Object new_value) {
099: this .calmThreshold = force_double(new_value);
100: slotInitialized("calmThreshold", new_value);
101: }
102:
103: public double getIdleThreshold() {
104: return idleThreshold;
105: }
106:
107: double getIdleThreshold__NoWarn() {
108: return idleThreshold;
109: }
110:
111: Object getIdleThreshold__AsObject() {
112: return new Double(idleThreshold);
113: }
114:
115: public void setIdleThreshold(double __new_value) {
116: double __old_value = idleThreshold;
117: this .idleThreshold = __new_value;
118: slotModified("idleThreshold", new Double(__old_value),
119: new Double(__new_value), true, true);
120: }
121:
122: public void setIdleThreshold__AsObject(Object __new_value) {
123: Object __old_value = getIdleThreshold__AsObject();
124: this .idleThreshold = force_double(__new_value);
125: slotModified("idleThreshold", __old_value, __new_value, true,
126: true);
127: }
128:
129: protected void initializeIdleThreshold(double new_value) {
130: this .idleThreshold = new_value;
131: slotInitialized("idleThreshold", new Double(new_value));
132: }
133:
134: void initializeIdleThreshold__AsObject(Object new_value) {
135: this .idleThreshold = force_double(new_value);
136: slotInitialized("idleThreshold", new_value);
137: }
138:
139: public double getNormalThreshold() {
140: return normalThreshold;
141: }
142:
143: double getNormalThreshold__NoWarn() {
144: return normalThreshold;
145: }
146:
147: Object getNormalThreshold__AsObject() {
148: return new Double(normalThreshold);
149: }
150:
151: public void setNormalThreshold(double __new_value) {
152: double __old_value = normalThreshold;
153: this .normalThreshold = __new_value;
154: slotModified("normalThreshold", new Double(__old_value),
155: new Double(__new_value), true, true);
156: }
157:
158: public void setNormalThreshold__AsObject(Object __new_value) {
159: Object __old_value = getNormalThreshold__AsObject();
160: this .normalThreshold = force_double(__new_value);
161: slotModified("normalThreshold", __old_value, __new_value, true,
162: true);
163: }
164:
165: protected void initializeNormalThreshold(double new_value) {
166: this .normalThreshold = new_value;
167: slotInitialized("normalThreshold", new Double(new_value));
168: }
169:
170: void initializeNormalThreshold__AsObject(Object new_value) {
171: this .normalThreshold = force_double(new_value);
172: slotInitialized("normalThreshold", new_value);
173: }
174:
175: public double getFranticThreshold() {
176: return franticThreshold;
177: }
178:
179: double getFranticThreshold__NoWarn() {
180: return franticThreshold;
181: }
182:
183: Object getFranticThreshold__AsObject() {
184: return new Double(franticThreshold);
185: }
186:
187: public void setFranticThreshold(double __new_value) {
188: double __old_value = franticThreshold;
189: this .franticThreshold = __new_value;
190: slotModified("franticThreshold", new Double(__old_value),
191: new Double(__new_value), true, true);
192: }
193:
194: public void setFranticThreshold__AsObject(Object __new_value) {
195: Object __old_value = getFranticThreshold__AsObject();
196: this .franticThreshold = force_double(__new_value);
197: slotModified("franticThreshold", __old_value, __new_value,
198: true, true);
199: }
200:
201: protected void initializeFranticThreshold(double new_value) {
202: this .franticThreshold = new_value;
203: slotInitialized("franticThreshold", new Double(new_value));
204: }
205:
206: void initializeFranticThreshold__AsObject(Object new_value) {
207: this .franticThreshold = force_double(new_value);
208: slotInitialized("franticThreshold", new_value);
209: }
210:
211: public double getBusyThreshold() {
212: return busyThreshold;
213: }
214:
215: double getBusyThreshold__NoWarn() {
216: return busyThreshold;
217: }
218:
219: Object getBusyThreshold__AsObject() {
220: return new Double(busyThreshold);
221: }
222:
223: public void setBusyThreshold(double __new_value) {
224: double __old_value = busyThreshold;
225: this .busyThreshold = __new_value;
226: slotModified("busyThreshold", new Double(__old_value),
227: new Double(__new_value), true, true);
228: }
229:
230: public void setBusyThreshold__AsObject(Object __new_value) {
231: Object __old_value = getBusyThreshold__AsObject();
232: this .busyThreshold = force_double(__new_value);
233: slotModified("busyThreshold", __old_value, __new_value, true,
234: true);
235: }
236:
237: protected void initializeBusyThreshold(double new_value) {
238: this .busyThreshold = new_value;
239: slotInitialized("busyThreshold", new Double(new_value));
240: }
241:
242: void initializeBusyThreshold__AsObject(Object new_value) {
243: this .busyThreshold = force_double(new_value);
244: slotInitialized("busyThreshold", new_value);
245: }
246:
247: protected Object getLocalValue(String __slot) {
248: String __key = __slot.intern();
249: if ("calmThreshold" == __key)
250: return getCalmThreshold__AsObject();
251: else if ("idleThreshold" == __key)
252: return getIdleThreshold__AsObject();
253: else if ("normalThreshold" == __key)
254: return getNormalThreshold__AsObject();
255: else if ("franticThreshold" == __key)
256: return getFranticThreshold__AsObject();
257: else if ("busyThreshold" == __key)
258: return getBusyThreshold__AsObject();
259: else
260: return super .getLocalValue(__slot);
261: }
262:
263: protected void setLocalValue(String __slot, Object __value) {
264: String __key = __slot.intern();
265: if ("calmThreshold" == __key)
266: setCalmThreshold__AsObject(__value);
267: else if ("idleThreshold" == __key)
268: setIdleThreshold__AsObject(__value);
269: else if ("normalThreshold" == __key)
270: setNormalThreshold__AsObject(__value);
271: else if ("franticThreshold" == __key)
272: setFranticThreshold__AsObject(__value);
273: else if ("busyThreshold" == __key)
274: setBusyThreshold__AsObject(__value);
275: else
276: super .setLocalValue(__slot, __value);
277: }
278:
279: protected void initializeLocalValue(String __slot, Object __value) {
280: String __key = __slot.intern();
281: if ("calmThreshold" == __key)
282: initializeCalmThreshold__AsObject(__value);
283: else if ("idleThreshold" == __key)
284: initializeIdleThreshold__AsObject(__value);
285: else if ("normalThreshold" == __key)
286: initializeNormalThreshold__AsObject(__value);
287: else if ("franticThreshold" == __key)
288: initializeFranticThreshold__AsObject(__value);
289: else if ("busyThreshold" == __key)
290: initializeBusyThreshold__AsObject(__value);
291: else
292: super .initializeLocalValue(__slot, __value);
293: }
294:
295: protected void collectSlotNames(java.util.Set<String> slots) {
296: super .collectSlotNames(slots);
297: slots.add("calmThreshold");
298: slots.add("idleThreshold");
299: slots.add("normalThreshold");
300: slots.add("franticThreshold");
301: slots.add("busyThreshold");
302: }
303:
304: public SlotDescription slotMetaData__CalmThreshold() {
305: SlotDescription __desc = new SlotDescription();
306: __desc.name = "calmThreshold";
307: __desc.prototype = "msgIndicator";
308: __desc.is_writable = true;
309: Object __value;
310: __value = new Double(calmThreshold);
311: if (__value != null) {
312: __desc.is_overridden = true;
313: __desc.value = __value;
314: } else {
315: __desc.is_overridden = false;
316: __desc.value = new Double(1.0);
317: }
318: return __desc;
319: }
320:
321: public SlotDescription slotMetaData__IdleThreshold() {
322: SlotDescription __desc = new SlotDescription();
323: __desc.name = "idleThreshold";
324: __desc.prototype = "msgIndicator";
325: __desc.is_writable = true;
326: Object __value;
327: __value = new Double(idleThreshold);
328: if (__value != null) {
329: __desc.is_overridden = true;
330: __desc.value = __value;
331: } else {
332: __desc.is_overridden = false;
333: __desc.value = new Double(0.0);
334: }
335: return __desc;
336: }
337:
338: public SlotDescription slotMetaData__NormalThreshold() {
339: SlotDescription __desc = new SlotDescription();
340: __desc.name = "normalThreshold";
341: __desc.prototype = "msgIndicator";
342: __desc.is_writable = true;
343: Object __value;
344: __value = new Double(normalThreshold);
345: if (__value != null) {
346: __desc.is_overridden = true;
347: __desc.value = __value;
348: } else {
349: __desc.is_overridden = false;
350: __desc.value = new Double(10.0);
351: }
352: return __desc;
353: }
354:
355: public SlotDescription slotMetaData__FranticThreshold() {
356: SlotDescription __desc = new SlotDescription();
357: __desc.name = "franticThreshold";
358: __desc.prototype = "msgIndicator";
359: __desc.is_writable = true;
360: Object __value;
361: __value = new Double(franticThreshold);
362: if (__value != null) {
363: __desc.is_overridden = true;
364: __desc.value = __value;
365: } else {
366: __desc.is_overridden = false;
367: __desc.value = new Double(1000.0);
368: }
369: return __desc;
370: }
371:
372: public SlotDescription slotMetaData__BusyThreshold() {
373: SlotDescription __desc = new SlotDescription();
374: __desc.name = "busyThreshold";
375: __desc.prototype = "msgIndicator";
376: __desc.is_writable = true;
377: Object __value;
378: __value = new Double(busyThreshold);
379: if (__value != null) {
380: __desc.is_overridden = true;
381: __desc.value = __value;
382: } else {
383: __desc.is_overridden = false;
384: __desc.value = new Double(100.0);
385: }
386: return __desc;
387: }
388:
389: protected void collectSlotDescriptions(
390: java.util.Map<String, SlotDescription> map) {
391: super .collectSlotDescriptions(map);
392: map.put("calmThreshold", slotMetaData__CalmThreshold());
393: map.put("idleThreshold", slotMetaData__IdleThreshold());
394: map.put("normalThreshold", slotMetaData__NormalThreshold());
395: map.put("franticThreshold", slotMetaData__FranticThreshold());
396: map.put("busyThreshold", slotMetaData__BusyThreshold());
397: }
398: }
|