JSIP API v1.2
November 2006

javax.sip.header
Interface HeaderFactory


public interface HeaderFactory

This interface provides factory methods that allow an application to create Header object from a particular implementation of JAIN SIP. This class is a singleton and can be retrieved from the SipFactory.createHeaderFactory().

Author:
BEA Systems, NIST

Method Summary
 AcceptEncodingHeader createAcceptEncodingHeader(java.lang.String encoding)
          Creates a new AcceptEncodingHeader based on the newly supplied encoding value.
 AcceptHeader createAcceptHeader(java.lang.String contentType, java.lang.String contentSubType)
          Creates a new AcceptHeader based on the newly supplied contentType and contentSubType values.
 AcceptLanguageHeader createAcceptLanguageHeader(java.util.Locale language)
          Creates a new AcceptLanguageHeader based on the newly supplied language value.
 AlertInfoHeader createAlertInfoHeader(URI alertInfo)
          Creates a new AlertInfoHeader based on the newly supplied alertInfo value.
 AllowEventsHeader createAllowEventsHeader(java.lang.String eventType)
          Creates a new AllowEventsHeader based on the newly supplied event type value.
 AllowHeader createAllowHeader(java.lang.String method)
          Creates a new AllowHeader based on the newly supplied method value.
 AuthenticationInfoHeader createAuthenticationInfoHeader(java.lang.String response)
          Creates a new AuthenticationInfoHeader based on the newly supplied response value.
 AuthorizationHeader createAuthorizationHeader(java.lang.String scheme)
          Creates a new AuthorizationHeader based on the newly supplied scheme value.
 CallIdHeader createCallIdHeader(java.lang.String callId)
          Creates a new CallIdHeader based on the newly supplied callId value.
 CallInfoHeader createCallInfoHeader(URI callInfo)
          Creates a new CallInfoHeader based on the newly supplied callInfo value.
 ContactHeader createContactHeader()
          Creates a new wildcard ContactHeader.
 ContactHeader createContactHeader(Address address)
          Creates a new ContactHeader based on the newly supplied address value.
 ContentDispositionHeader createContentDispositionHeader(java.lang.String contentDispositionType)
          Creates a new ContentDispositionHeader based on the newly supplied contentDisposition value.
 ContentEncodingHeader createContentEncodingHeader(java.lang.String encoding)
          Creates a new ContentEncodingHeader based on the newly supplied encoding value.
 ContentLanguageHeader createContentLanguageHeader(java.util.Locale contentLanguage)
          Creates a new ContentLanguageHeader based on the newly supplied contentLanguage value.
 ContentLengthHeader createContentLengthHeader(int contentLength)
          Creates a new ContentLengthHeader based on the newly supplied contentLength value.
 ContentTypeHeader createContentTypeHeader(java.lang.String contentType, java.lang.String contentSubType)
          Creates a new ContentTypeHeader based on the newly supplied contentType and contentSubType values.
 CSeqHeader createCSeqHeader(int sequenceNumber, java.lang.String method)
          Deprecated. Since 1.2. Use createCSeqHeader(long, String) method with type long.
 CSeqHeader createCSeqHeader(long sequenceNumber, java.lang.String method)
          Creates a new CSeqHeader based on the newly supplied sequence number and method values.
 DateHeader createDateHeader(java.util.Calendar date)
          Creates a new DateHeader based on the newly supplied date value.
 ErrorInfoHeader createErrorInfoHeader(URI errorInfo)
          Creates a new ErrorInfoHeader based on the newly supplied errorInfo value.
 EventHeader createEventHeader(java.lang.String eventType)
          Creates a new EventHeader based on the newly supplied eventType value.
 ExpiresHeader createExpiresHeader(int expires)
          Creates a new ExpiresHeader based on the newly supplied expires value.
 FromHeader createFromHeader(Address address, java.lang.String tag)
          Creates a new FromHeader based on the newly supplied address and tag values.
 Header createHeader(java.lang.String name, java.lang.String value)
          Creates a new Header based on the newly supplied name and value values.
 java.util.List createHeaders(java.lang.String headers)
          Creates a new List of Headers based on a supplied comma seperated list of Header values for a single header name.
 InReplyToHeader createInReplyToHeader(java.lang.String callId)
          Creates a new InReplyToHeader based on the newly supplied callId value.
 MaxForwardsHeader createMaxForwardsHeader(int maxForwards)
          Creates a new MaxForwardsHeader based on the newly supplied maxForwards value.
 MimeVersionHeader createMimeVersionHeader(int majorVersion, int minorVersion)
          Creates a new MimeVersionHeader based on the newly supplied mimeVersion values.
 MinExpiresHeader createMinExpiresHeader(int minExpires)
          Creates a new MinExpiresHeader based on the newly supplied minExpires value.
 OrganizationHeader createOrganizationHeader(java.lang.String organization)
          Creates a new OrganizationHeader based on the newly supplied organization value.
 PriorityHeader createPriorityHeader(java.lang.String priority)
          Creates a new PriorityHeader based on the newly supplied priority value.
 ProxyAuthenticateHeader createProxyAuthenticateHeader(java.lang.String scheme)
          Creates a new ProxyAuthenticateHeader based on the newly supplied scheme value.
 ProxyAuthorizationHeader createProxyAuthorizationHeader(java.lang.String scheme)
          Creates a new ProxyAuthorizationHeader based on the newly supplied scheme value.
 ProxyRequireHeader createProxyRequireHeader(java.lang.String optionTag)
          Creates a new ProxyRequireHeader based on the newly supplied optionTag value.
 RAckHeader createRAckHeader(int rSeqNumber, int cSeqNumber, java.lang.String method)
          Creates a new RAckHeader based on the newly supplied rSeqNumber, cSeqNumber and method values.
 ReasonHeader createReasonHeader(java.lang.String protocol, int cause, java.lang.String text)
          Creates a new ReasonHeader based on the newly supplied reason value.
 RecordRouteHeader createRecordRouteHeader(Address address)
          Creates a new RecordRouteHeader based on the newly supplied address value.
 ReferToHeader createReferToHeader(Address address)
          Creates a new ReferToHeader based on the newly supplied address value.
 ReplyToHeader createReplyToHeader(Address address)
          Creates a new ReplyToHeader based on the newly supplied address value.
 RequireHeader createRequireHeader(java.lang.String optionTag)
          Creates a new RequireHeader based on the newly supplied optionTag value.
 RetryAfterHeader createRetryAfterHeader(int retryAfter)
          Creates a new RetryAfterHeader based on the newly supplied retryAfter value.
 RouteHeader createRouteHeader(Address address)
          Creates a new RouteHeader based on the newly supplied address value.
 RSeqHeader createRSeqHeader(int sequenceNumber)
          Creates a new RSeqHeader based on the newly supplied sequenceNumber value.
 ServerHeader createServerHeader(java.util.List product)
          Creates a new ServerHeader based on the newly supplied List of product values.
 SIPETagHeader createSIPETagHeader(java.lang.String etag)
          Creates a new SIP-ETag header with the supplied tag value
 SIPIfMatchHeader createSIPIfMatchHeader(java.lang.String etag)
          Creates a new SIP-If-Match header with the supplied tag value
 SubjectHeader createSubjectHeader(java.lang.String subject)
          Creates a new SubjectHeader based on the newly supplied subject value.
 SubscriptionStateHeader createSubscriptionStateHeader(java.lang.String subscriptionState)
          Creates a new SubscriptionStateHeader based on the newly supplied subscriptionState value.
 SupportedHeader createSupportedHeader(java.lang.String optionTag)
          Creates a new SupportedHeader based on the newly supplied optionTag value.
 TimeStampHeader createTimeStampHeader(float timeStamp)
          Creates a new TimeStampHeader based on the newly supplied timeStamp value.
 ToHeader createToHeader(Address address, java.lang.String tag)
          Creates a new ToHeader based on the newly supplied address and tag values.
 UnsupportedHeader createUnsupportedHeader(java.lang.String optionTag)
          Creates a new UnsupportedHeader based on the newly supplied optionTag value.
 UserAgentHeader createUserAgentHeader(java.util.List product)
          Creates a new UserAgentHeader based on the newly supplied List of product values.
 ViaHeader createViaHeader(java.lang.String host, int port, java.lang.String transport, java.lang.String branch)
          Creates a new ViaHeader based on the newly supplied uri and branch values.
 WarningHeader createWarningHeader(java.lang.String agent, int code, java.lang.String comment)
          Creates a new WarningHeader based on the newly supplied agent, code and comment values.
 WWWAuthenticateHeader createWWWAuthenticateHeader(java.lang.String scheme)
          Creates a new WWWAuthenticateHeader based on the newly supplied scheme value.
 

Method Detail

createAcceptEncodingHeader

AcceptEncodingHeader createAcceptEncodingHeader(java.lang.String encoding)
                                                throws java.text.ParseException
Creates a new AcceptEncodingHeader based on the newly supplied encoding value.

Parameters:
encoding - the new string containing the encoding value.
Returns:
the newly created AcceptEncodingHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the encoding value.

createAcceptHeader

AcceptHeader createAcceptHeader(java.lang.String contentType,
                                java.lang.String contentSubType)
                                throws java.text.ParseException
Creates a new AcceptHeader based on the newly supplied contentType and contentSubType values.

Parameters:
contentType - the new string content type value.
contentSubType - the new string content sub-type value.
Returns:
the newly created AcceptHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the content type or content subtype value.

createAcceptLanguageHeader

AcceptLanguageHeader createAcceptLanguageHeader(java.util.Locale language)
Creates a new AcceptLanguageHeader based on the newly supplied language value.

Parameters:
language - the new Locale value of the language
Returns:
the newly created AcceptLanguageHeader object.

createAlertInfoHeader

AlertInfoHeader createAlertInfoHeader(URI alertInfo)
Creates a new AlertInfoHeader based on the newly supplied alertInfo value.

Parameters:
alertInfo - the new URI value of the alertInfo
Returns:
the newly created AlertInfoHeader object.

createAllowEventsHeader

AllowEventsHeader createAllowEventsHeader(java.lang.String eventType)
                                          throws java.text.ParseException
Creates a new AllowEventsHeader based on the newly supplied event type value.

Parameters:
eventType - the new string containing the eventType value.
Returns:
the newly created AllowEventsHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the eventType value.

createAllowHeader

AllowHeader createAllowHeader(java.lang.String method)
                              throws java.text.ParseException
Creates a new AllowHeader based on the newly supplied method value.

Parameters:
method - the new string containing the method value.
Returns:
the newly created AllowHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the method value.

createAuthenticationInfoHeader

AuthenticationInfoHeader createAuthenticationInfoHeader(java.lang.String response)
                                                        throws java.text.ParseException
Creates a new AuthenticationInfoHeader based on the newly supplied response value.

Parameters:
response - the new string value of the response.
Returns:
the newly created AuthenticationInfoHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the response value.

createAuthorizationHeader

AuthorizationHeader createAuthorizationHeader(java.lang.String scheme)
                                              throws java.text.ParseException
Creates a new AuthorizationHeader based on the newly supplied scheme value.

Parameters:
scheme - the new string value of the scheme.
Returns:
the newly created AuthorizationHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the scheme value.

createCSeqHeader

CSeqHeader createCSeqHeader(int sequenceNumber,
                            java.lang.String method)
                            throws java.text.ParseException,
                                   InvalidArgumentException
Deprecated. Since 1.2. Use createCSeqHeader(long, String) method with type long.

Creates a new CSeqHeader based on the newly supplied sequence number and method values.

Parameters:
sequenceNumber - the new integer value of the sequence number.
method - the new string value of the method.
Returns:
the newly created CSeqHeader object.
Throws:
InvalidArgumentException - if supplied sequence number is less than zero.
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the method value.

createCSeqHeader

CSeqHeader createCSeqHeader(long sequenceNumber,
                            java.lang.String method)
                            throws java.text.ParseException,
                                   InvalidArgumentException
Creates a new CSeqHeader based on the newly supplied sequence number and method values.

Parameters:
sequenceNumber - the new long value of the sequence number.
method - the new string value of the method.
Returns:
the newly created CSeqHeader object.
Throws:
InvalidArgumentException - if supplied sequence number is less than zero.
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the method value.
Since:
v1.2

createCallIdHeader

CallIdHeader createCallIdHeader(java.lang.String callId)
                                throws java.text.ParseException
Creates a new CallIdHeader based on the newly supplied callId value.

Parameters:
callId - the new string value of the call-id.
Returns:
the newly created CallIdHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the callId value.

createCallInfoHeader

CallInfoHeader createCallInfoHeader(URI callInfo)
Creates a new CallInfoHeader based on the newly supplied callInfo value.

Parameters:
callInfo - the new URI value of the callInfo.
Returns:
the newly created CallInfoHeader object.

createContactHeader

ContactHeader createContactHeader(Address address)
Creates a new ContactHeader based on the newly supplied address value.

Parameters:
address - the new Address value of the address.
Returns:
the newly created ContactHeader object.

createContactHeader

ContactHeader createContactHeader()
Creates a new wildcard ContactHeader. This is used in Register requests to indicate to the server that it should remove all locations the at which the user is currently available. This implies that the following conditions are met:

Returns:
the newly created wildcard ContactHeader.

createContentDispositionHeader

ContentDispositionHeader createContentDispositionHeader(java.lang.String contentDispositionType)
                                                        throws java.text.ParseException
Creates a new ContentDispositionHeader based on the newly supplied contentDisposition value.

Parameters:
contentDispositionType - the new string value of the contentDisposition.
Returns:
the newly created ContentDispositionHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the contentDisposition value.

createContentEncodingHeader

ContentEncodingHeader createContentEncodingHeader(java.lang.String encoding)
                                                  throws java.text.ParseException
Creates a new ContentEncodingHeader based on the newly supplied encoding value.

Parameters:
encoding - the new string containing the encoding value.
Returns:
the newly created ContentEncodingHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the encoding value.

createContentLanguageHeader

ContentLanguageHeader createContentLanguageHeader(java.util.Locale contentLanguage)
Creates a new ContentLanguageHeader based on the newly supplied contentLanguage value.

Parameters:
contentLanguage - the new Locale value of the contentLanguage.
Returns:
the newly created ContentLanguageHeader object.

createContentLengthHeader

ContentLengthHeader createContentLengthHeader(int contentLength)
                                              throws InvalidArgumentException
Creates a new ContentLengthHeader based on the newly supplied contentLength value.

Parameters:
contentLength - the new integer value of the contentLength.
Returns:
the newly created ContentLengthHeader object.
Throws:
InvalidArgumentException - if supplied contentLength is less than zero.

createContentTypeHeader

ContentTypeHeader createContentTypeHeader(java.lang.String contentType,
                                          java.lang.String contentSubType)
                                          throws java.text.ParseException
Creates a new ContentTypeHeader based on the newly supplied contentType and contentSubType values.

Parameters:
contentType - the new string content type value.
contentSubType - the new string content sub-type value.
Returns:
the newly created ContentTypeHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the content type or content subtype value.

createDateHeader

DateHeader createDateHeader(java.util.Calendar date)
Creates a new DateHeader based on the newly supplied date value.

Parameters:
date - the new Calender value of the date.
Returns:
the newly created DateHeader object.

createErrorInfoHeader

ErrorInfoHeader createErrorInfoHeader(URI errorInfo)
Creates a new ErrorInfoHeader based on the newly supplied errorInfo value.

Parameters:
errorInfo - the new URI value of the errorInfo.
Returns:
the newly created ErrorInfoHeader object.

createEventHeader

EventHeader createEventHeader(java.lang.String eventType)
                              throws java.text.ParseException
Creates a new EventHeader based on the newly supplied eventType value.

Parameters:
eventType - the new string value of the eventType.
Returns:
the newly created EventHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the eventType value.

createExpiresHeader

ExpiresHeader createExpiresHeader(int expires)
                                  throws InvalidArgumentException
Creates a new ExpiresHeader based on the newly supplied expires value.

Parameters:
expires - the new integer value of the expires.
Returns:
the newly created ExpiresHeader object.
Throws:
InvalidArgumentException - if supplied expires is less than zero.

createHeader

Header createHeader(java.lang.String name,
                    java.lang.String value)
                    throws java.text.ParseException
Creates a new Header based on the newly supplied name and value values. This method can be used to create ExtensionHeaders.

Parameters:
name - the new string name of the Header value.
value - the new string value of the Header.
Returns:
the newly created Header object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the name or value values.
See Also:
ExtensionHeader

createHeaders

java.util.List createHeaders(java.lang.String headers)
                             throws java.text.ParseException
Creates a new List of Headers based on a supplied comma seperated list of Header values for a single header name. This method can be used only for SIP headers whose grammar is of the form header = header-name HCOLON header-value *(COMMA header-value) that allows for combining header fields of the same name into a comma-separated list. Note that the Contact header field allows a comma-separated list unless the header field value is "*"

Parameters:
headers - the new string comma seperated list of Header values.
Returns:
the newly created List of Header objects.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the headers value or a List of that Header type is not allowed.

createFromHeader

FromHeader createFromHeader(Address address,
                            java.lang.String tag)
                            throws java.text.ParseException
Creates a new FromHeader based on the newly supplied address and tag values.

Parameters:
address - the new Address object of the address.
tag - the new string value of the tag.
Returns:
the newly created FromHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the tag value.

createInReplyToHeader

InReplyToHeader createInReplyToHeader(java.lang.String callId)
                                      throws java.text.ParseException
Creates a new InReplyToHeader based on the newly supplied callId value.

Parameters:
callId - the new string containing the callId value.
Returns:
the newly created InReplyToHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the callId value.

createMaxForwardsHeader

MaxForwardsHeader createMaxForwardsHeader(int maxForwards)
                                          throws InvalidArgumentException
Creates a new MaxForwardsHeader based on the newly supplied maxForwards value.

Parameters:
maxForwards - the new integer value of the maxForwards.
Returns:
the newly created MaxForwardsHeader object.
Throws:
InvalidArgumentException - if supplied maxForwards is less than zero or greater than 255.

createMimeVersionHeader

MimeVersionHeader createMimeVersionHeader(int majorVersion,
                                          int minorVersion)
                                          throws InvalidArgumentException
Creates a new MimeVersionHeader based on the newly supplied mimeVersion values.

Parameters:
majorVersion - the new integer value of the majorVersion.
minorVersion - the new integer value of the minorVersion.
Returns:
the newly created MimeVersionHeader object.
Throws:
InvalidArgumentException - if supplied majorVersion or minorVersion is less than zero.

createMinExpiresHeader

MinExpiresHeader createMinExpiresHeader(int minExpires)
                                        throws InvalidArgumentException
Creates a new MinExpiresHeader based on the newly supplied minExpires value.

Parameters:
minExpires - the new integer value of the minExpires.
Returns:
the newly created MinExpiresHeader object.
Throws:
InvalidArgumentException - if supplied minExpires is less than zero.

createOrganizationHeader

OrganizationHeader createOrganizationHeader(java.lang.String organization)
                                            throws java.text.ParseException
Creates a new OrganizationHeader based on the newly supplied organization value.

Parameters:
organization - the new string value of the organization.
Returns:
the newly created OrganizationHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the organization value.

createPriorityHeader

PriorityHeader createPriorityHeader(java.lang.String priority)
                                    throws java.text.ParseException
Creates a new PriorityHeader based on the newly supplied priority value.

Parameters:
priority - the new string value of the priority.
Returns:
the newly created PriorityHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the priority value.

createProxyAuthenticateHeader

ProxyAuthenticateHeader createProxyAuthenticateHeader(java.lang.String scheme)
                                                      throws java.text.ParseException
Creates a new ProxyAuthenticateHeader based on the newly supplied scheme value.

Parameters:
scheme - the new string value of the scheme.
Returns:
the newly created ProxyAuthenticateHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the scheme value.

createProxyAuthorizationHeader

ProxyAuthorizationHeader createProxyAuthorizationHeader(java.lang.String scheme)
                                                        throws java.text.ParseException
Creates a new ProxyAuthorizationHeader based on the newly supplied scheme value.

Parameters:
scheme - the new string value of the scheme.
Returns:
the newly created ProxyAuthorizationHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the scheme value.

createProxyRequireHeader

ProxyRequireHeader createProxyRequireHeader(java.lang.String optionTag)
                                            throws java.text.ParseException
Creates a new ProxyRequireHeader based on the newly supplied optionTag value.

Parameters:
optionTag - the new string OptionTag value.
Returns:
the newly created ProxyRequireHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the optionTag value.

createRAckHeader

RAckHeader createRAckHeader(int rSeqNumber,
                            int cSeqNumber,
                            java.lang.String method)
                            throws InvalidArgumentException,
                                   java.text.ParseException
Creates a new RAckHeader based on the newly supplied rSeqNumber, cSeqNumber and method values.

Parameters:
rSeqNumber - the new integer value of the rSeqNumber.
cSeqNumber - the new integer value of the cSeqNumber.
method - the new string value of the method.
Returns:
the newly created RAckHeader object.
Throws:
InvalidArgumentException - if supplied rSeqNumber or cSeqNumber is less than zero or greater than than 2**31-1.
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the method value.

createRSeqHeader

RSeqHeader createRSeqHeader(int sequenceNumber)
                            throws InvalidArgumentException
Creates a new RSeqHeader based on the newly supplied sequenceNumber value.

Parameters:
sequenceNumber - the new integer value of the sequenceNumber.
Returns:
the newly created RSeqHeader object.
Throws:
InvalidArgumentException - if supplied sequenceNumber is less than zero or greater than than 2**31-1.

createReasonHeader

ReasonHeader createReasonHeader(java.lang.String protocol,
                                int cause,
                                java.lang.String text)
                                throws InvalidArgumentException,
                                       java.text.ParseException
Creates a new ReasonHeader based on the newly supplied reason value.

Parameters:
protocol - the new string value of the protocol.
cause - the new integer value of the cause.
text - the new string value of the text.
Returns:
the newly created ReasonHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the protocol or text value.
InvalidArgumentException - if supplied cause is less than zero.

createRecordRouteHeader

RecordRouteHeader createRecordRouteHeader(Address address)
Creates a new RecordRouteHeader based on the newly supplied address value.

Parameters:
address - the new Address object of the address.
Returns:
the newly created RecordRouteHeader object.

createReplyToHeader

ReplyToHeader createReplyToHeader(Address address)
Creates a new ReplyToHeader based on the newly supplied address value.

Parameters:
address - the new Address object of the address.
Returns:
the newly created ReplyToHeader object.

createReferToHeader

ReferToHeader createReferToHeader(Address address)
Creates a new ReferToHeader based on the newly supplied address value.

Parameters:
address - the new Address object of the address.
Returns:
the newly created ReferToHeader object.

createRequireHeader

RequireHeader createRequireHeader(java.lang.String optionTag)
                                  throws java.text.ParseException
Creates a new RequireHeader based on the newly supplied optionTag value.

Parameters:
optionTag - the new string value containing the optionTag value.
Returns:
the newly created RequireHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the List of optionTag value.

createRetryAfterHeader

RetryAfterHeader createRetryAfterHeader(int retryAfter)
                                        throws InvalidArgumentException
Creates a new RetryAfterHeader based on the newly supplied retryAfter value.

Parameters:
retryAfter - the new integer value of the retryAfter.
Returns:
the newly created RetryAfterHeader object.
Throws:
InvalidArgumentException - if supplied retryAfter is less than zero.

createRouteHeader

RouteHeader createRouteHeader(Address address)
Creates a new RouteHeader based on the newly supplied address value.

Parameters:
address - the new Address object of the address.
Returns:
the newly created RouteHeader object.

createServerHeader

ServerHeader createServerHeader(java.util.List product)
                                throws java.text.ParseException
Creates a new ServerHeader based on the newly supplied List of product values.

Parameters:
product - the new List of values of the product.
Returns:
the newly created ServerHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the List of product values.

createSubjectHeader

SubjectHeader createSubjectHeader(java.lang.String subject)
                                  throws java.text.ParseException
Creates a new SubjectHeader based on the newly supplied subject value.

Parameters:
subject - the new string value of the subject.
Returns:
the newly created SubjectHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the subject value.

createSubscriptionStateHeader

SubscriptionStateHeader createSubscriptionStateHeader(java.lang.String subscriptionState)
                                                      throws java.text.ParseException
Creates a new SubscriptionStateHeader based on the newly supplied subscriptionState value.

Parameters:
subscriptionState - the new string value of the subscriptionState.
Returns:
the newly created SubscriptionStateHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the subscriptionState value.

createSupportedHeader

SupportedHeader createSupportedHeader(java.lang.String optionTag)
                                      throws java.text.ParseException
Creates a new SupportedHeader based on the newly supplied optionTag value.

Parameters:
optionTag - the new string containing the optionTag value.
Returns:
the newly created SupportedHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the optionTag value.

createTimeStampHeader

TimeStampHeader createTimeStampHeader(float timeStamp)
                                      throws InvalidArgumentException
Creates a new TimeStampHeader based on the newly supplied timeStamp value.

Parameters:
timeStamp - the new float value of the timeStamp.
Returns:
the newly created TimeStampHeader object.
Throws:
InvalidArgumentException - if supplied timeStamp is less than zero.

createToHeader

ToHeader createToHeader(Address address,
                        java.lang.String tag)
                        throws java.text.ParseException
Creates a new ToHeader based on the newly supplied address and tag values.

Parameters:
address - the new Address object of the address.
tag - the new string value of the tag, this value may be null.
Returns:
the newly created ToHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the tag value.

createUnsupportedHeader

UnsupportedHeader createUnsupportedHeader(java.lang.String optionTag)
                                          throws java.text.ParseException
Creates a new UnsupportedHeader based on the newly supplied optionTag value.

Parameters:
optionTag - the new string containing the optionTag value.
Returns:
the newly created UnsupportedHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the List of optionTag value.

createUserAgentHeader

UserAgentHeader createUserAgentHeader(java.util.List product)
                                      throws java.text.ParseException
Creates a new UserAgentHeader based on the newly supplied List of product values.

Parameters:
product - the new List of values of the product.
Returns:
the newly created UserAgentHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the List of product values.

createViaHeader

ViaHeader createViaHeader(java.lang.String host,
                          int port,
                          java.lang.String transport,
                          java.lang.String branch)
                          throws java.text.ParseException,
                                 InvalidArgumentException
Creates a new ViaHeader based on the newly supplied uri and branch values.

Parameters:
host - the new string value of the host.
port - the new integer value of the port.
transport - the new string value of the transport.
branch - the new string value of the branch.
Returns:
the newly created ViaHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the host, transport or branch value.
InvalidArgumentException - if the supplied port is invalid.

createWWWAuthenticateHeader

WWWAuthenticateHeader createWWWAuthenticateHeader(java.lang.String scheme)
                                                  throws java.text.ParseException
Creates a new WWWAuthenticateHeader based on the newly supplied scheme value.

Parameters:
scheme - the new string value of the scheme.
Returns:
the newly created WWWAuthenticateHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the scheme values.

createWarningHeader

WarningHeader createWarningHeader(java.lang.String agent,
                                  int code,
                                  java.lang.String comment)
                                  throws InvalidArgumentException,
                                         java.text.ParseException
Creates a new WarningHeader based on the newly supplied agent, code and comment values.

Parameters:
agent - the new string value of the agent.
code - the new boolean integer of the code.
comment - the new string value of the comment.
Returns:
the newly created WarningHeader object.
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the agent or comment values.
InvalidArgumentException - if an invalid integer code is given for the WarningHeader.

createSIPETagHeader

SIPETagHeader createSIPETagHeader(java.lang.String etag)
                                  throws java.text.ParseException
Creates a new SIP-ETag header with the supplied tag value

Parameters:
etag - the new tag token
Returns:
the newly created SIP-ETag header
Throws:
java.text.ParseException - when an error occurs during parsing of the etag parameter
Since:
1.2

createSIPIfMatchHeader

SIPIfMatchHeader createSIPIfMatchHeader(java.lang.String etag)
                                        throws java.text.ParseException
Creates a new SIP-If-Match header with the supplied tag value

Parameters:
etag - the new tag token
Returns:
the newly created SIP-If-Match header
Throws:
java.text.ParseException - when an error occurs during parsing of the etag parameter
Since:
1.2

JSIP API v1.2
November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems