KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > PortableServer > AdapterActivatorPOA


1 package org.omg.PortableServer;
2
3 /** stream-based skeleton class */
4
5 public abstract class AdapterActivatorPOA
6     extends org.omg.PortableServer.Servant JavaDoc
7     implements org.omg.CORBA.portable.InvokeHandler JavaDoc, org.omg.PortableServer.AdapterActivatorOperations JavaDoc
8 {
9     static private final java.util.Hashtable JavaDoc m_opsHash = new java.util.Hashtable JavaDoc();
10     static
11     {
12         m_opsHash.put ( "unknown_adapter", new java.lang.Integer JavaDoc(0));
13     }
14     private String JavaDoc[] ids = {"IDL:omg.org/PortableServer/AdapterActivator:1.0"};
15     public org.omg.PortableServer.AdapterActivator JavaDoc _this()
16     {
17         return org.omg.PortableServer.AdapterActivatorHelper.narrow(_this_object());
18     }
19     public org.omg.PortableServer.AdapterActivator JavaDoc _this(org.omg.CORBA.ORB JavaDoc orb)
20     {
21         return org.omg.PortableServer.AdapterActivatorHelper.narrow(_this_object(orb));
22     }
23     public org.omg.CORBA.portable.OutputStream JavaDoc _invoke(String JavaDoc method, org.omg.CORBA.portable.InputStream JavaDoc _input, org.omg.CORBA.portable.ResponseHandler JavaDoc handler)
24         throws org.omg.CORBA.SystemException JavaDoc
25     {
26         org.omg.CORBA.portable.OutputStream JavaDoc _out = null;
27         // do something
28
org.omg.CORBA.portable.OutputStream JavaDoc out = null;
29         // quick lookup of operation
30
java.lang.Integer JavaDoc opsIndex = (java.lang.Integer JavaDoc)m_opsHash.get ( method );
31         if ( null == opsIndex )
32             throw new org.omg.CORBA.BAD_OPERATION JavaDoc(method + " not found");
33         switch ( opsIndex.intValue() )
34         {
35             case 0: // unknown_adapter
36
{
37                 org.omg.PortableServer.POA JavaDoc _arg0=org.omg.PortableServer.POAHelper.read(_input);
38                 java.lang.String JavaDoc _arg1=_input.read_string();
39                 _out = handler.createReply();
40                 _out.write_boolean(unknown_adapter(_arg0,_arg1));
41                 break;
42             }
43         }
44         return out;
45     }
46
47     public String JavaDoc[] _all_interfaces(org.omg.PortableServer.POA JavaDoc poa, byte[] obj_id)
48     {
49         return ids;
50     }
51 }
52
Popular Tags