Package org.apache.derby.impl.tools.ij
Class ConnectionEnv
- java.lang.Object
-
- org.apache.derby.impl.tools.ij.ConnectionEnv
-
class ConnectionEnv extends java.lang.ObjectTo enable multi-user use of ij.Main2
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCONNECTION_PROPERTYprivate SessioncurrSessionprivate booleanonlyprivate java.lang.Stringprotocol(package private) java.util.Hashtable<java.lang.String,Session>sessionsprivate java.lang.Stringtag
-
Constructor Summary
Constructors Constructor Description ConnectionEnv(int userNumber, boolean printUserNumber, boolean theOnly)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidaddSession(java.sql.Connection conn, java.lang.String name)Making a new connection, add it to the pool, and make it current.(package private) voiddoPrompt(boolean newStatement, LocalizedOutput out)(package private) java.sql.ConnectiongetConnection()(package private) SessiongetSession()(package private) SessiongetSession(java.lang.String name)(package private) java.util.Hashtable<java.lang.String,Session>getSessions()java.lang.StringgetUniqueConnectionName()(package private) booleanhaveSession(java.lang.String name)(package private) voidinit(LocalizedOutput out)separate from the constructor so that connection failure does not prevent object creation.private voidinstallConnection(java.lang.String name, java.lang.String value, LocalizedOutput out)(package private) voidremoveAllSessions()(package private) voidremoveCurrentSession()(package private) voidremoveSession(java.lang.String name)(package private) SessionsetCurrentSession(java.lang.String name)
-
-
-
Field Detail
-
sessions
java.util.Hashtable<java.lang.String,Session> sessions
-
currSession
private Session currSession
-
tag
private java.lang.String tag
-
only
private boolean only
-
CONNECTION_PROPERTY
private static final java.lang.String CONNECTION_PROPERTY
- See Also:
- Constant Field Values
-
protocol
private java.lang.String protocol
-
-
Method Detail
-
init
void init(LocalizedOutput out) throws java.sql.SQLException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException
separate from the constructor so that connection failure does not prevent object creation.- Throws:
java.sql.SQLExceptionjava.lang.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.NoSuchMethodExceptionjava.lang.reflect.InvocationTargetException
-
doPrompt
void doPrompt(boolean newStatement, LocalizedOutput out)
-
getConnection
java.sql.Connection getConnection()
-
addSession
void addSession(java.sql.Connection conn, java.lang.String name)Making a new connection, add it to the pool, and make it current.
-
getUniqueConnectionName
public java.lang.String getUniqueConnectionName()
-
getSession
Session getSession()
-
getSessions
java.util.Hashtable<java.lang.String,Session> getSessions()
-
getSession
Session getSession(java.lang.String name)
-
setCurrentSession
Session setCurrentSession(java.lang.String name)
-
haveSession
boolean haveSession(java.lang.String name)
-
removeCurrentSession
void removeCurrentSession() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
removeSession
void removeSession(java.lang.String name) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
removeAllSessions
void removeAllSessions() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
installConnection
private void installConnection(java.lang.String name, java.lang.String value, LocalizedOutput out) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
-