KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > resource > spi > ManagedConnectionMetaData


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 import javax.resource.ResourceException JavaDoc;
27
28 /** The ManagedConnectionMetaData interface provides information about the
29  * underlying EIS instance associated with a ManagedConnection instance.
30  * An application server uses this information to get runtime information
31  * about a connected EIS instance.
32  *
33  * <p>The method ManagedConnection.getMetaData returns a
34  * ManagedConnectionMetaData instance.
35  *
36  * @version 0.8
37  * @author Rahul Sharma
38  * @see javax.resource.spi.ManagedConnection
39 **/

40
41 public interface ManagedConnectionMetaData {
42
43   /** Returns Product name of the underlying EIS instance connected
44    * through the ManagedConnection.
45    *
46    * @return Product name of the EIS instance.
47   **/

48   public
49   String JavaDoc getEISProductName() throws ResourceException JavaDoc;
50
51   /** Returns product version of the underlying EIS instance connected
52    * through the ManagedConnection.
53    *
54    * @return Product version of the EIS instance
55   **/

56   public
57   String JavaDoc getEISProductVersion() throws ResourceException JavaDoc;
58
59   /** Returns maximum limit on number of active concurrent connections
60    * that an EIS instance can support across client processes. If an EIS
61    * instance does not know about (or does not have) any such limit, it
62    * returns a 0.
63    *
64    * @return Maximum limit for number of active concurrent connections
65   **/

66   public
67   int getMaxConnections() throws ResourceException JavaDoc;
68   
69   /** Returns name of the user associated with the ManagedConnection
70    * instance. The name corresponds to the resource principal under whose
71    * whose security context, a connection to the EIS instance has been
72    * established.
73    *
74    * @return name of the user
75   **/

76   public
77   String JavaDoc getUserName() throws ResourceException JavaDoc;
78 }
79
Popular Tags