sg.edu.nus.protocol.body
Class UserBody

java.lang.Object
  extended by sg.edu.nus.protocol.body.Body
      extended by sg.edu.nus.protocol.body.UserBody
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class UserBody
extends Body

This class is used to implement the user body which contains the user identifier and the password. The bootstrap server or the CA will use this to judge whether the user is valid to the system.

Version:
1.0 2006-1-6
Author:
Xu Linhao
See Also:
Serialized Form

Constructor Summary
UserBody(java.lang.String userID, java.lang.String password, java.lang.String email, java.lang.String ip, int port, java.lang.String type)
          Construct a user body with both user identifier and password.
 
Method Summary
 java.lang.String getEmail()
          Get the email.
 java.lang.String getIP()
          Get the request peer's IP address, for another peer to reply message.
 java.lang.String getPassword()
          Get the password.
 java.lang.String getPeerType()
          Get the peer type.
 int getPort()
          Get the port of the server socket that is used for providing service of monitoring incoming and outgoing socket connections.
 java.lang.String getUserID()
          Get the user identifier.
 java.lang.String toString()
          Override toString() function of java.lang.Object.
 
Methods inherited from class sg.edu.nus.protocol.body.Body
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserBody

public UserBody(java.lang.String userID,
                java.lang.String password,
                java.lang.String email,
                java.lang.String ip,
                int port,
                java.lang.String type)
Construct a user body with both user identifier and password.

Parameters:
userID - the user identifier
password - the password
email - the email address
ip - the IP address
port - the port used for monitoring network events
type - the peer type
Method Detail

getUserID

public java.lang.String getUserID()
Get the user identifier.

Returns:
The user identifier.

getPassword

public java.lang.String getPassword()
Get the password.

Returns:
The password.

getEmail

public java.lang.String getEmail()
Get the email.

Returns:
the email

getIP

public java.lang.String getIP()
Get the request peer's IP address, for another peer to reply message.

Returns:
the request peer's IP address

getPort

public int getPort()
Get the port of the server socket that is used for providing service of monitoring incoming and outgoing socket connections.

Returns:
the port of the server socket

getPeerType

public java.lang.String getPeerType()
Get the peer type.

Returns:
the peer type

toString

public java.lang.String toString()
Override toString() function of java.lang.Object.

Overrides:
toString in class java.lang.Object
Returns:
A string that describes the content of the body.