Open SiteSearch 4.1.1
Final

ORG.oclc.db
Class Connections

java.lang.Object
  |
  +--ORG.oclc.db.Connections

public class Connections
extends Object

Connections manages shared connections between remote hosts and DbRemoteZ objects. There may be 1 shared connection per remote host or 1 shared connection per user per remote host.


Field Summary
static boolean One
          Value for PerUser flag on constructor.
static boolean OnePerUser
          Value for PerUser flag on constructor.
 
Method Summary
 boolean add(String sessionId, Object connection)
           
 boolean add(String sessionId, String autho, String password, Object connection)
          Associate a user with a connection object.
 Object get(String sessionId, String autho, String password)
          Get a connection object for this server.
static Connections getConnections(String serverName, int port, String host, boolean PerUser)
          Connections allows a user to share a connection to all the databases at a remote site or it allows all users to share a connection to all the databases at a remote site.
 boolean remove(String sessionId, String autho, String password)
          Un-associate a user from a connection object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OnePerUser

public static final boolean OnePerUser
Value for PerUser flag on constructor. true == one connection per user.

One

public static final boolean One
Value for PerUser flag on constructor. false == one connection per remote host.
Method Detail

getConnections

public static Connections getConnections(String serverName,
                                         int port,
                                         String host,
                                         boolean PerUser)
Connections allows a user to share a connection to all the databases at a remote site or it allows all users to share a connection to all the databases at a remote site.
Parameters:
serverName - the name of ther remote server from the configuration files.
port - for the remote server
host - for the remote server
PerUser - true == each user gets a private connection to the server. false == all users share a connection to the server.

get

public Object get(String sessionId,
                  String autho,
                  String password)
Get a connection object for this server.
Parameters:
sessionId - the user requesting the connection
Returns:
Object connection object

add

public boolean add(String sessionId,
                   Object connection)

add

public boolean add(String sessionId,
                   String autho,
                   String password,
                   Object connection)
Associate a user with a connection object.
Parameters:
sessionId - user identifier
autho - the authorization if applicable
password - the password if applicable
connection - object
Returns:
true if this is a new connection; false if the connection existed and the new user was added to it

remove

public boolean remove(String sessionId,
                      String autho,
                      String password)
Un-associate a user from a connection object.
Parameters:
sessionId - user identifier
Returns:
 

Open SiteSearch 4.1.1
Final