net.agmodel.genericBroker
Interface ServerRMI

All Superinterfaces:
Remote
All Known Subinterfaces:
ChizuBroker, DEMBroker, GenericBrokerRMI, MetBroker, ResourceEditor, ResourceSuper, ResourceTranslator, ResourceUser
All Known Implementing Classes:
GenericBrokerImpl

public interface ServerRMI
extends Remote

A high level abstraction of the functions provided by a session-oriented RMI-based server application. Primarily deals with connecting and disconnecting. Users can connect anonymously, or with a username and password. As a minimum, connecting client applications must identify themselves (for the purpose of logging) and indicate the user's preferred language.


Field Summary
static int EXISTINGUSER
          Use with getConnection to indicate that this user would like to be added as a new user.
static int NEWUSER
          Use with getConnection to indicate that this user would like to be added as a new user.
static int SUPERUSER
          Use with getConnection to request a server supervisor connection
 
Method Summary
 void disconnect(String sessionID)
          Disconnect from the broker
 String getConnection(String clientInfo, String language)
          Establishes a session for the client application.
 String getConnection(String clientInfo, String language, String serverUser, String serverPassword, int userType)
          Establishes a session for the client application.
 

Field Detail

NEWUSER

public static final int NEWUSER
Use with getConnection to indicate that this user would like to be added as a new user.

See Also:
Constant Field Values

EXISTINGUSER

public static final int EXISTINGUSER
Use with getConnection to indicate that this user would like to be added as a new user.

See Also:
Constant Field Values

SUPERUSER

public static final int SUPERUSER
Use with getConnection to request a server supervisor connection

See Also:
Constant Field Values
Method Detail

getConnection

public String getConnection(String clientInfo,
                            String language)
                     throws RemoteException,
                            GeneralException
Establishes a session for the client application.

Parameters:
clientInfo - the client application name (useful for debugging)
language - the language to use for the session (eg for station names)
Returns:
a sessionID.
RemoteException
GeneralException

getConnection

public String getConnection(String clientInfo,
                            String language,
                            String serverUser,
                            String serverPassword,
                            int userType)
                     throws RemoteException,
                            GeneralException
Establishes a session for the client application.

Parameters:
clientInfo - the client application name (useful for debugging)
language - the language to use for the session (eg for station names)
serverUser - the username for the broker
serverPassword - the password for the broker
userType - a constant indicating the kind of user (eg NEWUSER or EXISTINGUSER)
Returns:
a sessionID.
RemoteException
GeneralException

disconnect

public void disconnect(String sessionID)
                throws RemoteException
Disconnect from the broker

Parameters:
sessionID - the ID returned by getConnection
RemoteException