gov.nist.core
クラス Host

java.lang.Object
  上位を拡張 gov.nist.core.GenericObject
      上位を拡張 gov.nist.core.Host
すべての実装されたインタフェース:
java.io.Serializable

public class Host
extends GenericObject

Stores hostname.

バージョン:
JAIN-SIP-1.1
作成者:
M. Ranganathan , Emil Ivov IPV6 Support.
This code is in the public domain. IPv6 Support added by Emil Ivov (emil_ivov@yahoo.com)
Network Research Team (http://www-r2.u-strasbg.fr))
Louis Pasteur University - Strasbourg - France
Marc Bednarek (Bugfixes).
関連項目:
直列化された形式

コンストラクタの概要
Host()
          default constructor
Host(java.lang.String hostName)
          Constructor given host name or IP address.
Host(java.lang.String name, int addrType)
          constructor
 
メソッドの概要
 java.lang.Object clone()
          Make a clone of this object.
 java.lang.String encode()
          Return the host name in encoded form.
 boolean equals(java.lang.Object obj)
          Compare for equality of hosts.
 java.lang.String getAddress()
          get the Address field
 java.lang.String getHostname()
          get the HostName field
 java.net.InetAddress getInetAddress()
          Get the inet address from this host.
 java.lang.String getIpAddress()
          Convenience function to get the raw IP destination address of a SIP message as a String.
 boolean isHostname()
          Return true if the address is a DNS host name (and not an IPV4 address)
 boolean isIPAddress()
          Return true if the address is a DNS host name (and not an IPV4 address)
 void setAddress(java.lang.String address)
          Set the address member
 void setHostAddress(java.lang.String address)
          Set the IP Address.
 void setHostname(java.lang.String h)
          Set the hostname member.
 
クラス gov.nist.core.GenericObject から継承されたメソッド
debugDump, debugDump, getClassFromName, getMatcher, isMySubclass, match, merge, replace, replace, replace, replace, setMatcher
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Host

public Host()
default constructor


Host

public Host(java.lang.String hostName)
     throws java.lang.IllegalArgumentException
Constructor given host name or IP address.

例外:
java.lang.IllegalArgumentException

Host

public Host(java.lang.String name,
            int addrType)
constructor

パラメータ:
name - String to set
addrType - int to set
メソッドの詳細

encode

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

定義:
クラス GenericObject 内の encode
戻り値:
String

equals

public boolean equals(java.lang.Object obj)
Compare for equality of hosts. Host names are compared by textual equality. No dns lookup is performed.

オーバーライド:
クラス GenericObject 内の equals
パラメータ:
obj - Object to set
戻り値:
boolean

getHostname

public java.lang.String getHostname()
get the HostName field

戻り値:
String

getAddress

public java.lang.String getAddress()
get the Address field

戻り値:
String

getIpAddress

public java.lang.String getIpAddress()
Convenience function to get the raw IP destination address of a SIP message as a String.

戻り値:
String

setHostname

public void setHostname(java.lang.String h)
Set the hostname member.

パラメータ:
h - String to set

setHostAddress

public void setHostAddress(java.lang.String address)
Set the IP Address.

パラメータ:
address - is the address string to set.

setAddress

public void setAddress(java.lang.String address)
Set the address member

パラメータ:
address - address String to set

isHostname

public boolean isHostname()
Return true if the address is a DNS host name (and not an IPV4 address)

戻り値:
true if the hostname is a DNS name

isIPAddress

public boolean isIPAddress()
Return true if the address is a DNS host name (and not an IPV4 address)

戻り値:
true if the hostname is host address.

getInetAddress

public java.net.InetAddress getInetAddress()
                                    throws java.net.UnknownHostException
Get the inet address from this host. Caches the inet address returned from dns lookup to avoid lookup delays.

例外:
UnkownHostexception - when the host name cannot be resolved.
java.net.UnknownHostException

clone

public java.lang.Object clone()
クラス GenericObject の記述:
Make a clone of this object.

オーバーライド:
クラス GenericObject 内の clone