org.PingOO.DLAI.slave.Shutdown
Class Request

java.lang.Object
  |
  +--org.PingOO.DLAI.slave.Shutdown.Request

final class Request
extends java.lang.Object

Asks question to the server by using the upper protocol.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)

Field Summary
private  javax.swing.JInternalFrame parentFrame
          The parent frame.
private  UpperProtocol protocol
          The object used to send to and receive messages from the server.
 
Constructor Summary
Request(UpperProtocol protocol, javax.swing.JInternalFrame parentFrame)
          Creates a new request object.
 
Method Summary
 boolean cancel(java.lang.String serverName)
          The following code is an example of a request to the server.
 ValueHashtable getServerList()
          Get the list of available servers for the pingOO server.
 boolean reboot(java.lang.String serverName, int timeout)
          The following code is an example of a request to the server.
 boolean shutdown(java.lang.String serverName, int timeout)
          The following code is an example of a request to the server.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

protocol

private UpperProtocol protocol
The object used to send to and receive messages from the server.

parentFrame

private javax.swing.JInternalFrame parentFrame
The parent frame.
Used for blocking window display ONLY.
Constructor Detail

Request

public Request(UpperProtocol protocol,
               javax.swing.JInternalFrame parentFrame)
Creates a new request object.
Parameters:
protocol - The protocol to which send the requests.
parentFrame - This is just need for blocking windows.
Method Detail

getServerList

public ValueHashtable getServerList()
Get the list of available servers for the pingOO server.
Returns:
A table containing servers as keys and their description as elements.

shutdown

public boolean shutdown(java.lang.String serverName,
                        int timeout)
The following code is an example of a request to the server.

Tries to shutdown a server.

Parameters:
serverName - The name of the server to shutdown.
timeout - The time left before timeout in minutes.
Returns:
true if the request was successfull false otherwise.

reboot

public boolean reboot(java.lang.String serverName,
                      int timeout)
The following code is an example of a request to the server.

Tries to reboot a server.

Parameters:
serverName - The name of the server to reboot.
timeout - The time left before timeout in minutes.
Returns:
true if the request was successfull false otherwise.

cancel

public boolean cancel(java.lang.String serverName)
The following code is an example of a request to the server.

Tries to cancel an action on a server.

Parameters:
serverName - The name of the server to prevent from rebooting/shutdown.
Returns:
true if the request was successfull false otherwise.