01: package org.cougaar.qos.ResourceStatus;
02:
03: /**
04: * org/cougaar/qos/ResourceStatus/QualifierPOA.java .
05: * Generated by the IDL-to-Java compiler (portable), version "3.2"
06: * from qrs.idl
07: * Tuesday, August 7, 2007 11:57:30 AM EDT
08: */
09:
10: public abstract class QualifierPOA extends
11: org.omg.PortableServer.Servant implements
12: org.cougaar.qos.ResourceStatus.QualifierOperations,
13: org.omg.CORBA.portable.InvokeHandler {
14:
15: // Constructors
16:
17: private static java.util.Hashtable _methods = new java.util.Hashtable();
18: static {
19: _methods.put("getAttribute", new java.lang.Integer(0));
20: _methods.put("setAttribute", new java.lang.Integer(1));
21: }
22:
23: public org.omg.CORBA.portable.OutputStream _invoke(String $method,
24: org.omg.CORBA.portable.InputStream in,
25: org.omg.CORBA.portable.ResponseHandler $rh) {
26: org.omg.CORBA.portable.OutputStream out = null;
27: java.lang.Integer __method = (java.lang.Integer) _methods
28: .get($method);
29: if (__method == null)
30: throw new org.omg.CORBA.BAD_OPERATION(0,
31: org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
32:
33: switch (__method.intValue()) {
34: case 0: // org/cougaar/qos/ResourceStatus/Qualifier/getAttribute
35: {
36: try {
37: String attribute_name = in.read_string();
38: org.cougaar.qos.ResourceStatus.data_valueHolder attribute_value = new org.cougaar.qos.ResourceStatus.data_valueHolder();
39: this .getAttribute(attribute_name, attribute_value);
40: out = $rh.createReply();
41: org.cougaar.qos.ResourceStatus.data_valueHelper.write(
42: out, attribute_value.value);
43: } catch (org.cougaar.qos.ResourceStatus.NoSuchAttributeException $ex) {
44: out = $rh.createExceptionReply();
45: org.cougaar.qos.ResourceStatus.NoSuchAttributeExceptionHelper
46: .write(out, $ex);
47: } catch (org.cougaar.qos.ResourceStatus.BadAttributeValueException $ex) {
48: out = $rh.createExceptionReply();
49: org.cougaar.qos.ResourceStatus.BadAttributeValueExceptionHelper
50: .write(out, $ex);
51: }
52: break;
53: }
54:
55: case 1: // org/cougaar/qos/ResourceStatus/Qualifier/setAttribute
56: {
57: try {
58: String attribute_name = in.read_string();
59: org.cougaar.qos.ResourceStatus.data_value attrobute_value = org.cougaar.qos.ResourceStatus.data_valueHelper
60: .read(in);
61: this .setAttribute(attribute_name, attrobute_value);
62: out = $rh.createReply();
63: } catch (org.cougaar.qos.ResourceStatus.NoSuchAttributeException $ex) {
64: out = $rh.createExceptionReply();
65: org.cougaar.qos.ResourceStatus.NoSuchAttributeExceptionHelper
66: .write(out, $ex);
67: } catch (org.cougaar.qos.ResourceStatus.BadAttributeValueException $ex) {
68: out = $rh.createExceptionReply();
69: org.cougaar.qos.ResourceStatus.BadAttributeValueExceptionHelper
70: .write(out, $ex);
71: }
72: break;
73: }
74:
75: default:
76: throw new org.omg.CORBA.BAD_OPERATION(0,
77: org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
78: }
79:
80: return out;
81: } // _invoke
82:
83: // Type-specific CORBA::Object operations
84: private static String[] __ids = { "IDL:org/cougaar/qos/ResourceStatus/Qualifier:1.0" };
85:
86: public String[] _all_interfaces(org.omg.PortableServer.POA poa,
87: byte[] objectId) {
88: return (String[]) __ids.clone();
89: }
90:
91: public Qualifier _this () {
92: return QualifierHelper.narrow(super ._this _object());
93: }
94:
95: public Qualifier _this (org.omg.CORBA.ORB orb) {
96: return QualifierHelper.narrow(super ._this _object(orb));
97: }
98:
99: } // class QualifierPOA
|