jain.protocol.ip.sip
Class BasicCredentials

java.lang.Object
  |
  +--jain.protocol.ip.sip.Credentials
        |
        +--jain.protocol.ip.sip.BasicCredentials

public final class BasicCredentials
extends Credentials

This class represents Basic Authentication scheme Credentials. It consists of a UserId and a Password.

Version:
0.6
See Also:
Credentials, AuthorizationHeader, ProxyAuthorizationHeader

Constructor Summary
BasicCredentials(java.lang.String userId, java.lang.String password)
          Creates BasicCredentials based on given userId and password
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of BasicCredentials
 boolean equals(BasicCredentials basicCredentials)
          Indicates whether some other BasicCredentials is "equal to" this one
 java.lang.String getPassword()
          Gets password of Credentials
 java.lang.String getUserId()
          Gets userId of Credentials
 void setPassword(java.lang.String password)
          Sets password of Credentials
 void setUserId(java.lang.String userId)
          Sets userId of Credentials
 java.lang.String toString()
          Gets string representation of BasicCredentials
 
Methods inherited from class jain.protocol.ip.sip.Credentials
equals, getExtension, getExtensions, getScheme, hasExtension, hasExtensions, removeExtension, removeExtensions, setExtension, setScheme
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicCredentials

public BasicCredentials(java.lang.String userId,
                        java.lang.String password)
                 throws java.lang.IllegalArgumentException
Creates BasicCredentials based on given userId and password
Parameters:
userId - userId
password - password
Throws:
java.lang.IllegalArgumentException - if userId or password are null or zero-length
Method Detail

getUserId

public java.lang.String getUserId()
Gets userId of Credentials
Returns:
userId of Credentials

setUserId

public void setUserId(java.lang.String userId)
               throws java.lang.IllegalArgumentException
Sets userId of Credentials
Parameters:
userId - userId
Throws:
java.lang.IllegalArgumentException - if userId is null or zero-length

getPassword

public java.lang.String getPassword()
Gets password of Credentials
Returns:
password of Credentials

setPassword

public void setPassword(java.lang.String password)
                 throws java.lang.IllegalArgumentException
Sets password of Credentials
Parameters:
password - password
Throws:
java.lang.IllegalArgumentException - if password is null or zero-length

toString

public java.lang.String toString()
Gets string representation of BasicCredentials
Overrides:
toString in class Credentials
Returns:
string representation of BasicCredentials

clone

public java.lang.Object clone()
Creates and returns a copy of BasicCredentials
Overrides:
clone in class Credentials
Returns:
copy of BasicCredentials

equals

public boolean equals(BasicCredentials basicCredentials)
Indicates whether some other BasicCredentials is "equal to" this one
Parameters:
basicCredentials - the BasicCredentials with which to compare


If you have any comments or queries, please mail them to JAIN-SIP-interest@sun.com


Copyright - 2000 Sun Microsystems