1 /* 2 * The contents of this file are subject to the terms 3 * of the Common Development and Distribution License 4 * (the License). You may not use this file except in 5 * compliance with the License. 6 * 7 * You can obtain a copy of the license at 8 * https://glassfish.dev.java.net/public/CDDLv1.0.html or 9 * glassfish/bootstrap/legal/CDDLv1.0.txt. 10 * See the License for the specific language governing 11 * permissions and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL 14 * Header Notice in each file and include the License file 15 * at glassfish/bootstrap/legal/CDDLv1.0.txt. 16 * If applicable, add the following below the CDDL Header, 17 * with the fields enclosed by brackets [] replaced by 18 * you own identifying information: 19 * "Portions Copyrighted [year] [name of copyright owner]" 20 * 21 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 22 */ 23 24 package javax.resource.spi; 25 26 /** <p>The ConnectionRequestInfo interface enables a resource adapter to 27 * pass its own request specific data structure across the connection 28 * request flow. A resource adapter extends the empty interface to 29 * supports its own data structures for connection request. 30 * 31 * <p>A typical use allows a resource adapter to handle 32 * application component specified per-connection request properties 33 * (example - client ID, language). The application server passes these 34 * properties back across to match/createManagedConnection calls on 35 * the resource adapter. These properties remain opaque to the 36 * application server during the connection request flow. 37 * 38 * <p>Once the ConnectionRequestInfo reaches match/createManagedConnection 39 * methods on the ManagedConnectionFactory instance, resource adapter 40 * uses this additional per-request information to do connection 41 * creation and matching. 42 * 43 * @version 0.8 44 * @author Rahul Sharma 45 * @see javax.resource.spi.ManagedConnectionFactory 46 * @see javax.resource.spi.ManagedConnection 47 **/ 48 49 public interface ConnectionRequestInfo { 50 51 /** Checks whether this instance is equal to another. Since 52 * connectionRequestInfo is defined specific to a resource 53 * adapter, the resource adapter is required to implement 54 * this method. The conditions for equality are specific 55 * to the resource adapter. 56 * 57 * @return True if the two instances are equal. 58 **/ 59 public 60 boolean equals(Object other); 61 62 /** Returns the hashCode of the ConnectionRequestInfo. 63 * 64 * @return hash code os this instance 65 **/ 66 public 67 int hashCode(); 68 69 70 } 71