|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectgov.nist.core.GenericObject
gov.nist.javax.sip.header.SIPObject
gov.nist.javax.sip.header.SIPHeader
gov.nist.javax.sip.header.SIPHeaderList
This is the root class for all lists of SIP headers. It imbeds a SIPObjectList object and extends SIPHeader Lists of ContactSIPObjects etc. derive from this class. This supports homogeneous lists (all elements in the list are of the same class). We use this for building type homogeneous lists of SIPObjects that appear in SIPHeaders
| 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, MIN_SE, ORGANIZATION, PRIORITY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, RACK, REASON, RECORD_ROUTE, REFERRED_BY, REPLACES, REPLY_TO, REQUIRE, RETRY_AFTER, ROUTE, RSEQ, SERVER, SESSION_EXPIRES, SIP_ETAG, SIP_IF_MATCH, SUBJECT, SUBSCRIPTION_STATE, SUPPORTED, TIMESTAMP, TO, UNSUPPORTED, USER_AGENT, VIA, WARNING, WWW_AUTHENTICATE |
| Method Summary | |
void |
add(int index,
Object sipHeader)
insert at a location. |
boolean |
add(Object objectToAdd)
Concatenate the list of stuff that we are keeping around and also the text corresponding to these structures (that we parsed). |
void |
add(Object sipheader,
boolean top)
Add to this list. |
boolean |
addAll(Collection collection)
Add a collection of headers. |
boolean |
addAll(int index,
Collection collection)
Add all the elements of this collection. |
void |
addFirst(Object obj)
Concatenate the list of stuff that we are keeping around and also the text corresponding to these structures (that we parsed). |
void |
clear()
|
Object |
clone()
make a clone of this header list. |
void |
concatenate(SIPHeaderList other)
Concatenate two compatible lists. |
void |
concatenate(SIPHeaderList other,
boolean topFlag)
Concatenate two compatible lists. |
boolean |
contains(Object header)
|
boolean |
containsAll(Collection collection)
Check if the list contains all the headers in this collection. |
String |
debugDump()
convert to a string representation |
String |
debugDump(int indentation)
convert to a string representation (for printing). |
String |
encode()
Encode a list of sip headers. |
boolean |
equals(Object other)
Equality comparison operator. |
Object |
get(int index)
Get the object at the specified location. |
SIPHeader |
getFirst()
Get the first element of this list. |
List |
getHeaderList()
Get the imbedded linked list. |
List |
getHeadersAsEncodedStrings()
Return a list of encoded strings (one for each sipheader). |
SIPHeader |
getLast()
Get the last element of this list. |
Class |
getMyClass()
Get the class for the headers of this list. |
String |
getName()
Gets the unique string name of this Header. |
int |
hashCode()
Gets a integer hashcode representation of the Header. |
int |
indexOf(gov.nist.core.GenericObject gobj)
index of an element. |
int |
indexOf(Object obj)
Return the index of a given object. |
boolean |
isEmpty()
Empty check |
boolean |
isHeaderList()
Return true if this is a header list (overrides the base class method which returns false). |
Iterator |
iterator()
Return the iterator to the imbedded list. |
int |
lastIndexOf(Object obj)
Get the last index of the given object. |
ListIterator |
listIterator()
Get an initialized iterator for my imbedded list |
ListIterator |
listIterator(int position)
Get the list iterator for a given position. |
boolean |
match(SIPHeaderList template)
Template match against a template. null field in template indicates wild card match. |
void |
merge(SIPHeaderList mergeHdrList)
Merge this with a given template. |
Object |
remove(int index)
Remove the object at a given index. |
boolean |
remove(Object obj)
Remove the given object. |
boolean |
remove(SIPHeader obj)
Remove a sip header from this list of sip headers. |
boolean |
removeAll(Collection collection)
Remove all the elements. |
void |
removeFirst()
Remove the first element of this list. |
void |
removeLast()
Remove the last element of this list. |
boolean |
retainAll(Collection collection)
|
Object |
set(int position,
Object sipHdr)
Set a SIPHeader at a particular position in the list. |
int |
size()
Get the number of headers in the list. |
List |
subList(int index1,
int index2)
Get a sublist of the list. |
Object[] |
toArray()
Array conversion. |
Object[] |
toArray(Object[] array)
Convert a list of headers to an array. |
| Methods inherited from class gov.nist.javax.sip.header.SIPHeader |
getHeaderName, getHeaderValue, getValue, setHeaderName, toString |
| Methods inherited from class gov.nist.javax.sip.header.SIPObject |
dbgPrint, match |
| Methods inherited from class gov.nist.core.GenericObject |
getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.sip.header.Header |
toString |
| Method Detail |
public String getName()
Header
getName in interface HeadergetName in class SIPHeaderpublic boolean add(Object objectToAdd)
add in interface ListobjectToAdd - public void addFirst(Object obj)
obj - Genericobject to set
public void add(Object sipheader,
boolean top)
sipheader - SIPHeader to add.top - is true if we want to add to the top of the list.
public void concatenate(SIPHeaderList other,
boolean topFlag)
throws IllegalArgumentException
other - SIPHeaderList to settopFlag - flag which indicates which end to concatenate
the lists.
IllegalArgumentException - if the two lists are not compatible
public void concatenate(SIPHeaderList other)
throws IllegalArgumentException
other - SIPHeaderList
IllegalArgumentException - if the two lists are not compatiblepublic String encode()
encode in class SIPHeaderpublic List getHeadersAsEncodedStrings()
public SIPHeader getFirst()
public SIPHeader getLast()
public Class getMyClass()
public boolean isEmpty()
isEmpty in interface Listpublic ListIterator listIterator()
listIterator in interface Listpublic List getHeaderList()
public ListIterator listIterator(int position)
listIterator in interface Listposition - position for the list iterator to return
public void removeFirst()
public void removeLast()
public boolean remove(SIPHeader obj)
obj - SIPHeader to remove
public String debugDump(int indentation)
debugDump in class SIPObjectindentation - int to set
public String debugDump()
debugDump in class SIPObjectpublic Object[] toArray()
toArray in interface Listpublic int indexOf(gov.nist.core.GenericObject gobj)
public void add(int index,
Object sipHeader)
throws IndexOutOfBoundsException
add in interface Listindex - location where to add the sipHeader.sipHeader - SIPHeader structure to add.
IndexOutOfBoundsExceptionpublic boolean equals(Object other)
equals in interface Listequals in class SIPObjectother - the other object to compare with. true is returned iff the
classes match and list of headers herein is equal to the list
of headers in the target (order of the headers is not
important).public boolean match(SIPHeaderList template)
public void merge(SIPHeaderList mergeHdrList)
mergeHdrList - the template to merge with.public Object clone()
clone in interface Headerpublic int size()
size in interface Listpublic boolean isHeaderList()
isHeaderList in class SIPHeaderpublic boolean addAll(Collection collection)
addAll in interface Listcollection - --
a collection containing the headers to add.
public boolean addAll(int index,
Collection collection)
addAll in interface Listpublic void clear()
clear in interface Listpublic boolean contains(Object header)
contains in interface Listpublic boolean containsAll(Collection collection)
containsAll in interface Listcollection - --
the collection of headers to test against.public Object get(int index)
get in interface Listindex - --
location from which to get the object.public int indexOf(Object obj)
indexOf in interface Listobj - --
object whose index to compute.public Iterator iterator()
iterator in interface Listpublic int lastIndexOf(Object obj)
lastIndexOf in interface Listobj - --
object whose index to find.public boolean remove(Object obj)
remove in interface Listobj - --
object to remove.public Object remove(int index)
remove in interface Listindex - --
index at which to remove the objectpublic boolean removeAll(Collection collection)
removeAll in interface ListList.removeAll(java.util.Collection)public boolean retainAll(Collection collection)
retainAll in interface Listcollection - List.retainAll(java.util.Collection)
public List subList(int index1,
int index2)
subList in interface ListList.subList(int, int)public int hashCode()
Header
hashCode in interface ListhashCode in class SIPHeaderObject.hashCode()
public Object set(int position,
Object sipHdr)
set in interface ListList.set(int, java.lang.Object)public Object[] toArray(Object[] array)
toArray in interface ListList.toArray(java.lang.Object[])
|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||