1. package org.omg.PortableServer;
  2. /**
  3. * org/omg/PortableServer/_ServantActivatorStub.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
  6. * Monday, February 23, 2004 7:03:02 AM GMT
  7. */
  8. /**
  9. * When the POA has the RETAIN policy it uses servant
  10. * managers that are ServantActivators.
  11. */
  12. public class _ServantActivatorStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.PortableServer.ServantActivator
  13. {
  14. final public static java.lang.Class _opsClass = ServantActivatorOperations.class;
  15. /**
  16. * This operation is invoked by the POA whenever the
  17. * POA receives a request for an object that is not
  18. * currently active, assuming the POA has the
  19. * USE_SERVANT_MANAGER and RETAIN policies.
  20. * @param oid object Id associated with the object on
  21. * the request was made.
  22. * @param adapter object reference for the POA in which
  23. * the object is being activated.
  24. * @return Servant corresponding to oid is created or
  25. * located by the user supplied servant manager.
  26. * @exception ForwardRequest to indicate to the ORB
  27. * that it is responsible for delivering
  28. * the current request and subsequent
  29. * requests to the object denoted in the
  30. * forward_reference member of the exception.
  31. */
  32. public org.omg.PortableServer.Servant incarnate (byte[] oid, org.omg.PortableServer.POA adapter) throws org.omg.PortableServer.ForwardRequest
  33. {
  34. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("incarnate", _opsClass);
  35. ServantActivatorOperations $self = (ServantActivatorOperations) $so.servant;
  36. try {
  37. return $self.incarnate (oid, adapter);
  38. } finally {
  39. _servant_postinvoke ($so);
  40. }
  41. } // incarnate
  42. /**
  43. * This operation is invoked whenever a servant for
  44. * an object is deactivated, assuming the POA has
  45. * the USE_SERVANT_MANAGER and RETAIN policies.
  46. * @param oid object Id associated with the object
  47. * being deactivated.
  48. * @param adapter object reference for the POA in which
  49. * the object was active.
  50. * @param serv contains reference to the servant
  51. * associated with the object being deactivated.
  52. * @param cleanup_in_progress if TRUE indicates that
  53. * destroy or deactivate is called with
  54. * etherealize_objects param of TRUE. FALSE
  55. * indicates that etherealize was called due to
  56. * other reasons.
  57. * @param remaining_activations indicates whether the
  58. * Servant Manager can destroy a servant. If
  59. * set to TRUE, the Servant Manager should wait
  60. * until all invocations in progress have
  61. * completed.
  62. */
  63. public void etherealize (byte[] oid, org.omg.PortableServer.POA adapter, org.omg.PortableServer.Servant serv, boolean cleanup_in_progress, boolean remaining_activations)
  64. {
  65. org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("etherealize", _opsClass);
  66. ServantActivatorOperations $self = (ServantActivatorOperations) $so.servant;
  67. try {
  68. $self.etherealize (oid, adapter, serv, cleanup_in_progress, remaining_activations);
  69. } finally {
  70. _servant_postinvoke ($so);
  71. }
  72. } // etherealize
  73. // Type-specific CORBA::Object operations
  74. private static String[] __ids = {
  75. "IDL:omg.org/PortableServer/ServantActivator:2.3",
  76. "IDL:omg.org/PortableServer/ServantManager:1.0"};
  77. public String[] _ids ()
  78. {
  79. return (String[])__ids.clone ();
  80. }
  81. private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
  82. {
  83. String str = s.readUTF ();
  84. String[] args = null;
  85. java.util.Properties props = null;
  86. org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
  87. org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
  88. _set_delegate (delegate);
  89. }
  90. private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
  91. {
  92. String[] args = null;
  93. java.util.Properties props = null;
  94. String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
  95. s.writeUTF (str);
  96. }
  97. } // class _ServantActivatorStub