NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.header
Class CallIdentifier

java.lang.Object
  |
  +--gov.nist.core.GenericObject
        |
        +--gov.nist.javax.sip.header.SIPObject
              |
              +--gov.nist.javax.sip.header.CallIdentifier

public final class CallIdentifier
extends SIPObject

The call identifer that goes into a callID header and a in-reply-to header.

Author:
M. Ranganathan
This code is in the public domain.
See Also:
CallID, InReplyTo

Constructor Summary
CallIdentifier()
          Default constructor
CallIdentifier(String cid)
          constructor
CallIdentifier(String localId, String host)
          Constructor
 
Method Summary
 String encode()
          Get the encoded version of this id.
 boolean equals(Object other)
          Compare two call identifiers for equality.
 String getHost()
          get the host field
 String getLocalId()
          get the LocalId field
 void setCallID(String cid)
          set the callId field
 void setHost(String host)
          Set the host member
 void setLocalId(String localId)
          Set the localId member
 
Methods inherited from class gov.nist.javax.sip.header.SIPObject
clone, dbgPrint, 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

CallIdentifier

public CallIdentifier()
Default constructor


CallIdentifier

public CallIdentifier(String localId,
                      String host)
Constructor

Parameters:
host - is the host.

CallIdentifier

public CallIdentifier(String cid)
               throws IllegalArgumentException
constructor

Parameters:
cid - String to set
Throws:
IllegalArgumentException - if cid is null or is not a token, or token@token
Method Detail

encode

public String encode()
Get the encoded version of this id.

Specified by:
encode in class SIPObject
Returns:
String to set

equals

public boolean equals(Object other)
Compare two call identifiers for equality.

Overrides:
equals in class SIPObject
Parameters:
other - Object to set
Returns:
true if the two call identifiers are equals, false otherwise

getLocalId

public String getLocalId()
get the LocalId field

Returns:
String

getHost

public String getHost()
get the host field

Returns:
host member String

setLocalId

public void setLocalId(String localId)
Set the localId member

Parameters:
localId - String to set

setCallID

public void setCallID(String cid)
               throws IllegalArgumentException
set the callId field

Parameters:
cid - Strimg to set
Throws:
IllegalArgumentException - if cid is null or is not a token or token@token

setHost

public void setHost(String host)
Set the host member

Parameters:
host - String to set

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.