1. /*
  2. * @(#)ObjectKeyTemplate.java 1.12 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.spi.ior;
  8. import org.omg.CORBA_2_3.portable.OutputStream ;
  9. import com.sun.corba.se.spi.orb.ORBVersion ;
  10. import com.sun.corba.se.spi.orb.ORB ;
  11. import com.sun.corba.se.spi.protocol.CorbaServerRequestDispatcher ;
  12. /** An ObjectKeyTemplate represents the part of an Object Key
  13. * that corresponds to the object adapter used to create an
  14. * object reference. The template is shared between many
  15. * object references.
  16. */
  17. public interface ObjectKeyTemplate extends Writeable
  18. {
  19. public ORBVersion getORBVersion() ;
  20. /** An ID used to determine how to perform operations on this
  21. * ObjectKeyTemplate. This id determines how to process requests
  22. * on this object reference, and what object adapter type to use.
  23. */
  24. public int getSubcontractId();
  25. /** Return the server ID for this template.
  26. * For CORBA 3.0, this should be a String, but it is currently
  27. * an int in the object key template.
  28. */
  29. public int getServerId() ;
  30. /** Return the ORB ID for this template.
  31. */
  32. public String getORBId() ;
  33. /** Return the object adapter ID for this template.
  34. */
  35. public ObjectAdapterId getObjectAdapterId() ;
  36. /** Compute an adapter ID for this template than includes
  37. * all of the template information.
  38. * This value is cached to avoid the expense of recomputing
  39. * it.
  40. */
  41. public byte[] getAdapterId() ;
  42. public void write(ObjectId objectId, OutputStream os);
  43. public CorbaServerRequestDispatcher getServerRequestDispatcher( ORB orb, ObjectId id ) ;
  44. }