KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.omg.PortableServer;
2
3
4 /**
5 * org/omg/PortableServer/_ServantActivatorStub.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 RETAIN policy it uses servant
14      * managers that are ServantActivators.
15      */

16 public class _ServantActivatorStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements org.omg.PortableServer.ServantActivator JavaDoc
17 {
18   final public static java.lang.Class JavaDoc _opsClass = ServantActivatorOperations JavaDoc.class;
19
20
21
22   /**
23      * This operation is invoked by the POA whenever the
24      * POA receives a request for an object that is not
25      * currently active, assuming the POA has the
26      * USE_SERVANT_MANAGER and RETAIN policies.
27      * @param oid object Id associated with the object on
28      * the request was made.
29      * @param adapter object reference for the POA in which
30      * the object is being activated.
31      * @return Servant corresponding to oid is created or
32      * located by the user supplied servant manager.
33      * @exception ForwardRequest to indicate to the ORB
34      * that it is responsible for delivering
35      * the current request and subsequent
36      * requests to the object denoted in the
37      * forward_reference member of the exception.
38      */

39   public org.omg.PortableServer.Servant JavaDoc incarnate (byte[] oid, org.omg.PortableServer.POA JavaDoc adapter) throws org.omg.PortableServer.ForwardRequest JavaDoc
40   {
41       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("incarnate", _opsClass);
42       ServantActivatorOperations JavaDoc $self = (ServantActivatorOperations JavaDoc) $so.servant;
43
44       try {
45          return $self.incarnate (oid, adapter);
46       } finally {
47           _servant_postinvoke ($so);
48       }
49   } // incarnate
50

51
52   /**
53      * This operation is invoked whenever a servant for
54      * an object is deactivated, assuming the POA has
55      * the USE_SERVANT_MANAGER and RETAIN policies.
56      * @param oid object Id associated with the object
57      * being deactivated.
58      * @param adapter object reference for the POA in which
59      * the object was active.
60      * @param serv contains reference to the servant
61      * associated with the object being deactivated.
62      * @param cleanup_in_progress if TRUE indicates that
63      * destroy or deactivate is called with
64      * etherealize_objects param of TRUE. FALSE
65      * indicates that etherealize was called due to
66      * other reasons.
67      * @param remaining_activations indicates whether the
68      * Servant Manager can destroy a servant. If
69      * set to TRUE, the Servant Manager should wait
70      * until all invocations in progress have
71      * completed.
72      */

73   public void etherealize (byte[] oid, org.omg.PortableServer.POA JavaDoc adapter, org.omg.PortableServer.Servant JavaDoc serv, boolean cleanup_in_progress, boolean remaining_activations)
74   {
75       org.omg.CORBA.portable.ServantObject JavaDoc $so = _servant_preinvoke ("etherealize", _opsClass);
76       ServantActivatorOperations JavaDoc $self = (ServantActivatorOperations JavaDoc) $so.servant;
77
78       try {
79          $self.etherealize (oid, adapter, serv, cleanup_in_progress, remaining_activations);
80       } finally {
81           _servant_postinvoke ($so);
82       }
83   } // etherealize
84

85   // Type-specific CORBA::Object operations
86
private static String JavaDoc[] __ids = {
87     "IDL:omg.org/PortableServer/ServantActivator:2.3",
88     "IDL:omg.org/PortableServer/ServantManager:1.0"};
89
90   public String JavaDoc[] _ids ()
91   {
92     return (String JavaDoc[])__ids.clone ();
93   }
94
95   private void readObject (java.io.ObjectInputStream JavaDoc s) throws java.io.IOException JavaDoc
96   {
97      String JavaDoc str = s.readUTF ();
98      String JavaDoc[] args = null;
99      java.util.Properties JavaDoc props = null;
100      org.omg.CORBA.Object JavaDoc obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
101      org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc) obj)._get_delegate ();
102      _set_delegate (delegate);
103   }
104
105   private void writeObject (java.io.ObjectOutputStream JavaDoc s) throws java.io.IOException JavaDoc
106   {
107      String JavaDoc[] args = null;
108      java.util.Properties JavaDoc props = null;
109      String JavaDoc str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
110      s.writeUTF (str);
111   }
112 } // class _ServantActivatorStub
113
Popular Tags