001: package org.cougaar.qos.ResourceStatus;
002:
003: /**
004: * org/cougaar/qos/ResourceStatus/ResourceStatusServicePOA.java .
005: * Generated by the IDL-to-Java compiler (portable), version "3.2"
006: * from qrs.idl
007: * Tuesday, August 7, 2007 11:57:30 AM EDT
008: */
009:
010: // syntactic problem with the argument.
011: public abstract class ResourceStatusServicePOA extends
012: org.omg.PortableServer.Servant implements
013: org.cougaar.qos.ResourceStatus.ResourceStatusServiceOperations,
014: org.omg.CORBA.portable.InvokeHandler {
015:
016: // Constructors
017:
018: private static java.util.Hashtable _methods = new java.util.Hashtable();
019: static {
020: _methods.put("query", new java.lang.Integer(0));
021: _methods.put("query_s", new java.lang.Integer(1));
022: _methods.put("blockingQuery", new java.lang.Integer(2));
023: _methods.put("blockingQuery_s", new java.lang.Integer(3));
024: _methods.put("unqualifiedSubscribe", new java.lang.Integer(4));
025: _methods
026: .put("unqualifiedSubscribe_s", new java.lang.Integer(5));
027: _methods.put("qualifiedSubscribe", new java.lang.Integer(6));
028: _methods.put("qualifiedSubscribe_s", new java.lang.Integer(7));
029: _methods.put("unsubscribe", new java.lang.Integer(8));
030: _methods.put("unsubscribe_s", new java.lang.Integer(9));
031: _methods.put("getQualifierFactory", new java.lang.Integer(10));
032: _methods.put("invoke", new java.lang.Integer(11));
033: _methods.put("invoke_s", new java.lang.Integer(12));
034: _methods.put("pushString", new java.lang.Integer(13));
035: _methods.put("pushLong", new java.lang.Integer(14));
036: _methods.put("addDependency", new java.lang.Integer(15));
037: }
038:
039: public org.omg.CORBA.portable.OutputStream _invoke(String $method,
040: org.omg.CORBA.portable.InputStream in,
041: org.omg.CORBA.portable.ResponseHandler $rh) {
042: org.omg.CORBA.portable.OutputStream out = null;
043: java.lang.Integer __method = (java.lang.Integer) _methods
044: .get($method);
045: if (__method == null)
046: throw new org.omg.CORBA.BAD_OPERATION(0,
047: org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
048:
049: switch (__method.intValue()) {
050:
051: // This call is non-blocking by design.
052: case 0: // org/cougaar/qos/ResourceStatus/ResourceStatusService/query
053: {
054: org.cougaar.qos.ResourceStatus.ResourceNode formula[] = org.cougaar.qos.ResourceStatus.ResourceDescriptionHelper
055: .read(in);
056: org.cougaar.qos.ResourceStatus.DataValueHolder result = new org.cougaar.qos.ResourceStatus.DataValueHolder();
057: boolean $result = false;
058: $result = this .query(formula, result);
059: out = $rh.createReply();
060: out.write_boolean($result);
061: org.cougaar.qos.ResourceStatus.DataValueHelper.write(out,
062: result.value);
063: break;
064: }
065:
066: case 1: // org/cougaar/qos/ResourceStatus/ResourceStatusService/query_s
067: {
068: try {
069: String formula = in.read_string();
070: org.cougaar.qos.ResourceStatus.DataValueHolder result = new org.cougaar.qos.ResourceStatus.DataValueHolder();
071: boolean $result = false;
072: $result = this .query_s(formula, result);
073: out = $rh.createReply();
074: out.write_boolean($result);
075: org.cougaar.qos.ResourceStatus.DataValueHelper.write(
076: out, result.value);
077: } catch (org.cougaar.qos.ResourceStatus.ResourceDescriptionParseException $ex) {
078: out = $rh.createExceptionReply();
079: org.cougaar.qos.ResourceStatus.ResourceDescriptionParseExceptionHelper
080: .write(out, $ex);
081: }
082: break;
083: }
084:
085: // an exception in the former case.
086: case 2: // org/cougaar/qos/ResourceStatus/ResourceStatusService/blockingQuery
087: {
088: org.cougaar.qos.ResourceStatus.ResourceNode formula[] = org.cougaar.qos.ResourceStatus.ResourceDescriptionHelper
089: .read(in);
090: long timeout = in.read_longlong();
091: org.cougaar.qos.ResourceStatus.DataValueHolder result = new org.cougaar.qos.ResourceStatus.DataValueHolder();
092: boolean $result = false;
093: $result = this .blockingQuery(formula, timeout, result);
094: out = $rh.createReply();
095: out.write_boolean($result);
096: org.cougaar.qos.ResourceStatus.DataValueHelper.write(out,
097: result.value);
098: break;
099: }
100:
101: case 3: // org/cougaar/qos/ResourceStatus/ResourceStatusService/blockingQuery_s
102: {
103: try {
104: String formula = in.read_string();
105: long timeout = in.read_longlong();
106: org.cougaar.qos.ResourceStatus.DataValueHolder result = new org.cougaar.qos.ResourceStatus.DataValueHolder();
107: boolean $result = false;
108: $result = this
109: .blockingQuery_s(formula, timeout, result);
110: out = $rh.createReply();
111: out.write_boolean($result);
112: org.cougaar.qos.ResourceStatus.DataValueHelper.write(
113: out, result.value);
114: } catch (org.cougaar.qos.ResourceStatus.ResourceDescriptionParseException $ex) {
115: out = $rh.createExceptionReply();
116: org.cougaar.qos.ResourceStatus.ResourceDescriptionParseExceptionHelper
117: .write(out, $ex);
118: }
119: break;
120: }
121:
122: // one corresponds to a given callback invocation.
123: case 4: // org/cougaar/qos/ResourceStatus/ResourceStatusService/unqualifiedSubscribe
124: {
125: org.cougaar.qos.ResourceStatus.RSSSubscriber listener = org.cougaar.qos.ResourceStatus.RSSSubscriberHelper
126: .read(in);
127: org.cougaar.qos.ResourceStatus.ResourceNode formula[] = org.cougaar.qos.ResourceStatus.ResourceDescriptionHelper
128: .read(in);
129: int callback_id = in.read_long();
130: boolean $result = false;
131: $result = this .unqualifiedSubscribe(listener, formula,
132: callback_id);
133: out = $rh.createReply();
134: out.write_boolean($result);
135: break;
136: }
137:
138: case 5: // org/cougaar/qos/ResourceStatus/ResourceStatusService/unqualifiedSubscribe_s
139: {
140: try {
141: org.cougaar.qos.ResourceStatus.RSSSubscriber listener = org.cougaar.qos.ResourceStatus.RSSSubscriberHelper
142: .read(in);
143: String formula = in.read_string();
144: int callback_id = in.read_long();
145: boolean $result = false;
146: $result = this .unqualifiedSubscribe_s(listener,
147: formula, callback_id);
148: out = $rh.createReply();
149: out.write_boolean($result);
150: } catch (org.cougaar.qos.ResourceStatus.ResourceDescriptionParseException $ex) {
151: out = $rh.createExceptionReply();
152: org.cougaar.qos.ResourceStatus.ResourceDescriptionParseExceptionHelper
153: .write(out, $ex);
154: }
155: break;
156: }
157:
158: // qualifier.
159: case 6: // org/cougaar/qos/ResourceStatus/ResourceStatusService/qualifiedSubscribe
160: {
161: org.cougaar.qos.ResourceStatus.RSSSubscriber listener = org.cougaar.qos.ResourceStatus.RSSSubscriberHelper
162: .read(in);
163: org.cougaar.qos.ResourceStatus.ResourceNode formula[] = org.cougaar.qos.ResourceStatus.ResourceDescriptionHelper
164: .read(in);
165: int callback_id = in.read_long();
166: org.cougaar.qos.ResourceStatus.Qualifier qualifier_ = org.cougaar.qos.ResourceStatus.QualifierHelper
167: .read(in);
168: boolean $result = false;
169: $result = this .qualifiedSubscribe(listener, formula,
170: callback_id, qualifier_);
171: out = $rh.createReply();
172: out.write_boolean($result);
173: break;
174: }
175:
176: case 7: // org/cougaar/qos/ResourceStatus/ResourceStatusService/qualifiedSubscribe_s
177: {
178: try {
179: org.cougaar.qos.ResourceStatus.RSSSubscriber listener = org.cougaar.qos.ResourceStatus.RSSSubscriberHelper
180: .read(in);
181: String formula = in.read_string();
182: int callback_id = in.read_long();
183: org.cougaar.qos.ResourceStatus.Qualifier qualifier_ = org.cougaar.qos.ResourceStatus.QualifierHelper
184: .read(in);
185: boolean $result = false;
186: $result = this .qualifiedSubscribe_s(listener, formula,
187: callback_id, qualifier_);
188: out = $rh.createReply();
189: out.write_boolean($result);
190: } catch (org.cougaar.qos.ResourceStatus.ResourceDescriptionParseException $ex) {
191: out = $rh.createExceptionReply();
192: org.cougaar.qos.ResourceStatus.ResourceDescriptionParseExceptionHelper
193: .write(out, $ex);
194: }
195: break;
196: }
197:
198: // given listener.
199: case 8: // org/cougaar/qos/ResourceStatus/ResourceStatusService/unsubscribe
200: {
201: org.cougaar.qos.ResourceStatus.RSSSubscriber listener = org.cougaar.qos.ResourceStatus.RSSSubscriberHelper
202: .read(in);
203: org.cougaar.qos.ResourceStatus.ResourceNode formula[] = org.cougaar.qos.ResourceStatus.ResourceDescriptionHelper
204: .read(in);
205: this .unsubscribe(listener, formula);
206: out = $rh.createReply();
207: break;
208: }
209:
210: case 9: // org/cougaar/qos/ResourceStatus/ResourceStatusService/unsubscribe_s
211: {
212: try {
213: org.cougaar.qos.ResourceStatus.RSSSubscriber listener = org.cougaar.qos.ResourceStatus.RSSSubscriberHelper
214: .read(in);
215: String formula = in.read_string();
216: this .unsubscribe_s(listener, formula);
217: out = $rh.createReply();
218: } catch (org.cougaar.qos.ResourceStatus.ResourceDescriptionParseException $ex) {
219: out = $rh.createExceptionReply();
220: org.cougaar.qos.ResourceStatus.ResourceDescriptionParseExceptionHelper
221: .write(out, $ex);
222: }
223: break;
224: }
225:
226: // request a Qualifier.
227: case 10: // org/cougaar/qos/ResourceStatus/ResourceStatusService/getQualifierFactory
228: {
229: org.cougaar.qos.ResourceStatus.QualifierKind kind = org.cougaar.qos.ResourceStatus.QualifierKindHelper
230: .read(in);
231: org.cougaar.qos.ResourceStatus.QualifierFactory $result = null;
232: $result = this .getQualifierFactory(kind);
233: out = $rh.createReply();
234: org.cougaar.qos.ResourceStatus.QualifierFactoryHelper
235: .write(out, $result);
236: break;
237: }
238:
239: // context rather than a formula.
240: case 11: // org/cougaar/qos/ResourceStatus/ResourceStatusService/invoke
241: {
242: try {
243: org.cougaar.qos.ResourceStatus.ResourceNode resource_context[] = org.cougaar.qos.ResourceStatus.ResourceDescriptionHelper
244: .read(in);
245: String method_name = in.read_string();
246: String args[] = org.cougaar.qos.ResourceStatus.ParameterListHelper
247: .read(in);
248: boolean $result = false;
249: $result = this .invoke(resource_context, method_name,
250: args);
251: out = $rh.createReply();
252: out.write_boolean($result);
253: } catch (org.cougaar.qos.ResourceStatus.NoSuchMethodException $ex) {
254: out = $rh.createExceptionReply();
255: org.cougaar.qos.ResourceStatus.NoSuchMethodExceptionHelper
256: .write(out, $ex);
257: }
258: break;
259: }
260:
261: case 12: // org/cougaar/qos/ResourceStatus/ResourceStatusService/invoke_s
262: {
263: try {
264: String resource_context = in.read_string();
265: String method_name = in.read_string();
266: String args[] = org.cougaar.qos.ResourceStatus.ParameterListHelper
267: .read(in);
268: boolean $result = false;
269: $result = this .invoke_s(resource_context, method_name,
270: args);
271: out = $rh.createReply();
272: out.write_boolean($result);
273: } catch (org.cougaar.qos.ResourceStatus.NoSuchMethodException $ex) {
274: out = $rh.createExceptionReply();
275: org.cougaar.qos.ResourceStatus.NoSuchMethodExceptionHelper
276: .write(out, $ex);
277: } catch (org.cougaar.qos.ResourceStatus.ResourceDescriptionParseException $ex) {
278: out = $rh.createExceptionReply();
279: org.cougaar.qos.ResourceStatus.ResourceDescriptionParseExceptionHelper
280: .write(out, $ex);
281: }
282: break;
283: }
284:
285: // raw value.
286: case 13: // org/cougaar/qos/ResourceStatus/ResourceStatusService/pushString
287: {
288: String key = in.read_string();
289: String raw_value = in.read_string();
290: this .pushString(key, raw_value);
291: out = $rh.createReply();
292: break;
293: }
294:
295: case 14: // org/cougaar/qos/ResourceStatus/ResourceStatusService/pushLong
296: {
297: String key = in.read_string();
298: int raw_value = in.read_long();
299: this .pushLong(key, raw_value);
300: out = $rh.createReply();
301: break;
302: }
303:
304: // soon go away.
305: case 15: // org/cougaar/qos/ResourceStatus/ResourceStatusService/addDependency
306: {
307: org.cougaar.qos.ResourceStatus.ResourceNode resource = org.cougaar.qos.ResourceStatus.ResourceNodeHelper
308: .read(in);
309: org.cougaar.qos.ResourceStatus.ResourceNode node_dependencies[] = org.cougaar.qos.ResourceStatus.ResourceNodeSeqHelper
310: .read(in);
311: org.cougaar.qos.ResourceStatus.ResourceStatusService rss_dependencies[] = org.cougaar.qos.ResourceStatus.RSSSeqHelper
312: .read(in);
313: this .addDependency(resource, node_dependencies,
314: rss_dependencies);
315: out = $rh.createReply();
316: break;
317: }
318:
319: default:
320: throw new org.omg.CORBA.BAD_OPERATION(0,
321: org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
322: }
323:
324: return out;
325: } // _invoke
326:
327: // Type-specific CORBA::Object operations
328: private static String[] __ids = { "IDL:org/cougaar/qos/ResourceStatus/ResourceStatusService:1.0" };
329:
330: public String[] _all_interfaces(org.omg.PortableServer.POA poa,
331: byte[] objectId) {
332: return (String[]) __ids.clone();
333: }
334:
335: public ResourceStatusService _this () {
336: return ResourceStatusServiceHelper.narrow(super ._this _object());
337: }
338:
339: public ResourceStatusService _this (org.omg.CORBA.ORB orb) {
340: return ResourceStatusServiceHelper.narrow(super
341: ._this _object(orb));
342: }
343:
344: } // class ResourceStatusServicePOA
|