1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.resource.spi;
  6. /** <p>The ConnectionRequestInfo interface enables a resource adapter to
  7. * pass its own request specific data structure across the connection
  8. * request flow. A resource adapter extends the empty interface to
  9. * supports its own data structures for connection request.
  10. *
  11. * <p>A typical use allows a resource adapter to handle
  12. * application component specified per-connection request properties
  13. * (example - client ID, language). The application server passes these
  14. * properties back across to match/createManagedConnection calls on
  15. * the resource adapter. These properties remain opaque to the
  16. * application server during the connection request flow.
  17. *
  18. * <p>Once the ConnectionRequestInfo reaches match/createManagedConnection
  19. * methods on the ManagedConnectionFactory instance, resource adapter
  20. * uses this additional per-request information to do connection
  21. * creation and matching.
  22. *
  23. * @version 0.8
  24. * @author Rahul Sharma
  25. * @see javax.resource.spi.ManagedConnectionFactory
  26. * @see javax.resource.spi.ManagedConnection
  27. **/
  28. public interface ConnectionRequestInfo {
  29. /** Checks whether this instance is equal to another. Since
  30. * connectionRequestInfo is defined specific to a resource
  31. * adapter, the resource adapter is required to implement
  32. * this method. The conditions for equality are specific
  33. * to the resource adapter.
  34. *
  35. * @return True if the two instances are equal.
  36. **/
  37. public
  38. boolean equals(Object other);
  39. /** Returns the hashCode of the ConnectionRequestInfo.
  40. *
  41. * @return hash code os this instance
  42. **/
  43. public
  44. int hashCode();
  45. }