org.apache.derby.impl.tools.ij
Class ConnectionEnv

java.lang.Object
  extended byorg.apache.derby.impl.tools.ij.ConnectionEnv

class ConnectionEnv
extends java.lang.Object

To enable multi-user use of ij.Main2

Author:
jerry

Field Summary
private static java.lang.String CONNECTION_PROPERTY
           
private  Session currSession
           
private  boolean only
           
private  java.lang.String protocol
           
(package private)  java.util.Hashtable sessions
           
private  java.lang.String tag
           
 
Constructor Summary
(package private) ConnectionEnv(int userNumber, boolean printUserNumber, boolean theOnly)
           
 
Method Summary
(package private)  void addSession(java.sql.Connection conn, java.lang.String name)
          Making a new connection, add it to the pool, and make it current.
(package private)  void doPrompt(boolean newStatement, LocalizedOutput out)
           
(package private)  java.sql.Connection getConnection()
           
(package private)  Session getSession()
           
(package private)  java.util.Hashtable getSessions()
           
 java.lang.String getUniqueConnectionName()
           
(package private)  boolean haveSession(java.lang.String name)
           
(package private)  void init(LocalizedOutput out)
          separate from the constructor so that connection failure does not prevent object creation.
private  void installConnection(java.lang.String name, java.lang.String value, LocalizedOutput out)
           
(package private)  void removeAllSessions()
           
(package private)  void removeCurrentSession()
           
(package private)  void removeSession(java.lang.String name)
           
(package private)  Session setCurrentSession(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessions

java.util.Hashtable 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
Constructor Detail

ConnectionEnv

ConnectionEnv(int userNumber,
              boolean printUserNumber,
              boolean theOnly)
Method Detail

init

void init(LocalizedOutput out)
    throws java.sql.SQLException,
           java.lang.ClassNotFoundException,
           java.lang.InstantiationException,
           java.lang.IllegalAccessException
separate from the constructor so that connection failure does not prevent object creation.

Throws:
java.sql.SQLException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

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 getSessions()

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

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.