KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.PortableServer;
2
3
4 /**
5 * org/omg/PortableServer/ServantLocatorPOA.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
8 * Saturday, February 9, 2008 9:40:03 AM GMT
9 */

10
11
12 /**
13      * When the POA has the NON_RETAIN policy it uses servant
14      * managers that are ServantLocators. Because the POA
15      * knows that the servant returned by this servant
16      * manager will be used only for a single request,
17      * it can supply extra information to the servant
18      * manager's operations and the servant manager's pair
19      * of operations may be able to cooperate to do
20      * something different than a ServantActivator.
21      * When the POA uses the ServantLocator interface,
22      * immediately after performing the operation invocation
23      * on the servant returned by preinvoke, the POA will
24      * invoke postinvoke on the servant manager, passing the
25      * ObjectId value and the Servant value as parameters
26      * (among others). This feature may be used to force
27      * every request for objects associated with a POA to
28      * be mediated by the servant manager.
29      */

30 public abstract class ServantLocatorPOA extends org.omg.PortableServer.Servant JavaDoc
31  implements org.omg.PortableServer.ServantLocatorOperations JavaDoc, org.omg.CORBA.portable.InvokeHandler JavaDoc
32 {
33
34   // Constructors
35

36   private static java.util.Hashtable JavaDoc _methods = new java.util.Hashtable JavaDoc ();
37   static
38   {
39     _methods.put ("preinvoke", new java.lang.Integer JavaDoc (0));
40     _methods.put ("postinvoke", new java.lang.Integer JavaDoc (1));
41   }
42
43   public org.omg.CORBA.portable.OutputStream JavaDoc _invoke (String JavaDoc $method,
44                                 org.omg.CORBA.portable.InputStream JavaDoc in,
45                                 org.omg.CORBA.portable.ResponseHandler JavaDoc $rh)
46   {
47     throw new org.omg.CORBA.BAD_OPERATION JavaDoc();
48   } // _invoke
49

50   // Type-specific CORBA::Object operations
51
private static String JavaDoc[] __ids = {
52     "IDL:omg.org/PortableServer/ServantLocator:1.0",
53     "IDL:omg.org/PortableServer/ServantManager:1.0"};
54
55   public String JavaDoc[] _all_interfaces (org.omg.PortableServer.POA JavaDoc poa, byte[] objectId)
56   {
57     return (String JavaDoc[])__ids.clone ();
58   }
59
60   public ServantLocator JavaDoc _this()
61   {
62     return ServantLocatorHelper.narrow(
63     super._this_object());
64   }
65
66   public ServantLocator JavaDoc _this(org.omg.CORBA.ORB JavaDoc orb)
67   {
68     return ServantLocatorHelper.narrow(
69     super._this_object(orb));
70   }
71
72
73 } // class ServantLocatorPOA
74
Popular Tags