net.agmodel.genericBroker
Class GenericContext

java.lang.Object
  |
  +--net.agmodel.genericBroker.GenericContext

public class GenericContext
extends Object

The Context class is used by brokers to maintain client-specific context. A Context object is instantiated for each new client-connection.


Constructor Summary
GenericContext(String c, String language, String sessionID)
           
 
Method Summary
 void addConnection(String sourceID, DBAccessMechanism connection)
           
 boolean dispose()
          Released database connections and links to MetSources held by the context.
 DBAccessMechanism getConnection(String sourceID)
           
 String getLanguage()
           
 long getMillisUnused()
           
 String getSessionID()
           
 boolean isConnectedTo(String sourceID)
           
 void recordUse()
           
 void removeConnection(String sourceID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericContext

public GenericContext(String c,
                      String language,
                      String sessionID)
Method Detail

getLanguage

public String getLanguage()

getSessionID

public String getSessionID()

addConnection

public void addConnection(String sourceID,
                          DBAccessMechanism connection)

removeConnection

public void removeConnection(String sourceID)

getConnection

public DBAccessMechanism getConnection(String sourceID)

isConnectedTo

public boolean isConnectedTo(String sourceID)

getMillisUnused

public long getMillisUnused()

recordUse

public void recordUse()

dispose

public boolean dispose()
Released database connections and links to MetSources held by the context. Normally called by disconnect(), but may also be called by SessionTerminator

Returns:
true if the session is disposed of normally, false if another thread is in the process of terminating the session.