001 package org.omg.CosTransactions; 002 003 004 /** 005 * Generated from IDL interface "InvocationPolicy". 006 * 007 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007 008 * @version generated at Sep 22, 2012 10:57:18 AM 009 */ 010 011 public abstract class InvocationPolicyPOA 012 extends org.omg.PortableServer.Servant 013 implements org.omg.CORBA.portable.InvokeHandler, org.omg.CosTransactions.InvocationPolicyOperations 014 { 015 static private final java.util.Hashtable m_opsHash = new java.util.Hashtable(); 016 static 017 { 018 m_opsHash.put ( "_get_ipv", new java.lang.Integer(0)); 019 m_opsHash.put ( "_get_policy_type", new java.lang.Integer(1)); 020 m_opsHash.put ( "copy", new java.lang.Integer(2)); 021 m_opsHash.put ( "destroy", new java.lang.Integer(3)); 022 } 023 private String[] ids = {"IDL:CosTransactions/InvocationPolicy:1.0","IDL:CORBA/Policy:1.0"}; 024 public org.omg.CosTransactions.InvocationPolicy _this() 025 { 026 return org.omg.CosTransactions.InvocationPolicyHelper.narrow(_this_object()); 027 } 028 public org.omg.CosTransactions.InvocationPolicy _this(org.omg.CORBA.ORB orb) 029 { 030 return org.omg.CosTransactions.InvocationPolicyHelper.narrow(_this_object(orb)); 031 } 032 public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler) 033 throws org.omg.CORBA.SystemException 034 { 035 org.omg.CORBA.portable.OutputStream _out = null; 036 // do something 037 // quick lookup of operation 038 java.lang.Integer opsIndex = (java.lang.Integer)m_opsHash.get ( method ); 039 if ( null == opsIndex ) 040 throw new org.omg.CORBA.BAD_OPERATION(method + " not found"); 041 switch ( opsIndex.intValue() ) 042 { 043 case 0: // _get_ipv 044 { 045 _out = handler.createReply(); 046 _out.write_ushort(ipv()); 047 break; 048 } 049 case 1: // _get_policy_type 050 { 051 _out = handler.createReply(); 052 _out.write_ulong(policy_type()); 053 break; 054 } 055 case 2: // copy 056 { 057 _out = handler.createReply(); 058 org.omg.CORBA.PolicyHelper.write(_out,copy()); 059 break; 060 } 061 case 3: // destroy 062 { 063 _out = handler.createReply(); 064 destroy(); 065 break; 066 } 067 } 068 return _out; 069 } 070 071 public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] obj_id) 072 { 073 return ids; 074 } 075 }