KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > jca > ra > JERequestInfo


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: JERequestInfo.java,v 1.7 2006/10/30 21:14:18 bostic Exp $
7  */

8
9 package com.sleepycat.je.jca.ra;
10
11 import java.io.File JavaDoc;
12
13 import javax.resource.spi.ConnectionRequestInfo JavaDoc;
14
15 import com.sleepycat.je.EnvironmentConfig;
16 import com.sleepycat.je.TransactionConfig;
17
18 public class JERequestInfo implements ConnectionRequestInfo JavaDoc {
19     private File JavaDoc rootDir;
20     private EnvironmentConfig envConfig;
21     private TransactionConfig transConfig;
22    
23     public JERequestInfo(File JavaDoc rootDir,
24              EnvironmentConfig envConfig,
25              TransactionConfig transConfig) {
26     this.rootDir = rootDir;
27     this.envConfig = envConfig;
28     this.transConfig = transConfig;
29     }
30
31     File JavaDoc getJERootDir() {
32     return rootDir;
33     }
34
35     EnvironmentConfig getEnvConfig() {
36     return envConfig;
37     }
38
39     TransactionConfig getTransactionConfig() {
40     return transConfig;
41     }
42
43     public boolean equals(Object JavaDoc obj) {
44     JERequestInfo info = (JERequestInfo) obj;
45     return rootDir.equals(info.rootDir);
46     }
47
48     public int hashCode() {
49     return rootDir.hashCode();
50     }
51
52     public String JavaDoc toString() {
53     return "</JERequestInfo rootDir=" + rootDir.getAbsolutePath() + "/>";
54     }
55 }
56
Popular Tags