|
JSIP API v1.2 November 2006 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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()
.
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 |
---|
AcceptEncodingHeader createAcceptEncodingHeader(java.lang.String encoding) throws java.text.ParseException
encoding
- the new string containing the encoding value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the encoding value.AcceptHeader createAcceptHeader(java.lang.String contentType, java.lang.String contentSubType) throws java.text.ParseException
contentType
- the new string content type value.contentSubType
- the new string content sub-type value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the content type or content subtype value.AcceptLanguageHeader createAcceptLanguageHeader(java.util.Locale language)
language
- the new Locale value of the language
AlertInfoHeader createAlertInfoHeader(URI alertInfo)
alertInfo
- the new URI value of the alertInfo
AllowEventsHeader createAllowEventsHeader(java.lang.String eventType) throws java.text.ParseException
eventType
- the new string containing the eventType value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the eventType value.AllowHeader createAllowHeader(java.lang.String method) throws java.text.ParseException
method
- the new string containing the method value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the method value.AuthenticationInfoHeader createAuthenticationInfoHeader(java.lang.String response) throws java.text.ParseException
response
- the new string value of the response.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the response value.AuthorizationHeader createAuthorizationHeader(java.lang.String scheme) throws java.text.ParseException
scheme
- the new string value of the scheme.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the scheme value.CSeqHeader createCSeqHeader(int sequenceNumber, java.lang.String method) throws java.text.ParseException, InvalidArgumentException
createCSeqHeader(long, String)
method
with type long.
sequenceNumber
- the new integer value of the sequence number.method
- the new string value of the method.
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.CSeqHeader createCSeqHeader(long sequenceNumber, java.lang.String method) throws java.text.ParseException, InvalidArgumentException
sequenceNumber
- the new long value of the sequence number.method
- the new string value of the method.
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.CallIdHeader createCallIdHeader(java.lang.String callId) throws java.text.ParseException
callId
- the new string value of the call-id.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the callId value.CallInfoHeader createCallInfoHeader(URI callInfo)
callInfo
- the new URI value of the callInfo.
ContactHeader createContactHeader(Address address)
address
- the new Address value of the address.
ContactHeader createContactHeader()
ContactHeader.getAddress.getUserInfo() == *;
ContactHeader.getAddress.isWildCard() == true;
ContactHeader.getExpires() == 0;
ContentDispositionHeader createContentDispositionHeader(java.lang.String contentDispositionType) throws java.text.ParseException
contentDispositionType
- the new string value of the contentDisposition.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the contentDisposition value.ContentEncodingHeader createContentEncodingHeader(java.lang.String encoding) throws java.text.ParseException
encoding
- the new string containing the encoding value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the encoding value.ContentLanguageHeader createContentLanguageHeader(java.util.Locale contentLanguage)
contentLanguage
- the new Locale value of the contentLanguage.
ContentLengthHeader createContentLengthHeader(int contentLength) throws InvalidArgumentException
contentLength
- the new integer value of the contentLength.
InvalidArgumentException
- if supplied contentLength is less
than zero.ContentTypeHeader createContentTypeHeader(java.lang.String contentType, java.lang.String contentSubType) throws java.text.ParseException
contentType
- the new string content type value.contentSubType
- the new string content sub-type value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the content type or content subtype value.DateHeader createDateHeader(java.util.Calendar date)
date
- the new Calender value of the date.
ErrorInfoHeader createErrorInfoHeader(URI errorInfo)
errorInfo
- the new URI value of the errorInfo.
EventHeader createEventHeader(java.lang.String eventType) throws java.text.ParseException
eventType
- the new string value of the eventType.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the eventType value.ExpiresHeader createExpiresHeader(int expires) throws InvalidArgumentException
expires
- the new integer value of the expires.
InvalidArgumentException
- if supplied expires is less
than zero.Header createHeader(java.lang.String name, java.lang.String value) throws java.text.ParseException
name
- the new string name of the Header value.value
- the new string value of the Header.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the name or value values.ExtensionHeader
java.util.List createHeaders(java.lang.String headers) throws java.text.ParseException
headers
- the new string comma seperated list of Header values.
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.FromHeader createFromHeader(Address address, java.lang.String tag) throws java.text.ParseException
address
- the new Address object of the address.tag
- the new string value of the tag.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the tag value.InReplyToHeader createInReplyToHeader(java.lang.String callId) throws java.text.ParseException
callId
- the new string containing the callId value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the callId value.MaxForwardsHeader createMaxForwardsHeader(int maxForwards) throws InvalidArgumentException
maxForwards
- the new integer value of the maxForwards.
InvalidArgumentException
- if supplied maxForwards is less
than zero or greater than 255.MimeVersionHeader createMimeVersionHeader(int majorVersion, int minorVersion) throws InvalidArgumentException
majorVersion
- the new integer value of the majorVersion.minorVersion
- the new integer value of the minorVersion.
InvalidArgumentException
- if supplied majorVersion or minorVersion
is less than zero.MinExpiresHeader createMinExpiresHeader(int minExpires) throws InvalidArgumentException
minExpires
- the new integer value of the minExpires.
InvalidArgumentException
- if supplied minExpires is less
than zero.OrganizationHeader createOrganizationHeader(java.lang.String organization) throws java.text.ParseException
organization
- the new string value of the organization.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the organization value.PriorityHeader createPriorityHeader(java.lang.String priority) throws java.text.ParseException
priority
- the new string value of the priority.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the priority value.ProxyAuthenticateHeader createProxyAuthenticateHeader(java.lang.String scheme) throws java.text.ParseException
scheme
- the new string value of the scheme.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the scheme value.ProxyAuthorizationHeader createProxyAuthorizationHeader(java.lang.String scheme) throws java.text.ParseException
scheme
- the new string value of the scheme.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the scheme value.ProxyRequireHeader createProxyRequireHeader(java.lang.String optionTag) throws java.text.ParseException
optionTag
- the new string OptionTag value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the optionTag value.RAckHeader createRAckHeader(int rSeqNumber, int cSeqNumber, java.lang.String method) throws InvalidArgumentException, java.text.ParseException
rSeqNumber
- the new integer value of the rSeqNumber.cSeqNumber
- the new integer value of the cSeqNumber.method
- the new string value of the method.
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.RSeqHeader createRSeqHeader(int sequenceNumber) throws InvalidArgumentException
sequenceNumber
- the new integer value of the sequenceNumber.
InvalidArgumentException
- if supplied sequenceNumber is
less than zero or greater than than 2**31-1.ReasonHeader createReasonHeader(java.lang.String protocol, int cause, java.lang.String text) throws InvalidArgumentException, java.text.ParseException
protocol
- the new string value of the protocol.cause
- the new integer value of the cause.text
- the new string value of the text.
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.RecordRouteHeader createRecordRouteHeader(Address address)
address
- the new Address object of the address.
ReplyToHeader createReplyToHeader(Address address)
address
- the new Address object of the address.
ReferToHeader createReferToHeader(Address address)
address
- the new Address object of the address.
RequireHeader createRequireHeader(java.lang.String optionTag) throws java.text.ParseException
optionTag
- the new string value containing the optionTag value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the List of optionTag value.RetryAfterHeader createRetryAfterHeader(int retryAfter) throws InvalidArgumentException
retryAfter
- the new integer value of the retryAfter.
InvalidArgumentException
- if supplied retryAfter is less
than zero.RouteHeader createRouteHeader(Address address)
address
- the new Address object of the address.
ServerHeader createServerHeader(java.util.List product) throws java.text.ParseException
product
- the new List of values of the product.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the List of product values.SubjectHeader createSubjectHeader(java.lang.String subject) throws java.text.ParseException
subject
- the new string value of the subject.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the subject value.SubscriptionStateHeader createSubscriptionStateHeader(java.lang.String subscriptionState) throws java.text.ParseException
subscriptionState
- the new string value of the subscriptionState.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the subscriptionState value.SupportedHeader createSupportedHeader(java.lang.String optionTag) throws java.text.ParseException
optionTag
- the new string containing the optionTag value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the optionTag value.TimeStampHeader createTimeStampHeader(float timeStamp) throws InvalidArgumentException
timeStamp
- the new float value of the timeStamp.
InvalidArgumentException
- if supplied timeStamp is less
than zero.ToHeader createToHeader(Address address, java.lang.String tag) throws java.text.ParseException
address
- the new Address object of the address.tag
- the new string value of the tag, this value may be null.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the tag value.UnsupportedHeader createUnsupportedHeader(java.lang.String optionTag) throws java.text.ParseException
optionTag
- the new string containing the optionTag value.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the List of optionTag value.UserAgentHeader createUserAgentHeader(java.util.List product) throws java.text.ParseException
product
- the new List of values of the product.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the List of product values.ViaHeader createViaHeader(java.lang.String host, int port, java.lang.String transport, java.lang.String branch) throws java.text.ParseException, InvalidArgumentException
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.
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.WWWAuthenticateHeader createWWWAuthenticateHeader(java.lang.String scheme) throws java.text.ParseException
scheme
- the new string value of the scheme.
java.text.ParseException
- which signals that an error has been reached
unexpectedly while parsing the scheme values.WarningHeader createWarningHeader(java.lang.String agent, int code, java.lang.String comment) throws InvalidArgumentException, java.text.ParseException
agent
- the new string value of the agent.code
- the new boolean integer of the code.comment
- the new string value of the comment.
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.SIPETagHeader createSIPETagHeader(java.lang.String etag) throws java.text.ParseException
etag
- the new tag token
java.text.ParseException
- when an error occurs during parsing of the etag parameterSIPIfMatchHeader createSIPIfMatchHeader(java.lang.String etag) throws java.text.ParseException
etag
- the new tag token
java.text.ParseException
- when an error occurs during parsing of the etag parameter
|
JSIP API v1.2 November 2006 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |