1. package com.sun.corba.se.ActivationIDL;
  2. /**
  3. * com/sun/corba/se/ActivationIDL/ServerHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../../../src/share/classes/com/sun/corba/se/ActivationIDL/activation.idl
  6. * Sunday, February 22, 2004 11:21:42 PM PST
  7. */
  8. /** Server callback API, passed to Activator in active method.
  9. */
  10. abstract public class ServerHelper
  11. {
  12. private static String _id = "IDL:ActivationIDL/Server:1.0";
  13. public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.ActivationIDL.Server 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.ActivationIDL.Server 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.ActivationIDL.ServerHelper.id (), "Server");
  30. }
  31. return __typeCode;
  32. }
  33. public static String id ()
  34. {
  35. return _id;
  36. }
  37. public static com.sun.corba.se.ActivationIDL.Server read (org.omg.CORBA.portable.InputStream istream)
  38. {
  39. return narrow (istream.read_Object (_ServerStub.class));
  40. }
  41. public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.ActivationIDL.Server value)
  42. {
  43. ostream.write_Object ((org.omg.CORBA.Object) value);
  44. }
  45. public static com.sun.corba.se.ActivationIDL.Server narrow (org.omg.CORBA.Object obj)
  46. {
  47. if (obj == null)
  48. return null;
  49. else if (obj instanceof com.sun.corba.se.ActivationIDL.Server)
  50. return (com.sun.corba.se.ActivationIDL.Server)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.ActivationIDL._ServerStub stub = new com.sun.corba.se.ActivationIDL._ServerStub ();
  57. stub._set_delegate(delegate);
  58. return stub;
  59. }
  60. }
  61. }