Interface DBConnection


public interface DBConnection

Database Connection Inteface between Server and Database

Category: Baseline

Inherits from:

Client:


Method Summary
 int GetConnection(int serverId, int userId)
          Authenticates the user into the File Server database [Category: Baseline] [Clients: ]
 boolean RelaseConnection(int serverId, int conId)
          Relase the connection between Server and Database [Category: Baseline] [Clients: ]
 

Method Detail

GetConnection

public int GetConnection(int serverId,
                         int userId)
Authenticates the user into the File Server database [Category: Baseline] [Clients: ]

Parameters:
serverId - the identification of a server
userId - the identification of a user who requests for authentication
Returns:
the identification of the connection
Throws:
LimitedConnection - if the number of connections from server to database excesses a limit
InvalidServerId - if serverId is not valid
AuthenticationDuplicated - if a user has already log in.
ConnectionFail - if database connection is closed in transaction

RelaseConnection

public boolean RelaseConnection(int serverId,
                                int conId)
Relase the connection between Server and Database [Category: Baseline] [Clients: ]

Parameters:
serverId - the identification of a server which has a connection to database
conId - the identification of a connection between Server and Database
Returns:
true if the relase is completed
Throws:
NoSuchConnection - if there is no such connection
InvalidServerId - if serverId is not valid