1. package com.sun.corba.se.PortableActivationIDL;
  2. /**
  3. * com/sun/corba/se/PortableActivationIDL/ServerProxyHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
  6. * Wednesday, September 15, 2004 3:50:44 AM PDT
  7. */
  8. /** Server callback interface, passed to Activator in registerServer method.
  9. */
  10. abstract public class ServerProxyHelper
  11. {
  12. private static String _id = "IDL:PortableActivationIDL/ServerProxy:1.0";
  13. public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.PortableActivationIDL.ServerProxy that)
  14. {
  15. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  16. a.type (type ());
  17. write (out, that);
  18. a.read_value (out.create_input_stream (), type ());
  19. }
  20. public static com.sun.corba.se.PortableActivationIDL.ServerProxy extract (org.omg.CORBA.Any a)
  21. {
  22. return read (a.create_input_stream ());
  23. }
  24. private static org.omg.CORBA.TypeCode __typeCode = null;
  25. synchronized public static org.omg.CORBA.TypeCode type ()
  26. {
  27. if (__typeCode == null)
  28. {
  29. __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (com.sun.corba.se.PortableActivationIDL.ServerProxyHelper.id (), "ServerProxy");
  30. }
  31. return __typeCode;
  32. }
  33. public static String id ()
  34. {
  35. return _id;
  36. }
  37. public static com.sun.corba.se.PortableActivationIDL.ServerProxy read (org.omg.CORBA.portable.InputStream istream)
  38. {
  39. return narrow (istream.read_Object (_ServerProxyStub.class));
  40. }
  41. public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.PortableActivationIDL.ServerProxy value)
  42. {
  43. ostream.write_Object ((org.omg.CORBA.Object) value);
  44. }
  45. public static com.sun.corba.se.PortableActivationIDL.ServerProxy narrow (org.omg.CORBA.Object obj)
  46. {
  47. if (obj == null)
  48. return null;
  49. else if (obj instanceof com.sun.corba.se.PortableActivationIDL.ServerProxy)
  50. return (com.sun.corba.se.PortableActivationIDL.ServerProxy)obj;
  51. else if (!obj._is_a (id ()))
  52. throw new org.omg.CORBA.BAD_PARAM ();
  53. else
  54. {
  55. org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
  56. com.sun.corba.se.PortableActivationIDL._ServerProxyStub stub = new com.sun.corba.se.PortableActivationIDL._ServerProxyStub ();
  57. stub._set_delegate(delegate);
  58. return stub;
  59. }
  60. }
  61. public static com.sun.corba.se.PortableActivationIDL.ServerProxy unchecked_narrow (org.omg.CORBA.Object obj)
  62. {
  63. if (obj == null)
  64. return null;
  65. else if (obj instanceof com.sun.corba.se.PortableActivationIDL.ServerProxy)
  66. return (com.sun.corba.se.PortableActivationIDL.ServerProxy)obj;
  67. else
  68. {
  69. org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
  70. com.sun.corba.se.PortableActivationIDL._ServerProxyStub stub = new com.sun.corba.se.PortableActivationIDL._ServerProxyStub ();
  71. stub._set_delegate(delegate);
  72. return stub;
  73. }
  74. }
  75. }