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