NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.address
Class Authority

java.lang.Object
  |
  +--gov.nist.core.GenericObject
        |
        +--gov.nist.javax.sip.address.NetObject
              |
              +--gov.nist.javax.sip.address.Authority

public class Authority
extends NetObject

Authority part of a URI structure. Section 3.2.2 RFC2396

Version:
JAIN-SIP-1.1
Author:
M. Ranganathan
This code is in the public domain.

Constructor Summary
Authority()
           
 
Method Summary
 String encode()
          Return the host name in encoded form.
 boolean equals(Object other)
          retruns true if the two Objects are equals , false otherwise.
 Host getHost()
          Get the host name.
 HostPort getHostPort()
          get the hostPort member.
 String getPassword()
          Get password from the user info.
 int getPort()
          Get the port.
 String getUser()
          Get the user name if it exists.
 UserInfo getUserInfo()
          get the userInfo memnber.
 void removePort()
          remove the port.
 void removeUserInfo()
          Remove the user Infor.
 void setHost(Host host)
          set the host.
 void setHostPort(HostPort h)
          Set the hostPort member
 void setPassword(String passwd)
          set the password.
 void setPort(int port)
          Set the port.
 void setUser(String user)
          Set the user name of the userInfo member.
 void setUserInfo(UserInfo u)
          Set the userInfo member
 
Methods inherited from class gov.nist.javax.sip.address.NetObject
clone, debugDump, debugDump, match, merge, replace, replace, replace, replace, toString
 
Methods inherited from class gov.nist.core.GenericObject
getClassFromName, getMatcher, isMySubclass, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Authority

public Authority()
Method Detail

encode

public String encode()
Return the host name in encoded form.

Specified by:
encode in class NetObject
Returns:
encoded string (does the same thing as toString)

equals

public boolean equals(Object other)
retruns true if the two Objects are equals , false otherwise.

Overrides:
equals in class NetObject
Parameters:
other - Object to test.
Returns:
boolean

getHostPort

public HostPort getHostPort()
get the hostPort member.

Returns:
HostPort

getUserInfo

public UserInfo getUserInfo()
get the userInfo memnber.

Returns:
UserInfo

getPassword

public String getPassword()
Get password from the user info.

Returns:
String

getUser

public String getUser()
Get the user name if it exists.

Returns:
String user or null if not set.

getHost

public Host getHost()
Get the host name.

Returns:
Host (null if not set)

getPort

public int getPort()
Get the port.

Returns:
int port (-1) if port is not set.

removePort

public void removePort()
remove the port.


setPassword

public void setPassword(String passwd)
set the password.

Parameters:
passwd - String to set

setUser

public void setUser(String user)
Set the user name of the userInfo member.

Parameters:
user - String to set

setHost

public void setHost(Host host)
set the host.

Parameters:
host - Host to set

setPort

public void setPort(int port)
Set the port.

Parameters:
port - int to set

setHostPort

public void setHostPort(HostPort h)
Set the hostPort member

Parameters:
h - HostPort to set

setUserInfo

public void setUserInfo(UserInfo u)
Set the userInfo member

Parameters:
u - UserInfo to set

removeUserInfo

public void removeUserInfo()
Remove the user Infor.


NIST SIP Parser and Stack (v1.2) API

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