1. package org.omg.PortableInterceptor;
  2. /**
  3. * org/omg/PortableInterceptor/ServerIdHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
  6. * Wednesday, September 15, 2004 10:28:46 AM GMT
  7. */
  8. // Should be type string
  9. abstract public class ServerIdHelper
  10. {
  11. private static String _id = "IDL:omg.org/PortableInterceptor/ServerId:1.0";
  12. public static void insert (org.omg.CORBA.Any a, String that)
  13. {
  14. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  15. a.type (type ());
  16. write (out, that);
  17. a.read_value (out.create_input_stream (), type ());
  18. }
  19. public static String extract (org.omg.CORBA.Any a)
  20. {
  21. return read (a.create_input_stream ());
  22. }
  23. private static org.omg.CORBA.TypeCode __typeCode = null;
  24. synchronized public static org.omg.CORBA.TypeCode type ()
  25. {
  26. if (__typeCode == null)
  27. {
  28. __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0);
  29. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.ServerIdHelper.id (), "ServerId", __typeCode);
  30. }
  31. return __typeCode;
  32. }
  33. public static String id ()
  34. {
  35. return _id;
  36. }
  37. public static String read (org.omg.CORBA.portable.InputStream istream)
  38. {
  39. String value = null;
  40. value = istream.read_string ();
  41. return value;
  42. }
  43. public static void write (org.omg.CORBA.portable.OutputStream ostream, String value)
  44. {
  45. ostream.write_string (value);
  46. }
  47. }