org.PingOO.DLAI.PPM
Class Request
java.lang.Object
|
+--org.PingOO.DLAI.PPM.Request
- final class Request
- extends java.lang.Object
Asks requests to the server by using the protocol object.
- Since:
- PingOO 2.0
- Version:
- 2.0
- Author:
- Fabrice Bouyé (bouye@cur-archamps.fr)
|
Field Summary |
private MasterProtocol |
protocol
The object used to send to and receive messages from the server. |
|
Constructor Summary |
Request()
Creates a new request object. |
|
Method Summary |
java.lang.String[] |
getApplications()
Gets the list of applis the user is alowed to use from the server. |
ConnectionManager |
getSlaveConnectionManager(java.lang.String slaveName)
Initializes a new connection for a given slave.
|
boolean |
login(java.lang.String loginName,
java.lang.String loginPassword,
java.lang.String serverName,
int serverPort,
java.lang.String version)
Logs in a the server. |
void |
logoff()
Disconnect from the server. |
MessageHashtable |
ping()
Pings the server and gets some stats about other connections in this session. |
void |
setLanguage()
Sets the language the server will use with this client and all connection that are in the same session. |
void |
update()
|
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
protocol
private MasterProtocol protocol
- The object used to send to and receive messages from the server.
Request
public Request()
- Creates a new request object.
- Parameters:
protocol - The protocol to which send the requests.
login
public final boolean login(java.lang.String loginName,
java.lang.String loginPassword,
java.lang.String serverName,
int serverPort,
java.lang.String version)
- Logs in a the server.
- Parameters:
loginName - loginPassword - serverName - serverPort - version -
update
public final void update()
logoff
public final void logoff()
- Disconnect from the server.
ping
public final MessageHashtable ping()
throws RequestFailedException,
PingOOProtocolException
- Pings the server and gets some stats about other connections in this session.
setLanguage
public final void setLanguage()
- Sets the language the server will use with this client and all connection that are in the same session.
getApplications
public final java.lang.String[] getApplications()
- Gets the list of applis the user is alowed to use from the server.
- Returns:
- An array of appli names.
getSlaveConnectionManager
public final ConnectionManager getSlaveConnectionManager(java.lang.String slaveName)
throws java.lang.Exception
- Initializes a new connection for a given slave.
The server is supposed to verify if this slave is allowed to be lauched by the user.
- Parameters:
slaveName - The name of the slave to connect.- Returns:
- The connection manager that the slave will use.