001 package org.omg.CosTransactions; 002 003 004 /** 005 * org/omg/CosTransactions/_OTSPolicyImplBase.java . 006 * Generated by the IDL-to-Java compiler (portable), version "3.2" 007 * from /builddir/build/BUILD/geronimo-specs-1.6/geronimo-spec-corba/src/main/idl/CosTransactions.idl 008 * Saturday, September 22, 2012 10:56:39 AM CEST 009 */ 010 011 public abstract class _OTSPolicyImplBase extends org.omg.CORBA.portable.ObjectImpl 012 implements org.omg.CosTransactions.OTSPolicy, org.omg.CORBA.portable.InvokeHandler 013 { 014 015 // Constructors 016 public _OTSPolicyImplBase () 017 { 018 } 019 020 private static java.util.Hashtable _methods = new java.util.Hashtable (); 021 static 022 { 023 _methods.put ("_get_tpv", new java.lang.Integer (0)); 024 _methods.put ("_get_policy_type", new java.lang.Integer (1)); 025 _methods.put ("copy", new java.lang.Integer (2)); 026 _methods.put ("destroy", new java.lang.Integer (3)); 027 } 028 029 public org.omg.CORBA.portable.OutputStream _invoke (String $method, 030 org.omg.CORBA.portable.InputStream in, 031 org.omg.CORBA.portable.ResponseHandler $rh) 032 { 033 org.omg.CORBA.portable.OutputStream out = null; 034 java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); 035 if (__method == null) 036 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 037 038 switch (__method.intValue ()) 039 { 040 case 0: // CosTransactions/OTSPolicy/_get_tpv 041 { 042 short $result = (short)0; 043 $result = this.tpv (); 044 out = $rh.createReply(); 045 out.write_ushort ($result); 046 break; 047 } 048 049 case 1: // org/omg/CORBA/Policy/_get_policy_type 050 { 051 int $result = (int)0; 052 $result = this.policy_type (); 053 out = $rh.createReply(); 054 out.write_ulong ($result); 055 break; 056 } 057 058 case 2: // org/omg/CORBA/Policy/copy 059 { 060 org.omg.CORBA.Policy $result = null; 061 $result = this.copy (); 062 out = $rh.createReply(); 063 org.omg.CORBA.PolicyHelper.write (out, $result); 064 break; 065 } 066 067 case 3: // org/omg/CORBA/Policy/destroy 068 { 069 this.destroy (); 070 out = $rh.createReply(); 071 break; 072 } 073 074 default: 075 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 076 } 077 078 return out; 079 } // _invoke 080 081 // Type-specific CORBA::Object operations 082 private static String[] __ids = { 083 "IDL:CosTransactions/OTSPolicy:1.0", 084 "IDL:CORBA/Policy:1.0"}; 085 086 public String[] _ids () 087 { 088 return (String[])__ids.clone (); 089 } 090 091 092 } // class _OTSPolicyImplBase