gov.nist.javax.sip.address
クラス AddressImpl

java.lang.Object
  上位を拡張 gov.nist.core.GenericObject
      上位を拡張 gov.nist.javax.sip.address.NetObject
          上位を拡張 gov.nist.javax.sip.address.AddressImpl
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Cloneable, javax.sip.address.Address

public final class AddressImpl
extends NetObject
implements javax.sip.address.Address

Address structure. Imbeds a URI and adds a display name.

バージョン:
JAIN-SIP-1.1 $Revision: 1.2 $ $Date: 2004/01/22 13:26:28 $
作成者:
M. Ranganathan
This code is in the public domain.
関連項目:
直列化された形式

フィールドの概要
static int ADDRESS_SPEC
          constant field.
static int NAME_ADDR
          Constant field.
static int WILD_CARD
          Constant field.
 
コンストラクタの概要
AddressImpl()
           
 
メソッドの概要
 java.lang.String encode()
          Encode the address as a string and return it.
 boolean equals(java.lang.Object other)
          Compare two address specs for equality.
 int getAddressType()
          Get the address type;
 java.lang.String getDisplayName()
          get the display name
 java.lang.String getHost()
          Get the host name from the address.
 HostPort getHostPort()
          Get the host port portion of the address spec.
 int getPort()
          Get the port from the imbedded URI.
 javax.sip.address.URI getURI()
          Returns the URI address of this Address.
 java.lang.String getUserAtHostPort()
          Get the user@host:port for the address field.
 boolean hasDisplayName()
          return true if DisplayName exist.
 boolean isSIPAddress()
          Return true if the imbedded URI is a sip URI.
 boolean isWildcard()
          This determines if this address is a wildcard address.
 boolean match(java.lang.Object other)
          Match on the address only.
 void removeDisplayName()
          remove the displayName field
 void removeParameter(java.lang.String parameterName)
          Remove a parameter from the address.
 void setAddess(javax.sip.address.URI address)
          Set the address field
 void setAddressType(int atype)
          Set the address type.
 void setDisplayName(java.lang.String displayName)
          Set the displayName member
 void setURI(javax.sip.address.URI address)
          Sets the URI address of this Address.
 void setUser(java.lang.String user)
          Set the user name for the imbedded URI.
 void setWildCardFlag()
          Mark this a wild card address type.
 
クラス gov.nist.javax.sip.address.NetObject から継承されたメソッド
clone, debugDump, debugDump, merge, replace, replace, replace, replace, toString
 
クラス gov.nist.core.GenericObject から継承されたメソッド
getClassFromName, getMatcher, isMySubclass, setMatcher
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース javax.sip.address.Address から継承されたメソッド
toString
 

フィールドの詳細

NAME_ADDR

public static final int NAME_ADDR
Constant field.

関連項目:
定数フィールド値

ADDRESS_SPEC

public static final int ADDRESS_SPEC
constant field.

関連項目:
定数フィールド値

WILD_CARD

public static final int WILD_CARD
Constant field.

関連項目:
定数フィールド値
コンストラクタの詳細

AddressImpl

public AddressImpl()
メソッドの詳細

match

public boolean match(java.lang.Object other)
Match on the address only. Dont care about the display name.

オーバーライド:
クラス NetObject 内の match
パラメータ:
other - the match pattern to test against. The match object has to be of the same type (class). Primitive types and non-sip fields that are non null are matched for equality. Null in any field matches anything. Some book-keeping fields are ignored when making the comparison.
戻り値:
true if match succeeds false otherwise.

getHostPort

public HostPort getHostPort()
Get the host port portion of the address spec.

戻り値:
host:port in a HostPort structure.

getPort

public int getPort()
Get the port from the imbedded URI. This assumes that a SIP URL is encapsulated in this address object.

戻り値:
the port from the address.

getUserAtHostPort

public java.lang.String getUserAtHostPort()
Get the user@host:port for the address field. This assumes that the encapsulated object is a SipUri. BUG Fix from Antonis Kadris.

戻り値:
string containing user@host:port.

getHost

public java.lang.String getHost()
Get the host name from the address.

戻り値:
the host name.

removeParameter

public void removeParameter(java.lang.String parameterName)
Remove a parameter from the address.

パラメータ:
parameterName - is the name of the parameter to remove.

encode

public java.lang.String encode()
Encode the address as a string and return it.

定義:
クラス NetObject 内の encode
戻り値:
String canonical encoded version of this address.

getAddressType

public int getAddressType()
Get the address type;

戻り値:
int

setAddressType

public void setAddressType(int atype)
Set the address type. The address can be NAME_ADDR, ADDR_SPEC or WILD_CARD

パラメータ:
atype - int to set

getDisplayName

public java.lang.String getDisplayName()
get the display name

定義:
インタフェース javax.sip.address.Address 内の getDisplayName
戻り値:
String

setDisplayName

public void setDisplayName(java.lang.String displayName)
Set the displayName member

定義:
インタフェース javax.sip.address.Address 内の setDisplayName
パラメータ:
displayName - String to set

setAddess

public void setAddess(javax.sip.address.URI address)
Set the address field

パラメータ:
address - SipUri to set

equals

public boolean equals(java.lang.Object other)
Compare two address specs for equality.

定義:
インタフェース javax.sip.address.Address 内の equals
オーバーライド:
クラス NetObject 内の equals
パラメータ:
other - Object to compare this this address
戻り値:
boolean

hasDisplayName

public boolean hasDisplayName()
return true if DisplayName exist.

戻り値:
boolean

removeDisplayName

public void removeDisplayName()
remove the displayName field


isSIPAddress

public boolean isSIPAddress()
Return true if the imbedded URI is a sip URI.

戻り値:
true if the imbedded URI is a SIP URI.

getURI

public javax.sip.address.URI getURI()
Returns the URI address of this Address. The type of URI can be determined by the scheme.

定義:
インタフェース javax.sip.address.Address 内の getURI
戻り値:
address parmater of the Address object

isWildcard

public boolean isWildcard()
This determines if this address is a wildcard address. That is Address.getAddress.getUserInfo() == *;

定義:
インタフェース javax.sip.address.Address 内の isWildcard
戻り値:
true if this name address is a wildcard, false otherwise.

setURI

public void setURI(javax.sip.address.URI address)
Sets the URI address of this Address. The URI can be either a TelURL or a SipURI.

定義:
インタフェース javax.sip.address.Address 内の setURI
パラメータ:
address - - the new URI address value of this NameAddress.

setUser

public void setUser(java.lang.String user)
Set the user name for the imbedded URI.

パラメータ:
user - -- user name to set for the imbedded URI.

setWildCardFlag

public void setWildCardFlag()
Mark this a wild card address type.