1. /*
  2. * @(#)Referenceable.java 1.7 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 javax.naming;
  8. /**
  9. * This interface is implemented by an object that can provide a
  10. * Reference to itself.
  11. *<p>
  12. * A Reference represents a way of recording address information about
  13. * objects which themselves are not directly bound to the naming system.
  14. * Such objects can implement the Referenceable interface as a way
  15. * for programs that use that object to determine what its Reference is.
  16. * For example, when binding a object, if an object implements the
  17. * Referenceable interface, getReference() can be invoked on the object to
  18. * get its Reference to use for binding.
  19. *
  20. * @author Rosanna Lee
  21. * @author Scott Seligman
  22. * @author R. Vasudevan
  23. * @version 1.7 03/12/19
  24. *
  25. * @see Context#bind
  26. * @see javax.naming.spi.NamingManager#getObjectInstance
  27. * @see Reference
  28. * @since 1.3
  29. */
  30. public interface Referenceable {
  31. /**
  32. * Retrieves the Reference of this object.
  33. *
  34. * @return The non-null Reference of this object.
  35. * @exception NamingException If a naming exception was encountered
  36. * while retrieving the reference.
  37. */
  38. Reference getReference() throws NamingException;
  39. }