This interface provides factory methods that allow an application to create
Request and Response messages from a particular implementation of JAIN SIP.
This class is a singleton and can be retrieved from the
javax.sip.SipFactory.createMessageFactory().

Creates a new Request message of type specified by the method paramater,
containing the URI of the Request, the mandatory headers of the message
with a body in the form of a Java object and the body content type.

Parameters:

requestURI the new URI object of the requestURI value of this Message.

method the new string of the method value of this Message.

callId the new CallIdHeader object of the callId value of this Message.

cSeq the new CSeqHeader object of the cSeq value of this Message.

from the new FromHeader object of the from value of this Message.

to the new ToHeader object of the to value of this Message.

via the new List object of the ViaHeaders of this Message.

contentType the new ContentTypeHeader object of the content type
value of this Message.

content the new Object of the body content value of this Message.

Returns:

the newly created Request object.

Throws:

java.text.ParseException which signals that an error has been reached
unexpectedly while parsing the method or the body.

Creates a new Request message of type specified by the method paramater,
containing the URI of the Request, the mandatory headers of the message
with a body in the form of a byte array and body content type.

Parameters:

requestURI the new URI object of the requestURI value of this Message.

method the new string of the method value of this Message.

callId the new CallIdHeader object of the callId value of this Message.

cSeq the new CSeqHeader object of the cSeq value of this Message.

from the new FromHeader object of the from value of this Message.

to the new ToHeader object of the to value of this Message.

via the new List object of the ViaHeaders of this Message.

contentType the new ContentTypeHeader object of the content type
value of this Message.

content the new byte array of the body content value of this Message.

Returns:

the newly created Request object.

Throws:

java.text.ParseException which signals that an error has been reached
unexpectedly while parsing the method or the body.

Create a new SIP Request object based on a specific string value. This
method parses the supplied string into a SIP Request. The request
string should only consist of the SIP portion of the Request and not
the content. Supplying a null argument creates an empty SIP Request
which may be used to end out "keep alive" messages for a connection.

Creates a new Response message of type specified by the statusCode
paramater, based on a specific Request with a new body in the form of a
Java object and the body content type. Only the required headers are
copied from the Request.

Parameters:

statusCode the new integer of the statusCode value of this Message.

request the received Reqest object upon which to base the Response.

contentType the new ContentTypeHeader object of the content type
value of this Message.

content the new Object of the body content value of this Message.

Returns:

the newly created Response object.

Throws:

java.text.ParseException which signals that an error has been reached
unexpectedly while parsing the statusCode or the body.

Creates a new Response message of type specified by the statusCode
paramater, based on a specific Request with a new body in the form of a
byte array and the body content type. Only the required headers are
copied from the Request.

Parameters:

statusCode the new integer of the statusCode value of this Message.

request the received Reqest object upon which to base the Response.

contentType the new ContentTypeHeader object of the content type
value of this Message.

content the new byte array of the body content value of this Message.

Returns:

the newly created Response object.

Throws:

java.text.ParseException which signals that an error has been reached
unexpectedly while parsing the statusCode or the body.

Creates a new Response message of type specified by the statusCode
paramater, based on a specific Request message. This new Response does
not contain a body. Only the required headers are copied from the
Request.