01: /*
02: * The contents of this file are subject to the Mozilla Public License
03: * Version 1.1 (the "License"); you may not use this file except in
04: * compliance with the License. You may obtain a copy of the License at
05: * http://www.mozilla.org/MPL/
06: *
07: * Software distributed under the License is distributed on an "AS IS"
08: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
09: * License for the specific language governing rights and limitations
10: * under the License.
11: *
12: * The Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
13: *
14: * The Initial Developer of the Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
15: * Portions created by Mark A. Kobold are Copyright (C) 2000-2007. All Rights Reserved.
16: *
17: * Contributor(s):
18: * Mark A. Kobold [mkobold <at> isqlviewer <dot> com].
19: *
20: * If you didn't download this code from the following link, you should check
21: * if you aren't using an obsolete version: http://www.isqlviewer.com
22: */
23: package org.isqlviewer.sql;
24:
25: import java.sql.Connection;
26: import java.sql.SQLException;
27:
28: /**
29: * Native/Platform hook for providing registration information for iSQL-Viewer to the connection.
30: * <p>
31: * This is generally how the application identifies it's session with the database. For example with Oracle applications
32: * will often update DBMS_APPLICATION_INFO setting various information identifying connections. However this allows
33: * other platforms to be defined at a later date as I personally only know about how to do it with Oracle.
34: *
35: * @author Mark A. Kobold <mkobold at isqlviewer dot com>
36: * @version 1.0
37: */
38: public interface PlatformRegistrar {
39:
40: /**
41: * Registers this connection using platform specific things.
42: * <p>
43: * Please note that this connection is an unadulterated connection, it will not be an instance of the connection
44: * wrapper that is defined by this package this is to allow type casting and so forth for easier registration.
45: *
46: * @param nativeConnection to register iSQL-Viewer session to the underlying connection.
47: * @return <tt>true</tt> if the registration succeeded, false otherwise not.
48: * @throws SQLException if the registration fails as a result of registering the session.
49: */
50: public boolean register(Connection nativeConnection)
51: throws SQLException;
52:
53: }
|