gov.nist.javax.sip.header
クラス Via

java.lang.Object
  上位を拡張 gov.nist.core.GenericObject
      上位を拡張 gov.nist.javax.sip.header.SIPObject
          上位を拡張 gov.nist.javax.sip.header.SIPHeader
              上位を拡張 gov.nist.javax.sip.header.ParametersHeader
                  上位を拡張 gov.nist.javax.sip.header.Via
すべての実装されたインタフェース:
SIPHeaderNames, java.io.Serializable, java.lang.Cloneable, javax.sip.header.Header, javax.sip.header.Parameters, javax.sip.header.ViaHeader

public class Via
extends ParametersHeader
implements javax.sip.header.ViaHeader

Via SIPHeader (these are strung together in a ViaList).

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

フィールドの概要
static java.lang.String BRANCH
          The branch parameter is included by every forking proxy.
static java.lang.String MADDR
          The "maddr" paramter is designating the multicast address.
static java.lang.String RECEIVED
          The "received" parameter is added only for receiver-added Via Fields.
static java.lang.String TTL
          The "TTL" parameter is designating the time-to-live value.
 
インタフェース javax.sip.header.ViaHeader から継承されたフィールド
NAME
 
インタフェース gov.nist.javax.sip.header.SIPHeaderNames から継承されたフィールド
ACCEPT, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ALERT_INFO, ALLOW, ALLOW_EVENTS, AUTHENTICATION_INFO, AUTHORIZATION, CALL_ID, CALL_INFO, CONTACT, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CSEQ, DATE, ERROR_INFO, EVENT, EXPIRES, FROM, IN_REPLY_TO, MAX_FORWARDS, MIME_VERSION, MIN_EXPIRES, ORGANIZATION, PRIORITY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, RACK, REASON, RECORD_ROUTE, REPLY_TO, REQUIRE, RETRY_AFTER, ROUTE, RSEQ, SERVER, SUBJECT, SUBSCRIPTION_STATE, SUPPORTED, TIMESTAMP, TO, UNSUPPORTED, USER_AGENT, VIA, WARNING, WWW_AUTHENTICATE
 
コンストラクタの概要
Via()
          Default constructor
 
メソッドの概要
 boolean equals(java.lang.Object other)
          Compare two via headers for equaltiy.
 java.lang.String getBranch()
          Gets the branch paramater of the ViaHeader.
 java.lang.String getComment()
          Accessor for the comment field.
 java.lang.String getHost()
          Returns the host part of this ViaHeader.
 Host getMaddr()
          Get the maddr parameter if it exists.
 java.lang.String getMAddr()
          Returns the value of the maddr parameter, or null if this is not set.
 int getPort()
          Returns the port part of this ViaHeader.
 java.lang.String getProtocol()
          Returns the value of the protocol used.
 java.lang.String getProtocolVersion()
          get the Protocol Version
 java.lang.String getReceived()
          Gets the received paramater of the ViaHeader.
 HostPort getSentBy()
          Accessor for the sentBy field
 Protocol getSentProtocol()
          Accessor for the sentProtocol field.
 java.lang.String getTransport()
          Returns the value of the transport parameter.
 int getTTL()
          Returns the value of the ttl parameter, or -1 if this is not set.
 NameValueList getViaParms()
          Accessor for the parameters field
 boolean hasComment()
          comment of the Via Header.
 boolean hasPort()
          port of the Via Header.
 void removeComment()
          remove the comment field.
 void removePort()
          remove the port.
 void setBranch(java.lang.String branch)
          Sets the branch parameter of the ViaHeader to the newly supplied branch value.
 void setComment(java.lang.String c)
          Set the comment member
 void setHost(Host host)
          set the Host of the Via Header
 void setHost(java.lang.String host)
          Set the host part of this ViaHeader to the newly supplied host parameter.
 void setMAddr(java.lang.String mAddr)
          Sets the value of the maddr parameter of this ViaHeader.
 void setPort(int port)
          Set the port part of this ViaHeader to the newly supplied port parameter.
 void setProtocol(java.lang.String protocol)
          Sets the value of the protocol parameter.
 void setProtocolVersion(java.lang.String protocolVersion)
          set the Protocol Version
 void setReceived(java.lang.String received)
          Sets the received parameter of ViaHeader.
 void setSentBy(HostPort s)
          Set the sentBy member
 void setSentProtocol(Protocol s)
          Set the sentProtocol member
 void setTransport(java.lang.String transport)
          Sets the value of the transport.
 void setTTL(int ttl)
          Sets the value of the ttl parameter.
 
クラス gov.nist.javax.sip.header.ParametersHeader から継承されたメソッド
getNameValue, getParameter, getParameterNames, getParameters, getParameterValue, hasParameter, hasParameters, removeParameter, removeParameters, setParameter, setParameter, setParameters, setQuotedParameter
 
クラス gov.nist.javax.sip.header.SIPHeader から継承されたメソッド
encode, getHeaderName, getHeaderValue, getName, getValue, isHeaderList, setHeaderName
 
クラス gov.nist.javax.sip.header.SIPObject から継承されたメソッド
clone, dbgPrint, debugDump, debugDump, match, merge, replace, replace, replace, replace, toString
 
クラス gov.nist.core.GenericObject から継承されたメソッド
getClassFromName, getMatcher, isMySubclass, setMatcher
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース javax.sip.header.Parameters から継承されたメソッド
getParameter, getParameterNames, removeParameter, setParameter
 
インタフェース javax.sip.header.Header から継承されたメソッド
clone, getName, toString
 

フィールドの詳細

BRANCH

public static final java.lang.String BRANCH
The branch parameter is included by every forking proxy.

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

RECEIVED

public static final java.lang.String RECEIVED
The "received" parameter is added only for receiver-added Via Fields.

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

MADDR

public static final java.lang.String MADDR
The "maddr" paramter is designating the multicast address.

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

TTL

public static final java.lang.String TTL
The "TTL" parameter is designating the time-to-live value.

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

Via

public Via()
Default constructor

メソッドの詳細

equals

public boolean equals(java.lang.Object other)
Compare two via headers for equaltiy.

定義:
インタフェース javax.sip.header.Header 内の equals
オーバーライド:
クラス SIPObject 内の equals
パラメータ:
other - Object to set.
戻り値:
true if the two via headers are the same.

getProtocolVersion

public java.lang.String getProtocolVersion()
get the Protocol Version

戻り値:
String

getSentProtocol

public Protocol getSentProtocol()
Accessor for the sentProtocol field.

戻り値:
Protocol field

getSentBy

public HostPort getSentBy()
Accessor for the sentBy field

戻り値:
SentBy field

getViaParms

public NameValueList getViaParms()
Accessor for the parameters field

戻り値:
parameters field

getComment

public java.lang.String getComment()
Accessor for the comment field.

戻り値:
comment field.

getMaddr

public Host getMaddr()
Get the maddr parameter if it exists.

戻り値:
maddr parameter.

hasPort

public boolean hasPort()
port of the Via Header.

戻り値:
true if Port exists.

hasComment

public boolean hasComment()
comment of the Via Header.

戻り値:
false if comment does not exist and true otherwise.

removePort

public void removePort()
remove the port.


removeComment

public void removeComment()
remove the comment field.


setProtocolVersion

public void setProtocolVersion(java.lang.String protocolVersion)
set the Protocol Version

パラメータ:
protocolVersion - String to set

setHost

public void setHost(Host host)
set the Host of the Via Header

パラメータ:
host - String to set

setSentProtocol

public void setSentProtocol(Protocol s)
Set the sentProtocol member

パラメータ:
s - Protocol to set.

setSentBy

public void setSentBy(HostPort s)
Set the sentBy member

パラメータ:
s - HostPort to set.

setComment

public void setComment(java.lang.String c)
Set the comment member

パラメータ:
c - String to set.

setHost

public void setHost(java.lang.String host)
             throws java.text.ParseException
Set the host part of this ViaHeader to the newly supplied host parameter.

定義:
インタフェース javax.sip.header.ViaHeader 内の setHost
例外:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the host value.

getHost

public java.lang.String getHost()
Returns the host part of this ViaHeader.

定義:
インタフェース javax.sip.header.ViaHeader 内の getHost
戻り値:
the string value of the host

setPort

public void setPort(int port)
Set the port part of this ViaHeader to the newly supplied port parameter.

定義:
インタフェース javax.sip.header.ViaHeader 内の setPort
パラメータ:
port - - the new interger value of the port of this ViaHeader

getPort

public int getPort()
Returns the port part of this ViaHeader.

定義:
インタフェース javax.sip.header.ViaHeader 内の getPort
戻り値:
the integer value of the port

getTransport

public java.lang.String getTransport()
Returns the value of the transport parameter.

定義:
インタフェース javax.sip.header.ViaHeader 内の getTransport
戻り値:
the string value of the transport paramter of the ViaHeader

setTransport

public void setTransport(java.lang.String transport)
                  throws java.text.ParseException
Sets the value of the transport. This parameter specifies which transport protocol to use for sending requests and responses to this entity. The following values are defined: "udp", "tcp", "sctp", "tls", but other values may be used also.

定義:
インタフェース javax.sip.header.ViaHeader 内の setTransport
パラメータ:
transport - - new value for the transport parameter
例外:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the transport value.

getProtocol

public java.lang.String getProtocol()
Returns the value of the protocol used.

定義:
インタフェース javax.sip.header.ViaHeader 内の getProtocol
戻り値:
the string value of the protocol paramter of the ViaHeader

setProtocol

public void setProtocol(java.lang.String protocol)
                 throws java.text.ParseException
Sets the value of the protocol parameter. This parameter specifies which protocol is used, for example "SIP/2.0".

定義:
インタフェース javax.sip.header.ViaHeader 内の setProtocol
パラメータ:
protocol - - new value for the protocol parameter
例外:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the protocol value.

getTTL

public int getTTL()
Returns the value of the ttl parameter, or -1 if this is not set.

定義:
インタフェース javax.sip.header.ViaHeader 内の getTTL
戻り値:
the integer value of the ttl parameter

setTTL

public void setTTL(int ttl)
            throws javax.sip.InvalidArgumentException
Sets the value of the ttl parameter. The ttl parameter specifies the time-to-live value when packets are sent using UDP multicast.

定義:
インタフェース javax.sip.header.ViaHeader 内の setTTL
パラメータ:
ttl - - new value of the ttl parameter
例外:
javax.sip.InvalidArgumentException - if supplied value is less than zero or greater than 255, excluding -1 the default not set value.

getMAddr

public java.lang.String getMAddr()
Returns the value of the maddr parameter, or null if this is not set.

定義:
インタフェース javax.sip.header.ViaHeader 内の getMAddr
戻り値:
the string value of the maddr parameter

setMAddr

public void setMAddr(java.lang.String mAddr)
              throws java.text.ParseException
Sets the value of the maddr parameter of this ViaHeader. The maddr parameter indicates the server address to be contacted for this user, overriding any address derived from the host field.

定義:
インタフェース javax.sip.header.ViaHeader 内の setMAddr
パラメータ:
mAddr - new value of the maddr parameter
例外:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the mAddr value.

getReceived

public java.lang.String getReceived()
Gets the received paramater of the ViaHeader. Returns null if received does not exist.

定義:
インタフェース javax.sip.header.ViaHeader 内の getReceived
戻り値:
the string received value of ViaHeader

setReceived

public void setReceived(java.lang.String received)
                 throws java.text.ParseException
Sets the received parameter of ViaHeader.

定義:
インタフェース javax.sip.header.ViaHeader 内の setReceived
パラメータ:
received - - the newly supplied received parameter.
例外:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the received value.

getBranch

public java.lang.String getBranch()
Gets the branch paramater of the ViaHeader. Returns null if branch does not exist.

定義:
インタフェース javax.sip.header.ViaHeader 内の getBranch
戻り値:
the string branch value of ViaHeader

setBranch

public void setBranch(java.lang.String branch)
               throws java.text.ParseException
Sets the branch parameter of the ViaHeader to the newly supplied branch value.

定義:
インタフェース javax.sip.header.ViaHeader 内の setBranch
パラメータ:
branch - - the new string branch parmameter of the ViaHeader.
例外:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the branch value.