edu.cuny.cat.server
Class ClientState

java.lang.Object
  extended by edu.cuny.cat.server.ClientState

public class ClientState
extends java.lang.Object

defines the various possible status of a catp client.

Version:
$Revision: 1.10 $
Author:
Jinzhong Niu

Field Summary
protected  int code
          the code
static int CONN_CLOSED
          connection closed normally
protected  java.lang.String description
          description of the cause
static int ERROR
          common error occurred
static int FATAL
          fatal error occurred and cannot be restored
static int OK
          being active
static int READY
          new connection ready for messaging
static int UNKNOWN
          status is unknown
 
Constructor Summary
ClientState(int code)
           
ClientState(int code, java.lang.String description)
           
 
Method Summary
 int getCode()
           
static java.lang.String getCodeDesc(int code)
           
 java.lang.String getDescription()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
status is unknown

See Also:
Constant Field Values

READY

public static final int READY
new connection ready for messaging

See Also:
Constant Field Values

CONN_CLOSED

public static final int CONN_CLOSED
connection closed normally

See Also:
Constant Field Values

OK

public static final int OK
being active

See Also:
Constant Field Values

ERROR

public static final int ERROR
common error occurred

See Also:
Constant Field Values

FATAL

public static final int FATAL
fatal error occurred and cannot be restored

See Also:
Constant Field Values

code

protected int code
the code


description

protected java.lang.String description
description of the cause

Constructor Detail

ClientState

public ClientState(int code)

ClientState

public ClientState(int code,
                   java.lang.String description)
Method Detail

getCode

public int getCode()

getCodeDesc

public static java.lang.String getCodeDesc(int code)

getDescription

public java.lang.String getDescription()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object