|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
net.agmodel.brokerImpl.GenericBrokerImpl
An generic broker implementation which maintains a list of the user's active connections
| Nested Class Summary | |
class |
GenericBrokerImpl.DBCheckAndUpdate
|
| Field Summary |
| Fields inherited from interface net.agmodel.genericBroker.GenericBrokerRMI |
EMAIL, HOSTPARAMEXTENSION, NOLOGIN, PASSWORD |
| Fields inherited from interface net.agmodel.genericBroker.ServerRMI |
EXISTINGUSER, NEWUSER, SUPERUSER |
| Constructor Summary | |
GenericBrokerImpl()
|
|
| Method Summary | |
boolean |
alreadyLoggedIn(String sessionID,
String sourceID)
Check whether any required connection to the specified database has already been established. |
void |
cleanup()
|
void |
DBMonitor()
|
void |
disconnect(String sessionName)
Deletes the session for this client. |
void |
enter(String methodname,
String sessionName)
Print Method entry info if tracing |
void |
exit(String methodname,
String sessionName)
Print Method exiting info if tracing |
DBAccessMechanism |
getAccess(String sessionID,
String sourceID)
|
String |
getConnection(String clientInfo,
String language)
Establishes a session for the client application. |
String |
getConnection(String clientInfo,
String language,
String brokerUser,
String brokerPassword,
int userType)
Establishes a session for the client application. |
String |
getLanguage(String sessionID)
|
DataSourceDetail |
getSourceDetail(String sessionID,
String sourceID)
Gets details about a single data source. |
GeographicalArea |
getSourceGeographicalArea(String sessionID,
String sourceID)
|
String |
getSourceID(String sessionID,
String language,
String sourceName)
Get the ID of a data source using its name in a particular language. |
GenericSourceImpl |
getSourceImplAndRecordUse(String sourceID,
String sessionID)
|
int |
getSourceLoginRequirements(String sessionID,
String sourceID)
|
String |
getSourceName(String sessionID,
String sourceID)
|
String[] |
listDataSources(String sessionID)
|
String[] |
listDataSources(String sessionID,
GeographicalArea ofInterest)
|
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 |
logMessage(String message)
|
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 |
void |
setDBNames(String resServerRMIHost,
String resServerHTTPHost,
int resServerHTTPport,
String filesetID)
Loads names for the data sources from ResourceServer |
void |
shutdown(String clientinfo)
Terminates all the client sessions. |
void |
start()
start or restart Timer if the Task is null,creat the Task and set the Timer, keep status before and put the object to Task |
void |
stop()
Stop the Timer |
static void |
wait10()
|
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GenericBrokerImpl()
throws RemoteException
| Method Detail |
public void setDBNames(String resServerRMIHost,
String resServerHTTPHost,
int resServerHTTPport,
String filesetID)
resServerRMIHost - the address of the ResourceServer hostresServerHTTPHost - the address of a wrapper servlet (Not used yet)resServerHTTPport - the port on which the wrapper servlet is listening (Not used yet)filesetID - the ResourceServer fileset in which to search for the databaseIDs.
public DBAccessMechanism getAccess(String sessionID,
String sourceID)
public void DBMonitor()
public void start()
public void stop()
public static void wait10()
public void enter(String methodname,
String sessionName)
public void exit(String methodname,
String sessionName)
public DataSourceDetail[] listSourceDetails(String sessionID)
throws RemoteException,
GeneralException
GenericBrokerRMI
listSourceDetails in interface GenericBrokerRMIsessionID - the ID returned by getConnection
RemoteException
GeneralException
public DataSourceDetail[] listSourceDetails(String sessionID,
GeographicalArea ofInterest)
throws RemoteException,
GeneralException
GenericBrokerRMI
listSourceDetails in interface GenericBrokerRMIsessionID - the ID returned by getConnectionofInterest - the area from which data is required
RemoteException
GeneralException
public String getSourceID(String sessionID,
String language,
String sourceName)
throws RemoteException,
GeneralException
GenericBrokerRMI
getSourceID in interface GenericBrokerRMIsessionID - 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 String[] listDataSources(String sessionID)
throws RemoteException,
GeneralException
RemoteException
GeneralException
public String[] listDataSources(String sessionID,
GeographicalArea ofInterest)
throws RemoteException,
GeneralException
RemoteException
GeneralException
public boolean loginToDataSource(String sessionID,
String sourceID,
String usercode,
String password)
throws RemoteException,
GeneralException
GenericBrokerRMI
loginToDataSource in interface GenericBrokerRMIsessionID - 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
GeneralExceptionGenericBrokerRMI.getSourceDetail(String,String)
public boolean loginToDataSource(String sessionID,
String sourceID,
String emailAddress)
throws RemoteException,
GeneralException
GenericBrokerRMI
loginToDataSource in interface GenericBrokerRMIsessionID - the ID returned by getConnectionsourceID - the identifier assigned to the source by the broker - see listSourceDetailsemailAddress - the user's e-mail address
RemoteException
GeneralExceptionGenericBrokerRMI.getSourceDetail(String,String)
public boolean loginToDataSource(String sessionID,
String sourceID)
throws RemoteException,
GeneralException
GenericBrokerRMI
loginToDataSource in interface GenericBrokerRMIsessionID - the ID returned by getConnectionsourceID - the identifier assigned to the source by the broker - see listSourceDetails
RemoteException
GeneralExceptionGenericBrokerRMI.getSourceDetail(String,String)
public boolean alreadyLoggedIn(String sessionID,
String sourceID)
throws RemoteException
GenericBrokerRMI
alreadyLoggedIn in interface GenericBrokerRMIsessionID - 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
GenericBrokerRMI
logOutOfSource in interface GenericBrokerRMIsessionID - the ID returned by getConnectionsourceID - the identifier assigned to the source by the broker
RemoteException
public void logOutOfAllSources(String sessionID)
throws RemoteException
GenericBrokerRMI
logOutOfAllSources in interface GenericBrokerRMIsessionID - the ID returned by getConnection
RemoteException
public GenericSourceImpl getSourceImplAndRecordUse(String sourceID,
String sessionID)
public DataSourceDetail getSourceDetail(String sessionID,
String sourceID)
throws RemoteException
GenericBrokerRMI
getSourceDetail in interface GenericBrokerRMIsessionID - the ID returned by getConnection
RemoteException
public String getSourceName(String sessionID,
String sourceID)
throws RemoteException
RemoteException
public GeographicalArea getSourceGeographicalArea(String sessionID,
String sourceID)
throws RemoteException
RemoteException
public int getSourceLoginRequirements(String sessionID,
String sourceID)
throws RemoteException
RemoteExceptionpublic String getLanguage(String sessionID)
public String getConnection(String clientInfo,
String language)
throws RemoteException,
GeneralException
ServerRMI
getConnection in interface ServerRMIclientInfo - the client application name (useful for debugging)language - the language to use for the session (eg for station names)
RemoteException
GeneralException
public String getConnection(String clientInfo,
String language,
String brokerUser,
String brokerPassword,
int userType)
throws RemoteException
ServerRMI
getConnection in interface ServerRMIclientInfo - the client application name (useful for debugging)language - the language to use for the session (eg for station names)brokerUser - the username for the brokerbrokerPassword - the password for the brokeruserType - a constant indicating the kind of user (eg NEWUSER or EXISTINGUSER)
RemoteException
public void disconnect(String sessionName)
throws RemoteException
disconnect in interface ServerRMIsessionName - the ID returned by getConnection
RemoteExceptionpublic void logMessage(String message)
public void shutdown(String clientinfo)
throws RemoteException
RemoteExceptionpublic void cleanup()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||