|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An extension of ServerRMI which adds the functionality common to all brokers (a broker provides a consistent interface to multiple databases).
The common functionality includes getting lists of linked databases, and logging the user into and out of a particular database.
Typically a client establishes a Broker session through a call to ServerRMI.getConnection(String,String).
The sessionID received back is used to identify the user subsequently.
| Field Summary | |
static int |
EMAIL
The database requires the users e-mail address (eg for anonymous FTP) |
static String |
HOSTPARAMEXTENSION
The extension used by subclasses when generating the name of the parameter for the RMI host name |
static int |
NOLOGIN
The database (typically a web site) doesn't require any user details for accesss |
static int |
PASSWORD
The database requires a user code and password |
| Fields inherited from interface net.agmodel.genericBroker.ServerRMI |
EXISTINGUSER, NEWUSER, SUPERUSER |
| Method Summary | |
boolean |
alreadyLoggedIn(String sessionID,
String sourceID)
Check whether any required connection to the specified database has already been established. |
DataSourceDetail |
getSourceDetail(String sessionID,
String dataSourceID)
Gets details about a single data source. |
String |
getSourceID(String sessionID,
String language,
String sourceName)
Get the ID of a data source using its name in a particular language. |
DataSourceDetail[] |
listSourceDetails(String sessionID)
Get the details for all the data sources in the broker. |
DataSourceDetail[] |
listSourceDetails(String sessionID,
GeographicalArea ofInterest)
Get the details of the data sources in the broker that coincide with the area specified. |
boolean |
loginToDataSource(String sessionID,
String sourceID)
Establish a connection to the specified database without identifying the user in any way |
boolean |
loginToDataSource(String sessionID,
String sourceID,
String emailAddress)
Establish a connection to the specified database using the e-mail address supplied as identification. |
boolean |
loginToDataSource(String sessionID,
String sourceID,
String usercode,
String password)
Establish a connection to the specified database using the usercode and password supplied |
void |
logOutOfAllSources(String sessionID)
Log out from any data sources to which the client is currently logged in. |
void |
logOutOfSource(String sessionID,
String sourceID)
Log out from the data source identified by the sourceID |
| Methods inherited from interface net.agmodel.genericBroker.ServerRMI |
disconnect, getConnection, getConnection |
| Field Detail |
public static final int NOLOGIN
public static final int EMAIL
public static final int PASSWORD
public static final String HOSTPARAMEXTENSION
| Method Detail |
public DataSourceDetail[] listSourceDetails(String sessionID)
throws RemoteException,
GeneralException
sessionID - the ID returned by getConnection
RemoteException
GeneralException
public DataSourceDetail[] listSourceDetails(String sessionID,
GeographicalArea ofInterest)
throws RemoteException,
GeneralException
sessionID - the ID returned by getConnectionofInterest - the area from which data is required
RemoteException
GeneralException
public DataSourceDetail getSourceDetail(String sessionID,
String dataSourceID)
throws RemoteException
sessionID - the ID returned by getConnection
IllegalArgumentException - if the data source ID is not known
RemoteException
public String getSourceID(String sessionID,
String language,
String sourceName)
throws RemoteException,
GeneralException
sessionID - the ID returned by getConnectionsourceName - the name of the source (in the language specified)language - the language of the name using ISO standard language codes
RemoteException
GeneralException
public boolean loginToDataSource(String sessionID,
String sourceID,
String usercode,
String password)
throws RemoteException,
GeneralException
sessionID - the ID returned by getConnectionsourceID - the identifier assigned to the source by the broker - see listSourceDetailsusercode - a valid usercode on the sourcepassword - the corresponding password (warning - may be transmitted without encryption)
RemoteException
GeneralExceptiongetSourceDetail(String,String)
public boolean loginToDataSource(String sessionID,
String sourceID,
String emailAddress)
throws RemoteException,
GeneralException
sessionID - the ID returned by getConnectionsourceID - the identifier assigned to the source by the broker - see listSourceDetailsemailAddress - the user's e-mail address
RemoteException
GeneralExceptiongetSourceDetail(String,String)
public boolean loginToDataSource(String sessionID,
String sourceID)
throws RemoteException,
GeneralException
sessionID - the ID returned by getConnectionsourceID - the identifier assigned to the source by the broker - see listSourceDetails
RemoteException
GeneralExceptiongetSourceDetail(String,String)
public boolean alreadyLoggedIn(String sessionID,
String sourceID)
throws RemoteException
sessionID - the ID returned by getConnectionsourceID - the identifier assigned to the source by the broker - see listSourceDetails
RemoteException
public void logOutOfSource(String sessionID,
String sourceID)
throws RemoteException
sessionID - the ID returned by getConnectionsourceID - the identifier assigned to the source by the broker
RemoteException
public void logOutOfAllSources(String sessionID)
throws RemoteException
sessionID - the ID returned by getConnection
RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||