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

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
すべての実装されたインタフェース:
SIPHeaderNames, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, javax.sip.header.Header
直系の既知のサブクラス:
AcceptEncodingList, AcceptLanguageList, AcceptList, AlertInfoList, AllowEventsList, AllowList, AuthenticationInfoList, AuthorizationList, CallInfoList, ContactList, ContentEncodingList, ContentLanguageList, ErrorInfoList, ExtensionHeaderList, InReplyToList, ProxyAuthenticateList, ProxyRequireList, ReasonList, RecordRouteList, RequireList, RouteList, SupportedList, UnsupportedList, ViaList, WarningList, WWWAuthenticateList

public class SIPHeaderList
extends SIPHeader
implements java.util.List

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

バージョン:
JAIN-SIP-1.1 $Revision: 1.2 $ $Date: 2004/01/22 13:26:29 $
関連項目:
直列化された形式

フィールドの概要
 
インタフェース 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
 
コンストラクタの概要
SIPHeaderList(java.lang.Class objclass, java.lang.String hname)
          Constructor
SIPHeaderList(SIPObjectList hl, java.lang.String hname)
          Constructor
SIPHeaderList(java.lang.String hName)
          Constructor
SIPHeaderList(java.lang.String classname, java.lang.String hname)
          Constructor
 
メソッドの概要
 void add(int position, java.lang.Object headerToAdd)
          Add an element at a specified position.
 void add(int index, SIPHeader sipHeader)
          insert at a location.
 boolean add(java.lang.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(SIPHeader sipheader, boolean top)
          Add to this list.
 boolean addAll(java.util.Collection collection)
          Add a collection of headers.
 boolean addAll(int index, java.util.Collection collection)
          Add all the elements of this collection.
 void addFirst(java.lang.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()
           
 java.lang.Object clone()
          make a clone of this header list.
 void concatenate(SIPHeaderList other)
          Concatenate two compatible lists.
 void concatenate(SIPHeaderList other, boolean top)
          Concatenate two compatible lists.
 boolean contains(java.lang.Object header)
           
 boolean containsAll(java.util.Collection collection)
          Check if the list contains all the headers in this collection.
 java.lang.String debugDump()
          convert to a string representation
 java.lang.String debugDump(int indentation)
          convert to a string representation (for printing).
 java.lang.String encode()
          Encode a list of sip headers.
 boolean equals(java.lang.Object other)
          Equality comparison operator.
 SIPObject first()
          Initialize the iterator for a loop
 java.lang.Object get(int index)
          Get the object at the specified location.
 SIPHeader getFirst()
          Get the first element of this list.
 SIPObjectList getHeaderList()
          Get the imbedded linked list.
 java.util.LinkedList getHeadersAsEncodedStrings()
          Return a list of encoded strings (one for each sipheader).
 SIPHeader getLast()
          Get the last element of this list.
 java.lang.Class getMyClass()
          Get the class for the headers of this list.
 int indexOf(GenericObject gobj)
          index of an element.
 int indexOf(java.lang.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).
 java.util.Iterator iterator()
          Return the iterator to the imbedded list.
 int lastIndexOf(java.lang.Object obj)
          Get the last index of the given object.
 java.util.ListIterator listIterator()
          Get an initialized iterator for my imbedded list
 java.util.ListIterator listIterator(int position)
          Get the list iterator for a given position.
 boolean match(java.lang.Object template)
          Template match against a template.
 void merge(java.lang.Object mergeObject)
          Merge this with a given template.
 SIPObject next()
          Get the next element in the list .
 SIPObject next(java.util.ListIterator iterator)
          Get the next item for an iterative scan of the list
 java.lang.Object remove(int index)
          Remove the object at a given index.
 boolean remove(java.lang.Object obj)
          Remove the given object.
 boolean remove(SIPHeader obj)
          Remove a sip header from this list of sip headers.
 void removeAll(java.lang.Class cl)
          Remove all occurances of a given class of SIPObject from the SIP object list.
 boolean removeAll(java.util.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(java.util.Collection collection)
           
 java.lang.Object set(int index, java.lang.Object obj)
           
 int size()
          Get the number of headers in the list.
 java.util.List subList(int index1, int index2)
           
 java.lang.Object[] toArray()
          Array conversion.
 java.lang.Object[] toArray(java.lang.Object[] obj)
           
 java.lang.String toString()
          Encode this to a string representation.
 
クラス gov.nist.javax.sip.header.SIPHeader から継承されたメソッド
getHeaderName, getHeaderValue, getName, getValue, setHeaderName
 
クラス gov.nist.javax.sip.header.SIPObject から継承されたメソッド
dbgPrint, replace, replace, replace, replace
 
クラス gov.nist.core.GenericObject から継承されたメソッド
getClassFromName, getMatcher, isMySubclass, setMatcher
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース java.util.List から継承されたメソッド
hashCode
 

コンストラクタの詳細

SIPHeaderList

public SIPHeaderList(SIPObjectList hl,
                     java.lang.String hname)
Constructor

パラメータ:
hl - SIPObjectList to set
hname - String to set

SIPHeaderList

public SIPHeaderList(java.lang.String hName)
Constructor

パラメータ:
hName - String to set

SIPHeaderList

public SIPHeaderList(java.lang.Class objclass,
                     java.lang.String hname)
Constructor

パラメータ:
objclass - Class to set
hname - String to set

SIPHeaderList

public SIPHeaderList(java.lang.String classname,
                     java.lang.String hname)
Constructor

パラメータ:
classname - String to set
hname - String to set
メソッドの詳細

add

public boolean add(java.lang.Object objectToAdd)
Concatenate the list of stuff that we are keeping around and also the text corresponding to these structures (that we parsed).

定義:
インタフェース java.util.Collection 内の add
定義:
インタフェース java.util.List 内の add
パラメータ:
objectToAdd - GenericObject to set

addFirst

public void addFirst(java.lang.Object obj)
Concatenate the list of stuff that we are keeping around and also the text corresponding to these structures (that we parsed).

パラメータ:
obj - Genericobject to set

add

public void add(SIPHeader sipheader,
                boolean top)
Add to this list.

パラメータ:
sipheader - SIPHeader to add.
top - is true if we want to add to the top of the list.

concatenate

public void concatenate(SIPHeaderList other,
                        boolean top)
                 throws java.lang.IllegalArgumentException
Concatenate two compatible lists. This appends or prepends the new list to the end of this list.

パラメータ:
other - SIPHeaderList to set
top - boolean to set
例外:
java.lang.IllegalArgumentException - if the two lists are not compatible

concatenate

public void concatenate(SIPHeaderList other)
                 throws java.lang.IllegalArgumentException
Concatenate two compatible lists. This appends the new list to the end of this list (which is the most common mode for this operation).

パラメータ:
other - SIPHeaderList
例外:
java.lang.IllegalArgumentException - if the two lists are not compatible

encode

public java.lang.String encode()
Encode a list of sip headers. Headers are returned in cannonical form.

オーバーライド:
クラス SIPHeader 内の encode
戻り値:
String encoded string representation of this list of headers. (Contains string append of each encoded header).

getHeadersAsEncodedStrings

public java.util.LinkedList getHeadersAsEncodedStrings()
Return a list of encoded strings (one for each sipheader).

戻り値:
LinkedList containing encoded strings in this header list. an empty list is returned if this header list contains no sip headers.

first

public SIPObject first()
Initialize the iterator for a loop

戻り値:
SIPObject first element of the list.

getFirst

public SIPHeader getFirst()
Get the first element of this list.

戻り値:
SIPHeader first element of the list.

getLast

public SIPHeader getLast()
Get the last element of this list.

戻り値:
SIPHeader last element of the list.

getMyClass

public java.lang.Class getMyClass()
Get the class for the headers of this list.

戻り値:
Class of header supported by this list.

isEmpty

public boolean isEmpty()
Empty check

定義:
インタフェース java.util.Collection 内の isEmpty
定義:
インタフェース java.util.List 内の isEmpty
戻り値:
boolean true if list is empty

listIterator

public java.util.ListIterator listIterator()
Get an initialized iterator for my imbedded list

定義:
インタフェース java.util.List 内の listIterator
戻り値:
the generated ListIterator

getHeaderList

public SIPObjectList getHeaderList()
Get the imbedded linked list.

戻り値:
the imedded linked list of SIP headers.

listIterator

public java.util.ListIterator listIterator(int position)
Get the list iterator for a given position.

定義:
インタフェース java.util.List 内の listIterator
パラメータ:
position - position for the list iterator to return
戻り値:
the generated list iterator

next

public SIPObject next()
Get the next element in the list . This is not thread safe and cannot handle nesting

戻り値:
SIPObject next object in this list.

next

public SIPObject next(java.util.ListIterator iterator)
Get the next item for an iterative scan of the list

パラメータ:
iterator - ListIterator
戻り値:
SIPObject next object in this list.

removeAll

public void removeAll(java.lang.Class cl)
Remove all occurances of a given class of SIPObject from the SIP object list.

パラメータ:
cl - Class to set

removeFirst

public void removeFirst()
Remove the first element of this list.


removeLast

public void removeLast()
Remove the last element of this list.


remove

public boolean remove(SIPHeader obj)
Remove a sip header from this list of sip headers.

パラメータ:
obj - SIPHeader to set
戻り値:
boolean

debugDump

public java.lang.String debugDump(int indentation)
convert to a string representation (for printing).

オーバーライド:
クラス SIPObject 内の debugDump
パラメータ:
indentation - int to set
戻り値:
String string representation of object (for printing).

debugDump

public java.lang.String debugDump()
convert to a string representation

オーバーライド:
クラス SIPObject 内の debugDump
戻り値:
String

toArray

public java.lang.Object[] toArray()
Array conversion.

定義:
インタフェース java.util.Collection 内の toArray
定義:
インタフェース java.util.List 内の toArray
戻り値:
SIPHeader []

indexOf

public int indexOf(GenericObject gobj)
index of an element.

戻り値:
index of the given element (-1) if element does not exist.

add

public void add(int index,
                SIPHeader sipHeader)
         throws java.lang.IndexOutOfBoundsException
insert at a location.

パラメータ:
index - location where to add the sipHeader.
sipHeader - SIPHeader structure to add.
例外:
java.lang.IndexOutOfBoundsException

equals

public boolean equals(java.lang.Object other)
Equality comparison operator.

定義:
インタフェース java.util.Collection 内の equals
定義:
インタフェース java.util.List 内の equals
定義:
インタフェース javax.sip.header.Header 内の equals
オーバーライド:
クラス SIPObject 内の equals
パラメータ:
other - 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).
戻り値:
true if the objects are euqal and false otherwise

match

public boolean match(java.lang.Object template)
Template match against a template. null field in template indicates wild card match.

オーバーライド:
クラス SIPObject 内の match
パラメータ:
template - the match pattern to test against. The match object has to be of the same type (class). Primitive types and non-sip fields that are non null are matched for equality. Null in any field matches anything. Some book-keeping fields are ignored when making the comparison.

merge

public void merge(java.lang.Object mergeObject)
Merge this with a given template.

オーバーライド:
クラス SIPObject 内の merge
パラメータ:
mergeObject - the template to merge with.

clone

public java.lang.Object clone()
make a clone of this header list.

定義:
インタフェース javax.sip.header.Header 内の clone
オーバーライド:
クラス SIPObject 内の clone
戻り値:
clone of this Header.

size

public int size()
Get the number of headers in the list.

定義:
インタフェース java.util.Collection 内の size
定義:
インタフェース java.util.List 内の size

isHeaderList

public boolean isHeaderList()
Return true if this is a header list (overrides the base class method which returns false).

オーバーライド:
クラス SIPHeader 内の isHeaderList
戻り値:
true

toString

public java.lang.String toString()
Encode this to a string representation. This is an alias to the encode function above.

定義:
インタフェース javax.sip.header.Header 内の toString
オーバーライド:
クラス SIPObject 内の toString

add

public void add(int position,
                java.lang.Object headerToAdd)
Add an element at a specified position.

定義:
インタフェース java.util.List 内の add
パラメータ:
headerToAdd - -- the header to add.

addAll

public boolean addAll(java.util.Collection collection)
Add a collection of headers.

定義:
インタフェース java.util.Collection 内の addAll
定義:
インタフェース java.util.List 内の addAll
パラメータ:
collection - -- a collection containing the headers to add.

addAll

public boolean addAll(int index,
                      java.util.Collection collection)
Add all the elements of this collection.

定義:
インタフェース java.util.List 内の addAll

clear

public void clear()
定義:
インタフェース java.util.Collection 内の clear
定義:
インタフェース java.util.List 内の clear

contains

public boolean contains(java.lang.Object header)
定義:
インタフェース java.util.Collection 内の contains
定義:
インタフェース java.util.List 内の contains

containsAll

public boolean containsAll(java.util.Collection collection)
Check if the list contains all the headers in this collection.

定義:
インタフェース java.util.Collection 内の containsAll
定義:
インタフェース java.util.List 内の containsAll
パラメータ:
collection - -- the collection of headers to test against.

get

public java.lang.Object get(int index)
Get the object at the specified location.

定義:
インタフェース java.util.List 内の get
パラメータ:
index - -- location from which to get the object.

indexOf

public int indexOf(java.lang.Object obj)
Return the index of a given object.

定義:
インタフェース java.util.List 内の indexOf
パラメータ:
obj - -- object whose index to compute.

iterator

public java.util.Iterator iterator()
Return the iterator to the imbedded list.

定義:
インタフェース java.lang.Iterable 内の iterator
定義:
インタフェース java.util.Collection 内の iterator
定義:
インタフェース java.util.List 内の iterator
戻り値:
iterator to the imbedded list.

lastIndexOf

public int lastIndexOf(java.lang.Object obj)
Get the last index of the given object.

定義:
インタフェース java.util.List 内の lastIndexOf
パラメータ:
obj - -- object whose index to find.

remove

public boolean remove(java.lang.Object obj)
Remove the given object.

定義:
インタフェース java.util.Collection 内の remove
定義:
インタフェース java.util.List 内の remove
パラメータ:
obj - -- object to remove.

remove

public java.lang.Object remove(int index)
Remove the object at a given index.

定義:
インタフェース java.util.List 内の remove
パラメータ:
index - -- index at which to remove the object

removeAll

public boolean removeAll(java.util.Collection collection)
Remove all the elements.

定義:
インタフェース java.util.Collection 内の removeAll
定義:
インタフェース java.util.List 内の removeAll

retainAll

public boolean retainAll(java.util.Collection collection)
定義:
インタフェース java.util.Collection 内の retainAll
定義:
インタフェース java.util.List 内の retainAll

set

public java.lang.Object set(int index,
                            java.lang.Object obj)
定義:
インタフェース java.util.List 内の set

subList

public java.util.List subList(int index1,
                              int index2)
定義:
インタフェース java.util.List 内の subList

toArray

public java.lang.Object[] toArray(java.lang.Object[] obj)
定義:
インタフェース java.util.Collection 内の toArray
定義:
インタフェース java.util.List 内の toArray