Purple Code

com.purpletech.message
Class SystemData

java.lang.Object
  |
  +--com.purpletech.message.SystemData
All Implemented Interfaces:
Writeable

public class SystemData
extends java.lang.Object
implements Writeable

these messages are processed by the protocol and not passed on to client code (unless specifically requested)


Field Summary
static int BIND_REPLY
           
static int BIND_REQUEST
           
static int GOODBYE
           
static int LOOKUP_REPLY
           
static int LOOKUP_REQUEST
           
static int PING
           
static int STATUS_ERROR
           
static int STATUS_OK
           
static int WELCOME
           
 
Constructor Summary
protected SystemData(java.io.DataInputStream in)
          called by the Message class for incoming system messages
 
Method Summary
 java.lang.String getClassName()
           
 java.lang.String getStr()
           
 int getSubtype()
           
 int getVal()
           
static SystemData makeBindReply(int status, java.lang.String comment)
           
static SystemData makeBindRequest(java.lang.String name, int id)
           
static SystemData makeLookupReply(int id, java.lang.String name)
           
static SystemData makeLookupRequest(java.lang.String name)
           
 void read(java.io.DataInputStream in)
           
 java.lang.String toString()
           
 void write(java.io.DataOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PING

public static final int PING
See Also:
Constant Field Values

WELCOME

public static final int WELCOME
See Also:
Constant Field Values

GOODBYE

public static final int GOODBYE
See Also:
Constant Field Values

BIND_REQUEST

public static final int BIND_REQUEST
See Also:
Constant Field Values

BIND_REPLY

public static final int BIND_REPLY
See Also:
Constant Field Values

LOOKUP_REQUEST

public static final int LOOKUP_REQUEST
See Also:
Constant Field Values

LOOKUP_REPLY

public static final int LOOKUP_REPLY
See Also:
Constant Field Values

STATUS_OK

public static final int STATUS_OK
See Also:
Constant Field Values

STATUS_ERROR

public static final int STATUS_ERROR
See Also:
Constant Field Values
Constructor Detail

SystemData

protected SystemData(java.io.DataInputStream in)
              throws java.io.IOException
called by the Message class for incoming system messages

Method Detail

makeBindRequest

public static SystemData makeBindRequest(java.lang.String name,
                                         int id)
Parameters:
name - the name to bind to
id - the client id to bind (Message.NONE = the same as the message sender)

makeBindReply

public static SystemData makeBindReply(int status,
                                       java.lang.String comment)

makeLookupRequest

public static SystemData makeLookupRequest(java.lang.String name)

makeLookupReply

public static SystemData makeLookupReply(int id,
                                         java.lang.String name)
Parameters:
id - the id that was found (0 if error)
name - the name that was looked up (in case more than one was pending)

toString

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

getClassName

public java.lang.String getClassName()
Specified by:
getClassName in interface Writeable

read

public void read(java.io.DataInputStream in)
          throws java.io.IOException
Specified by:
read in interface Writeable
java.io.IOException

write

public void write(java.io.DataOutputStream out)
           throws java.io.IOException
Specified by:
write in interface Writeable
java.io.IOException

getSubtype

public int getSubtype()

getVal

public int getVal()

getStr

public java.lang.String getStr()

Documentation generated March 5 2003