1. package org.omg.PortableInterceptor;
  2. /**
  3. * org/omg/PortableInterceptor/AdapterManagerIdHelper.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. /** Adapter manager identifier. Every object adapter has an adapter manager,
  9. * indicated in this API only through the ID. A group of object adapter
  10. * instances may share the same adapter manager, in which case state transitions
  11. * reported for the adapter manager are observed by all object adapters with the
  12. * same adapter manager ID.
  13. */
  14. abstract public class AdapterManagerIdHelper
  15. {
  16. private static String _id = "IDL:omg.org/PortableInterceptor/AdapterManagerId:1.0";
  17. public static void insert (org.omg.CORBA.Any a, int that)
  18. {
  19. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  20. a.type (type ());
  21. write (out, that);
  22. a.read_value (out.create_input_stream (), type ());
  23. }
  24. public static int extract (org.omg.CORBA.Any a)
  25. {
  26. return read (a.create_input_stream ());
  27. }
  28. private static org.omg.CORBA.TypeCode __typeCode = null;
  29. synchronized public static org.omg.CORBA.TypeCode type ()
  30. {
  31. if (__typeCode == null)
  32. {
  33. __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
  34. __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.AdapterManagerIdHelper.id (), "AdapterManagerId", __typeCode);
  35. }
  36. return __typeCode;
  37. }
  38. public static String id ()
  39. {
  40. return _id;
  41. }
  42. public static int read (org.omg.CORBA.portable.InputStream istream)
  43. {
  44. int value = (int)0;
  45. value = istream.read_long ();
  46. return value;
  47. }
  48. public static void write (org.omg.CORBA.portable.OutputStream ostream, int value)
  49. {
  50. ostream.write_long (value);
  51. }
  52. }