net.agmodel.brokerImpl
Class GenericContext

java.lang.Object
  extended bynet.agmodel.brokerImpl.GenericContext
Direct Known Subclasses:
MetBrokerContext

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.

Version:
1.0
Author:
Matthew Laurenson

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
equals, 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.


Copyright (C) NARC 2001 All Rights Reserved.