|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
SipFactory.createMessageFactory()
.
Method Summary | |
Request |
createByeRequest(Request request,
boolean isServer)
Creates a new BYE Request message based on the dialog creating request specified by the request paramater (for example, INVITE). |
Request |
createCancelRequest(Request request)
Creates a new CANCEL Request message based on the dialog creating request specified by the request paramater (for example, INVITE). |
Request |
createRequest(URI requestURI,
String method,
CallIdHeader callId,
CSeqHeader cSeq,
FromHeader from,
ToHeader to,
List via,
MaxForwardsHeader maxForwards)
Creates a new Request message of type specified by the method paramater, containing the URI of the Request, the mandatory headers of the message. |
Request |
createRequest(URI requestURI,
String method,
CallIdHeader callId,
CSeqHeader cSeq,
FromHeader from,
ToHeader to,
List via,
MaxForwardsHeader maxForwards,
ContentTypeHeader contentType,
byte[] content)
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. |
Request |
createRequest(URI requestURI,
String method,
CallIdHeader callId,
CSeqHeader cSeq,
FromHeader from,
ToHeader to,
List via,
MaxForwardsHeader maxForwards,
ContentTypeHeader contentType,
Object content)
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. |
Response |
createResponse(int statusCode,
CallIdHeader callId,
CSeqHeader cSeq,
FromHeader from,
ToHeader to,
List via,
MaxForwardsHeader maxForwards)
Creates a new Response message of type specified by the statusCode paramater, containing the mandatory headers of the message. |
Response |
createResponse(int statusCode,
CallIdHeader callId,
CSeqHeader cSeq,
FromHeader from,
ToHeader to,
List via,
MaxForwardsHeader maxForwards,
ContentTypeHeader contentType,
byte[] content)
Creates a new Response message of type specified by the statusCode paramater, containing the mandatory headers of the message with a body in the form of a byte array and the body content type. |
Response |
createResponse(int statusCode,
CallIdHeader callId,
CSeqHeader cSeq,
FromHeader from,
ToHeader to,
List via,
MaxForwardsHeader maxForwards,
ContentTypeHeader contentType,
Object content)
Creates a new Response message of type specified by the statusCode paramater, containing the mandatory headers of the message with a body in the form of a Java object and the body content type. |
Response |
createResponse(int statusCode,
Request request)
Creates a new Response message of type specified by the statusCode paramater, based on a specific Request message. |
Response |
createResponse(int statusCode,
Request request,
ContentTypeHeader contentType,
byte[] content)
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. |
Response |
createResponse(int statusCode,
Request request,
ContentTypeHeader contentType,
Object content)
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. |
Method Detail |
public Request createRequest(URI requestURI, String method, CallIdHeader callId, CSeqHeader cSeq, FromHeader from, ToHeader to, List via, MaxForwardsHeader maxForwards, ContentTypeHeader contentType, Object content) throws ParseException
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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the method or the body.public Request createRequest(URI requestURI, String method, CallIdHeader callId, CSeqHeader cSeq, FromHeader from, ToHeader to, List via, MaxForwardsHeader maxForwards, ContentTypeHeader contentType, byte[] content) throws ParseException
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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the method or the body.public Request createRequest(URI requestURI, String method, CallIdHeader callId, CSeqHeader cSeq, FromHeader from, ToHeader to, List via, MaxForwardsHeader maxForwards) throws ParseException
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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the method.public Request createByeRequest(Request request, boolean isServer)
request
- the dialog creating request, the dialog of which this
BYE will terminate.isServer
- the boolean that determines if the dialog request was a
client or server initiated request.public Request createCancelRequest(Request request)
Note that both the transaction corresponding to the original request and
the CANCEL transaction will complete independently. However, a UAC
canceling a request cannot rely on receiving a 487 (Request Terminated)
response for the original request, as an RFC 2543 compliant UAS will
not generate such a response. Therefore if there is no final response for
the original request the application will receieve a TimeoutEvent with
Timeout.TRANSACTION
and the client should then consider the
original transaction cancelled.
request
- the dialog creating request, the dialog of which this
CANCEL will terminate.public Response createResponse(int statusCode, CallIdHeader callId, CSeqHeader cSeq, FromHeader from, ToHeader to, List via, MaxForwardsHeader maxForwards, ContentTypeHeader contentType, Object content) throws ParseException
statusCode
- the new integer of the statusCode 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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the statusCode or the body.public Response createResponse(int statusCode, CallIdHeader callId, CSeqHeader cSeq, FromHeader from, ToHeader to, List via, MaxForwardsHeader maxForwards, ContentTypeHeader contentType, byte[] content) throws ParseException
statusCode
- the new integer of the statusCode 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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the statusCode or the body.public Response createResponse(int statusCode, CallIdHeader callId, CSeqHeader cSeq, FromHeader from, ToHeader to, List via, MaxForwardsHeader maxForwards) throws ParseException
statusCode
- the new integer of the statusCode 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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the statusCode.public Response createResponse(int statusCode, Request request, ContentTypeHeader contentType, Object content) throws ParseException
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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the statusCode or the body.public Response createResponse(int statusCode, Request request, ContentTypeHeader contentType, byte[] content) throws ParseException
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.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the statusCode or the body.public Response createResponse(int statusCode, Request request) throws ParseException
statusCode
- the new integer of the statusCode value of this Message.request
- the received Reqest object upon which to base the Response.
ParseException
- which signals that an error has been reached
unexpectedly while parsing the statusCode.
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |