Top Description Fields Constructors Methods
org.apache.derby.impl.tools.ij

pack-priv Class ConnectionEnv

extends Object
Class Inheritance
Imports
java.io.File, .FileNotFoundException, java.lang.reflect.InvocationTargetException, java.util.Hashtable, .Enumeration, .Properties, java.sql.Connection, .DriverManager, .SQLException, org.apache.derby.tools.JDBCDisplayUtil, org.apache.derby.iapi.tools.i18n.LocalizedOutput

To enable multi-user use of ij.Main2

Field Summary

Modifier and TypeField and Description
private static final String
private Session
private boolean
private String
pack-priv Hashtable<String, Session>
private String

Constructor Summary

AccessConstructor and Description
pack-priv
ConnectionEnv(int userNumber, boolean printUserNumber, boolean theOnly)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addSession(Connection conn, String name)

Making a new connection, add it to the pool, and make it current.

pack-priv void
doPrompt(boolean newStatement, LocalizedOutput out)

pack-priv Connection
pack-priv Session
pack-priv Session
pack-priv Hashtable<String, Session>
public String
pack-priv boolean
pack-priv void
init(LocalizedOutput out)

separate from the constructor so that connection failure does not prevent object creation.

private void
pack-priv void
pack-priv void
pack-priv void
pack-priv Session
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONNECTION_PROPERTYback to summary
private static final String CONNECTION_PROPERTY
currSessionback to summary
private Session currSession
onlyback to summary
private boolean only
protocolback to summary
private String protocol
sessionsback to summary
pack-priv Hashtable<String, Session> sessions
tagback to summary
private String tag

Constructor Detail

ConnectionEnvback to summary
pack-priv ConnectionEnv(int userNumber, boolean printUserNumber, boolean theOnly)

Method Detail

addSessionback to summary
pack-priv void addSession(Connection conn, String name)

Making a new connection, add it to the pool, and make it current.

doPromptback to summary
pack-priv void doPrompt(boolean newStatement, LocalizedOutput out)
getConnectionback to summary
pack-priv Connection getConnection()
getSessionback to summary
pack-priv Session getSession()
getSessionback to summary
pack-priv Session getSession(String name)
getSessionsback to summary
pack-priv Hashtable<String, Session> getSessions()
getUniqueConnectionNameback to summary
public String getUniqueConnectionName()
haveSessionback to summary
pack-priv boolean haveSession(String name)
initback to summary
pack-priv void init(LocalizedOutput out) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException

separate from the constructor so that connection failure does not prevent object creation.

installConnectionback to summary
private void installConnection(String name, String value, LocalizedOutput out) throws SQLException
removeAllSessionsback to summary
pack-priv void removeAllSessions() throws SQLException
removeCurrentSessionback to summary
pack-priv void removeCurrentSession() throws SQLException
removeSessionback to summary
pack-priv void removeSession(String name) throws SQLException
setCurrentSessionback to summary
pack-priv Session setCurrentSession(String name)