Mercurial > dive4elements > gnv-client
comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEConnection.java @ 885:1c3efbd2fc5a
Removes trailing whitespace.
geo-backend/trunk@850 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 07:49:16 +0000 |
parents | 12f88239fb33 |
children | 8b442223741c |
comparison
equal
deleted
inserted
replaced
884:12f88239fb33 | 885:1c3efbd2fc5a |
---|---|
28 | 28 |
29 import de.intevation.gnv.geobackend.base.connectionpool.exception.ConnectionException; | 29 import de.intevation.gnv.geobackend.base.connectionpool.exception.ConnectionException; |
30 import de.intevation.gnv.geobackend.sde.connectionpool.ArcSDEPoolableObjectFactory; | 30 import de.intevation.gnv.geobackend.sde.connectionpool.ArcSDEPoolableObjectFactory; |
31 | 31 |
32 /** | 32 /** |
33 * Wrapperclass between an @see java.sql.Connection and an | 33 * Wrapperclass between an @see java.sql.Connection and an |
34 * @see com.esri.sde.sdk.client.SeConnection | 34 * @see com.esri.sde.sdk.client.SeConnection |
35 * @author Tim Englich <tim.englich@intevation.de> | 35 * @author Tim Englich <tim.englich@intevation.de> |
36 */ | 36 */ |
37 public class ArcSDEConnection implements Connection { | 37 public class ArcSDEConnection implements Connection { |
38 | 38 |
39 /** | 39 /** |
40 * the logger, used to log exceptions and additonaly information | 40 * the logger, used to log exceptions and additonaly information |
41 */ | 41 */ |
42 private static Logger log = Logger.getLogger(ArcSDEPoolableObjectFactory.class); | 42 private static Logger log = Logger.getLogger(ArcSDEPoolableObjectFactory.class); |
43 | 43 |
44 /** | 44 /** |
45 * The Connection to the ArcSDE-backend. | 45 * The Connection to the ArcSDE-backend. |
46 */ | 46 */ |
47 private SeConnection seConnection = null; | 47 private SeConnection seConnection = null; |
48 /** | 48 /** |
49 * Time that have to be gone until the Server will be requested if | 49 * Time that have to be gone until the Server will be requested if |
50 * the Connection is valid. | 50 * the Connection is valid. |
51 */ | 51 */ |
52 private long serverRoundtripInterval ; | 52 private long serverRoundtripInterval ; |
53 | 53 |
54 /** | 54 /** |
55 * The Time which a Connection can be inactive until the Connection | 55 * The Time which a Connection can be inactive until the Connection |
56 * will be set to invalid. | 56 * will be set to invalid. |
57 */ | 57 */ |
58 private long inactiveInterval; | 58 private long inactiveInterval; |
59 | 59 |
60 /** | 60 /** |
61 * The TimeStamp of the last usage of this Connection. | 61 * The TimeStamp of the last usage of this Connection. |
62 */ | 62 */ |
63 private long lastTouch; | 63 private long lastTouch; |
64 | 64 |
65 | 65 |
66 /** | 66 /** |
67 * Constructor | 67 * Constructor |
68 * @param server the URL to the Server | 68 * @param server the URL to the Server |
69 * @param port the Port of the Server | 69 * @param port the Port of the Server |
79 public ArcSDEConnection( | 79 public ArcSDEConnection( |
80 String server, | 80 String server, |
81 String port, | 81 String port, |
82 String database, | 82 String database, |
83 String username, | 83 String username, |
84 String credentials, | 84 String credentials, |
85 long serverRoundtripInterval, | 85 long serverRoundtripInterval, |
86 long inactiveInterval | 86 long inactiveInterval |
87 ) | 87 ) |
88 throws ConnectionException | 88 throws ConnectionException |
89 { | 89 { |
90 this.serverRoundtripInterval = serverRoundtripInterval; | 90 this.serverRoundtripInterval = serverRoundtripInterval; |
91 this.inactiveInterval = inactiveInterval; | 91 this.inactiveInterval = inactiveInterval; |
92 lastTouch = System.currentTimeMillis(); | 92 lastTouch = System.currentTimeMillis(); |
400 /** | 400 /** |
401 * @see java.sql.Connection#setTypeMap(java.util.Map) | 401 * @see java.sql.Connection#setTypeMap(java.util.Map) |
402 */ | 402 */ |
403 public void setTypeMap(Map<String, Class<?>> map) throws SQLException { | 403 public void setTypeMap(Map<String, Class<?>> map) throws SQLException { |
404 } | 404 } |
405 | 405 |
406 /** | 406 /** |
407 * @return the seConnection | 407 * @return the seConnection |
408 */ | 408 */ |
409 public SeConnection getSeConnection() { | 409 public SeConnection getSeConnection() { |
410 return seConnection; | 410 return seConnection; |
448 this.seConnection.testServer(serverRoundtripInterval); | 448 this.seConnection.testServer(serverRoundtripInterval); |
449 } catch (SeException e) { | 449 } catch (SeException e) { |
450 log.debug("The validation of the Connection has occured an Error. The connection is invalid."); | 450 log.debug("The validation of the Connection has occured an Error. The connection is invalid."); |
451 valid = false; | 451 valid = false; |
452 } | 452 } |
453 | 453 |
454 return valid; | 454 return valid; |
455 } | 455 } |
456 | 456 |
457 public void setClientInfo(Properties arg0) throws SQLClientInfoException { | 457 public void setClientInfo(Properties arg0) throws SQLClientInfoException { |
458 } | 458 } |