NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sip.address
Class UserInfo

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sip.address.NetObject
          extended by gov.nist.javax.sip.address.UserInfo
All Implemented Interfaces:
Serializable, Cloneable

public final class UserInfo
extends NetObject

User information part of a URL.

Version:
1.2 $Revision: 1.8 $ $Date: 2009/07/17 18:57:23 $
Author:
M. Ranganathan
See Also:
Serialized Form

Field Summary
static int TELEPHONE_SUBSCRIBER
          Constant field
static int USER
          constant field
 
Constructor Summary
UserInfo()
          Default constructor
 
Method Summary
 void clearPassword()
          Clear the password field.
 String encode()
          Encode the user information as a string.
 StringBuffer encode(StringBuffer buffer)
          Put the encoded version of this object in the given StringBuffer.
 boolean equals(Object obj)
          Compare for equality.
 String getPassword()
          get the password field.
 String getUser()
          get the user field.
 int getUserType()
          Gets the user type (which can be set to TELEPHONE_SUBSCRIBER or USER)
 void setPassword(String p)
          Set the password member
 void setUser(String user)
          Set the user member
 void setUserType(int type)
          Set the user type (to TELEPHONE_SUBSCRIBER or USER).
 
Methods inherited from class gov.nist.javax.sip.address.NetObject
debugDump, debugDump, match, toString
 
Methods inherited from class gov.nist.core.GenericObject
clone, getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TELEPHONE_SUBSCRIBER

public static final int TELEPHONE_SUBSCRIBER
Constant field

See Also:
Constant Field Values

USER

public static final int USER
constant field

See Also:
Constant Field Values
Constructor Detail

UserInfo

public UserInfo()
Default constructor

Method Detail

equals

public boolean equals(Object obj)
Compare for equality.

Overrides:
equals in class NetObject
Parameters:
obj - Object to set
Returns:
true if the two headers are equals, false otherwise.

encode

public String encode()
Encode the user information as a string.

Specified by:
encode in class gov.nist.core.GenericObject
Returns:
String

encode

public StringBuffer encode(StringBuffer buffer)
Description copied from class: gov.nist.core.GenericObject
Put the encoded version of this object in the given StringBuffer.

Overrides:
encode in class gov.nist.core.GenericObject

clearPassword

public void clearPassword()
Clear the password field.


getUserType

public int getUserType()
Gets the user type (which can be set to TELEPHONE_SUBSCRIBER or USER)

Returns:
the type of user.

getUser

public String getUser()
get the user field.

Returns:
String

getPassword

public String getPassword()
get the password field.

Returns:
String

setUser

public void setUser(String user)
Set the user member

Parameters:
user - String to set

setPassword

public void setPassword(String p)
Set the password member

Parameters:
p - String to set

setUserType

public void setUserType(int type)
                 throws IllegalArgumentException
Set the user type (to TELEPHONE_SUBSCRIBER or USER).

Parameters:
type - int to set
Throws:
IllegalArgumentException - if type is not in range.

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.