cern.cmw.adm
Class Status

java.lang.Object
  extended by cern.cmw.adm.Status

public class Status
extends Object

A wrapper class for the admin::ServerAdmin::Status enum.


Field Summary
static int GREEN
          Everything is fine.
static int RED
          A serious problem with the server.
static int YELLOW
          Something went wrong, but the server is still operational.
 
Constructor Summary
Status()
           
 
Method Summary
static void main(String[] args)
          For tests.
static String toString(int status)
          Returns the string representation of the status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GREEN

public static final int GREEN
Everything is fine.

See Also:
Constant Field Values

YELLOW

public static final int YELLOW
Something went wrong, but the server is still operational.

See Also:
Constant Field Values

RED

public static final int RED
A serious problem with the server.

See Also:
Constant Field Values
Constructor Detail

Status

public Status()
Method Detail

toString

public static String toString(int status)
Returns the string representation of the status.


main

public static void main(String[] args)
For tests. Locates a device server specified by the first command line argument, and prints the server host name and status. For example:

> java cern.cmw.adm.Status mtgAll
Server 'mtgAll' is running on host 'dmcrpls'
Status: GREEN
> java cern.cmw.adm.Status ibsba4
Server 'ibsba4' is down or unreachable
> java cern.cmw.adm.Status abba
Name not found on name server



Copyright © 2007 CERN. All Rights Reserved.