NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.header
Class ContactList

java.lang.Object
  |
  +--gov.nist.core.GenericObject
        |
        +--gov.nist.javax.sip.header.SIPObject
              |
              +--gov.nist.javax.sip.header.SIPHeader
                    |
                    +--gov.nist.javax.sip.header.SIPHeaderList
                          |
                          +--gov.nist.javax.sip.header.ContactList
All Implemented Interfaces:
Cloneable, Collection, Header, List, Serializable, SIPHeaderNames

public class ContactList
extends SIPHeaderList

List of contact headers.ContactLists are also maintained in a hashtable for quick lookup.

Author:
M. Ranganathan
This code is in the public domain.
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface 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
 
Constructor Summary
ContactList()
          Constructor.
ContactList(SIPObjectList hl)
          constructor
 
Method Summary
 Object clone()
          make a clone of this contact list.
 void concatenate(SIPHeaderList clist)
          Concatenate two contact lists by appending the argument to this list.
 void concatenate(SIPHeaderList clist, boolean topFlag)
          Concatenate two contact lists.
 Contact[] getContacts()
          Get an array of contact addresses.
 void replace(String objectText, GenericObject replacementObject, boolean matchSubstring)
          Replace an object from this contact list.
 
Methods inherited from class gov.nist.javax.sip.header.SIPHeaderList
add, add, add, add, addAll, addAll, addFirst, clear, contains, containsAll, debugDump, debugDump, encode, equals, first, get, getFirst, getHeaderList, getHeadersAsEncodedStrings, getLast, getMyClass, indexOf, indexOf, isEmpty, isHeaderList, iterator, lastIndexOf, listIterator, listIterator, match, merge, next, next, remove, remove, remove, removeAll, removeAll, removeFirst, removeLast, retainAll, set, size, subList, toArray, toArray, toString
 
Methods inherited from class gov.nist.javax.sip.header.SIPHeader
getHeaderName, getHeaderValue, getName, getValue, setHeaderName
 
Methods inherited from class gov.nist.javax.sip.header.SIPObject
dbgPrint, replace, replace, replace
 
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
 
Methods inherited from interface java.util.List
hashCode
 

Constructor Detail

ContactList

public ContactList(SIPObjectList hl)
constructor

Parameters:
hl - SIPObjectList

ContactList

public ContactList()
Constructor.

Method Detail

replace

public void replace(String objectText,
                    GenericObject replacementObject,
                    boolean matchSubstring)
             throws IllegalArgumentException
Replace an object from this contact list.

Overrides:
replace in class SIPObject
Parameters:
objectText - Encoded form of the object that we want to replace.
replacementObject - object that we want to put in the place of this object.
matchSubstring - substring match flag.
Throws:
IllegalArgumentException - on null args and if replacementObject does not derive from GenericObject or GenericObjectList

clone

public Object clone()
make a clone of this contact list.

Specified by:
clone in interface Header
Overrides:
clone in class SIPHeaderList
Returns:
Object cloned list.

concatenate

public void concatenate(SIPHeaderList clist)
                 throws IllegalArgumentException
Concatenate two contact lists by appending the argument to this list. Concatenate the lists and union the hash tables.

Overrides:
concatenate in class SIPHeaderList
Parameters:
clist - SIPHeaderList to set
Throws:
IllegalArgumentException - if the two lists are not compatible

concatenate

public void concatenate(SIPHeaderList clist,
                        boolean topFlag)
                 throws IllegalArgumentException
Concatenate two contact lists. Concatenate the lists and union the hash tables.

Overrides:
concatenate in class SIPHeaderList
Parameters:
clist - SIPHeaderList to set
topFlag - boolean to set
Throws:
IllegalArgumentException - if the clist is not a list of contact headers.

getContacts

public Contact[] getContacts()
Get an array of contact addresses.

Returns:
contact []

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.