|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents SIP request messages. When receiving an incoming SIP request
the container creates a SipServletRequest
and passes it to
the handling servlet. For outgoing, locally initiated requests,
applications call SipFactory.createRequest
to obtain a SipServletRequest
that can then be modified and
sent.
Method Summary | |
SipServletRequest |
createCancel()
Returns a CANCEL request object. |
SipServletResponse |
createResponse(int statuscode)
Creates a response for this request with the specifies status code. |
SipServletResponse |
createResponse(int statusCode,
java.lang.String reasonPhrase)
Creates a response for this request with the specifies status code and reason phrase. |
Proxy |
getProxy(boolean create)
Returns the Proxy object associated with this request. |
URI |
getRequestURI()
Returns the request URI of this request. |
boolean |
isInitial()
Returns true if this is an initial request. |
void |
pushRoute(SipAddress proxyAddr)
Adds a Route header field value to this request. |
void |
pushRoute(SipURI proxyAddr)
Adds a Route header field value to this request. |
void |
send()
Causes this request to be sent to the destination identified by the request URI. |
void |
setRequestURI(URI uri)
Sets the request URI of this request. |
Methods inherited from interface javax.servlet.ServletRequest |
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
Method Detail |
public URI getRequestURI()
SipServletRequest
public void setRequestURI(URI uri)
send
.uri
- new request URI of this SipServletRequest
public void pushRoute(SipAddress proxyAddr)
This method allows a UAC or a proxy to specify that the request should visit one or more proxies before being delivered to the destination.
proxyAddr
- the address that is added as a Route header valuejava.lang.IllegalArgumentException
- if the URI of the
SipAddress
argument does not contain a
SipURI
public void pushRoute(SipURI proxyAddr)
This method allows a UAC or a proxy to specify that the request should visit one or more proxies before being delivered to the destination.
proxyAddr
- the address that is added as a Route header valuepublic void send()
Proxy.proxy(javax.servlet.sip.URI)
instead.send
in interface SipServletMessage
javax.servlet.sip.SipServletMessage
java.lang.IllegalStateException
- if this message cannot legally be sent
in the current state of the underlying SIP transactionpublic boolean isInitial()
public Proxy getProxy(boolean create)
Proxy
object associated with this request.
If no Proxy
object has yet been created for this request,
meaning that the applciation hasn't yet committed itself to proxying,
the create
argument specifies whether a Proxy
object is created or if null is to be returned.
Once a Proxy
object has been associated with a request
subsequent invocations of this method will yield the same
Proxy
object, as will the no-argument
SipServletMessage.getProxy()
method and SipServletMessage.getProxy()
for responses received to proxied requests.
create
- indicates whether the servlet engine should create
a new Proxy
object if one does not already existProxy
object associated with this requestjava.lang.IllegalStateException
- if the transaction has already completedpublic SipServletResponse createResponse(int statuscode)
statuscode
- status code for the responsejava.lang.IllegalArgumentException
- if the statuscode is not a valid
SIP status codejava.lang.IllegalStateException
- if this request has already been
responded to with a final status codepublic SipServletResponse createResponse(int statusCode, java.lang.String reasonPhrase)
statusCode
- status code for the responsereasonPhrase
- reason phrase to appear in response linejava.lang.IllegalArgumentException
- if the statuscode is not a valid
SIP status codejava.lang.IllegalStateException
- if this request has already been
responded to with a final status codepublic SipServletRequest createCancel() throws java.lang.IllegalStateException
Proxy.cancel()
instead.java.lang.IllegalStateException
- if the transaction state is such that
it doesn't allow the specified request to be sent now
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |