|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.javax.sip.header.HeaderFactoryImpl
Implementation of the JAIN SIP HeaderFactory
Constructor Summary | |
HeaderFactoryImpl()
Default constructor. |
Method Summary | |
AcceptEncodingHeader |
createAcceptEncodingHeader(String encoding)
Creates a new AcceptEncodingHeader based on the newly supplied encoding value. |
AcceptHeader |
createAcceptHeader(String contentType,
String contentSubType)
Creates a new AcceptHeader based on the newly supplied contentType and contentSubType values. |
AcceptLanguageHeader |
createAcceptLanguageHeader(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(String eventType)
Creates a new AllowEventsHeader based on the newly supplied event type value. |
AllowHeader |
createAllowHeader(String method)
Creates a new AllowHeader based on the newly supplied method value. |
AuthenticationInfoHeader |
createAuthenticationInfoHeader(String response)
Creates a new AuthenticationInfoHeader based on the newly supplied response value. |
AuthorizationHeader |
createAuthorizationHeader(String scheme)
Creates a new AuthorizationHeader based on the newly supplied scheme value. |
CallIdHeader |
createCallIdHeader(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(String contentDisposition)
Creates a new ContentDispositionHeader based on the newly supplied contentDisposition value. |
ContentEncodingHeader |
createContentEncodingHeader(String encoding)
Creates a new ContentEncodingHeader based on the newly supplied encoding value. |
ContentLanguageHeader |
createContentLanguageHeader(Locale contentLanguage)
Creates a new ContentLanguageHeader based on the newly supplied contentLanguage value. |
ContentLengthHeader |
createContentLengthHeader(int contentLength)
Creates a new CSeqHeader based on the newly supplied contentLength value. |
ContentTypeHeader |
createContentTypeHeader(String contentType,
String contentSubType)
Creates a new ContentTypeHeader based on the newly supplied contentType and contentSubType values. |
CSeqHeader |
createCSeqHeader(int sequenceNumber,
String method)
Creates a new CSeqHeader based on the newly supplied sequence number and method values. |
DateHeader |
createDateHeader(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(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. |
ExtensionHeader |
createExtensionHeader(String name,
String value)
Creates a new ExtensionHeader based on the newly supplied name and value values. |
FromHeader |
createFromHeader(Address address,
String tag)
Creates a new FromHeader based on the newly supplied address and tag values. |
Header |
createHeader(String headerName,
String headerValue)
Create and parse a header. |
InReplyToHeader |
createInReplyToHeader(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 value. |
MinExpiresHeader |
createMinExpiresHeader(int minExpires)
Creates a new MinExpiresHeader based on the newly supplied minExpires value. |
OrganizationHeader |
createOrganizationHeader(String organization)
Creates a new OrganizationHeader based on the newly supplied organization value. |
PriorityHeader |
createPriorityHeader(String priority)
Creates a new PriorityHeader based on the newly supplied priority value. |
ProxyAuthenticateHeader |
createProxyAuthenticateHeader(String scheme)
Creates a new ProxyAuthenticateHeader based on the newly supplied scheme value. |
ProxyAuthorizationHeader |
createProxyAuthorizationHeader(String scheme)
Creates a new ProxyAuthorizationHeader based on the newly supplied scheme value. |
ProxyRequireHeader |
createProxyRequireHeader(String optionTag)
Creates a new ProxyRequireHeader based on the newly supplied optionTag value. |
RAckHeader |
createRAckHeader(int rSeqNumber,
int cSeqNumber,
String method)
Creates a new RAckHeader based on the newly supplied rSeqNumber, cSeqNumber and method values. |
ReasonHeader |
createReasonHeader(String protocol,
int cause,
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. |
ReplyToHeader |
createReplyToHeader(Address address)
Creates a new ReplyToHeader based on the newly supplied address value. |
RequireHeader |
createRequireHeader(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(List product)
Creates a new ServerHeader based on the newly supplied product value. |
SubjectHeader |
createSubjectHeader(String subject)
Creates a new SubjectHeader based on the newly supplied subject value. |
SubscriptionStateHeader |
createSubscriptionStateHeader(String subscriptionState)
Creates a new SubscriptionStateHeader based on the newly supplied subscriptionState value. |
SupportedHeader |
createSupportedHeader(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,
String tag)
Creates a new ToHeader based on the newly supplied address and tag values. |
UnsupportedHeader |
createUnsupportedHeader(String optionTag)
Creates a new UnsupportedHeader based on the newly supplied optionTag value. |
UserAgentHeader |
createUserAgentHeader(List product)
Creates a new UserAgentHeader based on the newly supplied product value. |
ViaHeader |
createViaHeader(String host,
int port,
String transport,
String branch)
Creates a new ViaHeader based on the newly supplied uri and branch values. |
WarningHeader |
createWarningHeader(String agent,
int code,
String comment)
Creates a new WarningHeader based on the newly supplied agent, code and comment values. |
WWWAuthenticateHeader |
createWWWAuthenticateHeader(String scheme)
Creates a new WWWAuthenticateHeader based on the newly supplied scheme value. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HeaderFactoryImpl()
Method Detail |
public AcceptEncodingHeader createAcceptEncodingHeader(String encoding) throws ParseException
createAcceptEncodingHeader
in interface HeaderFactory
encoding
- - the new string containing the encoding value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the encoding value.public AcceptHeader createAcceptHeader(String contentType, String contentSubType) throws ParseException
createAcceptHeader
in interface HeaderFactory
ParseException
- which signals that an error has been reached
unexpectedly while parsing the content type or content subtype value.public AcceptLanguageHeader createAcceptLanguageHeader(Locale language)
createAcceptLanguageHeader
in interface HeaderFactory
language
- - the new Locale value of the language
public AlertInfoHeader createAlertInfoHeader(URI alertInfo)
createAlertInfoHeader
in interface HeaderFactory
alertInfo
- - the new string value of the alertInfo
public AllowEventsHeader createAllowEventsHeader(String eventType) throws ParseException
createAllowEventsHeader
in interface HeaderFactory
eventType
- - the new string containing the eventType value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the eventType value.public AllowHeader createAllowHeader(String method) throws ParseException
createAllowHeader
in interface HeaderFactory
method
- - the new string containing the method value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the method value.public AuthenticationInfoHeader createAuthenticationInfoHeader(String response) throws ParseException
createAuthenticationInfoHeader
in interface HeaderFactory
response
- - the new string value of the response.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the response value.public AuthorizationHeader createAuthorizationHeader(String scheme) throws ParseException
createAuthorizationHeader
in interface HeaderFactory
scheme
- - the new string value of the scheme.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the scheme value.public CSeqHeader createCSeqHeader(int sequenceNumber, String method) throws ParseException, InvalidArgumentException
createCSeqHeader
in interface HeaderFactory
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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the method value.public CallIdHeader createCallIdHeader(String callId) throws ParseException
createCallIdHeader
in interface HeaderFactory
callId
- - the new string value of the call-id.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the callId value.public CallInfoHeader createCallInfoHeader(URI callInfo)
createCallInfoHeader
in interface HeaderFactory
callInfo
- the new URI value of the callInfo.
public ContactHeader createContactHeader(Address address)
createContactHeader
in interface HeaderFactory
address
- - the new Address value of the address.
public ContactHeader createContactHeader()
ContactHeader.getAddress.getAddress.getUserInfo() == *;
ContactHeader.getAddress.getAddress.isWildCard() == true;
ContactHeader.getExpires() == 0;
createContactHeader
in interface HeaderFactory
public ContentDispositionHeader createContentDispositionHeader(String contentDisposition) throws ParseException
createContentDispositionHeader
in interface HeaderFactory
contentDisposition
- - the new string value of the contentDisposition.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the contentDisposition value.public ContentEncodingHeader createContentEncodingHeader(String encoding) throws ParseException
createContentEncodingHeader
in interface HeaderFactory
encoding
- - the new string containing the encoding value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the encoding value.public ContentLanguageHeader createContentLanguageHeader(Locale contentLanguage)
createContentLanguageHeader
in interface HeaderFactory
contentLanguage
- - the new Locale value of the contentLanguage.
public ContentLengthHeader createContentLengthHeader(int contentLength) throws InvalidArgumentException
createContentLengthHeader
in interface HeaderFactory
contentLength
- - the new integer value of the contentLength.
InvalidArgumentException
- if supplied contentLength is less
than zero.public ContentTypeHeader createContentTypeHeader(String contentType, String contentSubType) throws ParseException
createContentTypeHeader
in interface HeaderFactory
ParseException
- which signals that an error has been reached
unexpectedly while parsing the content type or content subtype value.public DateHeader createDateHeader(Calendar date)
createDateHeader
in interface HeaderFactory
date
- - the new Calender value of the date.
public EventHeader createEventHeader(String eventType) throws ParseException
createEventHeader
in interface HeaderFactory
eventType
- - the new string value of the eventType.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the eventType value.public ExpiresHeader createExpiresHeader(int expires) throws InvalidArgumentException
createExpiresHeader
in interface HeaderFactory
expires
- - the new integer value of the expires.
InvalidArgumentException
- if supplied expires is less
than zero.public ExtensionHeader createExtensionHeader(String name, String value) throws ParseException
name
- - the new string name of the ExtensionHeader value.value
- - the new string value of the ExtensionHeader.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the name or value values.public FromHeader createFromHeader(Address address, String tag) throws ParseException
createFromHeader
in interface HeaderFactory
address
- - the new Address object of the address.tag
- - the new string value of the tag.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the tag value.public InReplyToHeader createInReplyToHeader(String callId) throws ParseException
createInReplyToHeader
in interface HeaderFactory
callId
- - the new string containing the callId value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the callId value.public MaxForwardsHeader createMaxForwardsHeader(int maxForwards) throws InvalidArgumentException
createMaxForwardsHeader
in interface HeaderFactory
InvalidArgumentException
- if supplied maxForwards is less
than zero or greater than 255.public MimeVersionHeader createMimeVersionHeader(int majorVersion, int minorVersion) throws InvalidArgumentException
createMimeVersionHeader
in interface HeaderFactory
majorVersion
- the new integer value of the majorVersion.minorVersion
- the new integer value of the minorVersion.
InvalidArgumentException
- if supplied mimeVersion is less
than zero.public MinExpiresHeader createMinExpiresHeader(int minExpires) throws InvalidArgumentException
createMinExpiresHeader
in interface HeaderFactory
minExpires
- - the new integer value of the minExpires.
InvalidArgumentException
- if supplied minExpires is less
than zero.public OrganizationHeader createOrganizationHeader(String organization) throws ParseException
createOrganizationHeader
in interface HeaderFactory
organization
- - the new string value of the organization.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the organization value.public PriorityHeader createPriorityHeader(String priority) throws ParseException
createPriorityHeader
in interface HeaderFactory
priority
- - the new string value of the priority.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the priority value.public ProxyAuthenticateHeader createProxyAuthenticateHeader(String scheme) throws ParseException
createProxyAuthenticateHeader
in interface HeaderFactory
scheme
- - the new string value of the scheme.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the scheme value.public ProxyAuthorizationHeader createProxyAuthorizationHeader(String scheme) throws ParseException
createProxyAuthorizationHeader
in interface HeaderFactory
scheme
- - the new string value of the scheme.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the scheme value.public ProxyRequireHeader createProxyRequireHeader(String optionTag) throws ParseException
createProxyRequireHeader
in interface HeaderFactory
optionTag
- - the new string OptionTag value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the optionTag value.public RAckHeader createRAckHeader(int rSeqNumber, int cSeqNumber, String method) throws InvalidArgumentException, ParseException
createRAckHeader
in interface HeaderFactory
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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the method value.public RSeqHeader createRSeqHeader(int sequenceNumber) throws InvalidArgumentException
createRSeqHeader
in interface HeaderFactory
sequenceNumber
- - the new integer value of the sequenceNumber.
InvalidArgumentException
- if supplied sequenceNumber is
less than zero or greater than than 2**31-1.public ReasonHeader createReasonHeader(String protocol, int cause, String text) throws InvalidArgumentException, ParseException
createReasonHeader
in interface HeaderFactory
protocol
- - the new string value of the protocol.cause
- - the new integer value of the cause.text
- - the new string value of the text.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the protocol, cause or text value.
InvalidArgumentException
- if supplied cause is
less than zero.public RecordRouteHeader createRecordRouteHeader(Address address)
createRecordRouteHeader
in interface HeaderFactory
address
- - the new Address object of the address.
public ReplyToHeader createReplyToHeader(Address address)
createReplyToHeader
in interface HeaderFactory
address
- - the new Address object of the address.
public RequireHeader createRequireHeader(String optionTag) throws ParseException
createRequireHeader
in interface HeaderFactory
optionTag
- - the new string value containing the optionTag value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the List of optionTag value.public RetryAfterHeader createRetryAfterHeader(int retryAfter) throws InvalidArgumentException
createRetryAfterHeader
in interface HeaderFactory
retryAfter
- - the new integer value of the retryAfter.
InvalidArgumentException
- if supplied retryAfter is less
than zero.public RouteHeader createRouteHeader(Address address)
createRouteHeader
in interface HeaderFactory
address
- - the new Address object of the address.
public ServerHeader createServerHeader(List product) throws ParseException
createServerHeader
in interface HeaderFactory
product
- - the new list value of the product.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the product value.public SubjectHeader createSubjectHeader(String subject) throws ParseException
createSubjectHeader
in interface HeaderFactory
subject
- - the new string value of the subject.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the subject value.public SubscriptionStateHeader createSubscriptionStateHeader(String subscriptionState) throws ParseException
createSubscriptionStateHeader
in interface HeaderFactory
subscriptionState
- - the new string value of the subscriptionState.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the subscriptionState value.public SupportedHeader createSupportedHeader(String optionTag) throws ParseException
createSupportedHeader
in interface HeaderFactory
optionTag
- - the new string containing the optionTag value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the optionTag value.public TimeStampHeader createTimeStampHeader(float timeStamp) throws InvalidArgumentException
createTimeStampHeader
in interface HeaderFactory
timeStamp
- - the new float value of the timeStamp.
InvalidArgumentException
- if supplied timeStamp is less
than zero.public ToHeader createToHeader(Address address, String tag) throws ParseException
createToHeader
in interface HeaderFactory
address
- - the new Address object of the address.tag
- - the new string value of the tag.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the tag value.public UnsupportedHeader createUnsupportedHeader(String optionTag) throws ParseException
createUnsupportedHeader
in interface HeaderFactory
optionTag
- - the new string containing the optionTag value.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the List of optionTag value.public UserAgentHeader createUserAgentHeader(List product) throws ParseException
createUserAgentHeader
in interface HeaderFactory
product
- - the new list value of the product.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the product value.public ViaHeader createViaHeader(String host, int port, String transport, String branch) throws ParseException
createViaHeader
in interface HeaderFactory
branch
- - the new string value of the branch.host
- the new string value of the host.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the branch value.public WWWAuthenticateHeader createWWWAuthenticateHeader(String scheme) throws ParseException
createWWWAuthenticateHeader
in interface HeaderFactory
scheme
- - the new string value of the scheme.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the scheme values.public WarningHeader createWarningHeader(String agent, int code, String comment) throws ParseException, InvalidArgumentException
createWarningHeader
in interface HeaderFactory
agent
- - the new string value of the agent.code
- - the new boolean integer of the code.comment
- - the new string value of the comment.
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.public ErrorInfoHeader createErrorInfoHeader(URI errorInfo)
createErrorInfoHeader
in interface HeaderFactory
errorInfo
- - the new URI value of the errorInfo.
public Header createHeader(String headerName, String headerValue) throws ParseException
createHeader
in interface HeaderFactory
headerName
- -- header name for the header to parse.headerValue
- -- header value for the header to parse.
ParseException
ExtensionHeader
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |