|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents the operation of proxying a SIP request.
A number of parameters control how proxying is carried out:
Method Summary | |
void |
cancel()
Cancels this proxy transaction. |
SipServletRequest |
getOriginalRequest()
Returns the request received from the upstream caller. |
boolean |
getParallel()
Returns true if this proxy object is set to proxy in parallel, or false if it is set to proxy sequentially. |
boolean |
getRecordRoute()
Returns true if subsequent invocations of proxyTo(URI)
will add a Record-Route header to the proxied request, false otherwise. |
SipURI |
getRecordRouteURI()
Returns a SipURI that the application can use to
add parameters to the Record-Route header. |
boolean |
getRecurse()
Returns true if this proxy object is set to recurse, or false otherwise. |
int |
getSequentialSearchTimeout()
Returns the current value of the sequential search timeout parameter. |
boolean |
getStateful()
Returns true if this proxy operation is transaction stateful (the default), or false if it is stateless. |
boolean |
getSupervised()
Returns true if the controlling servlet will be invoked on incoming responses for this proxying operation, and false otherwise. |
void |
proxyTo(java.util.List uris)
Proxies a SIP request to the specified set of destinations. |
void |
proxyTo(URI uri)
Proxies a SIP request to the specified destination. |
void |
setParallel(boolean parallel)
Specifies whether to proxy in parallel or sequentially. |
void |
setRecordRoute(boolean rr)
Specifies whether branches initiated in this proxy operation should include a Record-Route header for this servlet engine or not. |
void |
setRecurse(boolean recurse)
Specifies whether the servlet engine will automatically recurse or not. |
void |
setSequentialSearchTimeout(int seconds)
Sets the sequential search timeout value for this Proxy object. |
void |
setStateful(boolean stateful)
Specifies whether the server should proxy statelessly or not, that is whether it should maintain transaction state whilst the proxying operation is in progress. |
void |
setSupervised(boolean supervised)
Specifies whether the controlling servlet is to be invoked for subsequent events relating to this proxying transaction, i.e. |
Method Detail |
public SipServletRequest getOriginalRequest()
public void proxyTo(URI uri)
Implementations are required to support SipURI
arguments and may support other types of URIs.
uri
- specifies the destination to proxy tojava.lang.IllegalStateException
- if the transaction has already completedjava.lang.IllegalArgumentException
- e.g. if the scheme of the specified
URI is not supported for proxyingpublic void proxyTo(java.util.List uris)
uris
- a list of URI
objects to proxy tojava.lang.IllegalStateException
- if the transaction has already completedpublic void cancel()
java.lang.IllegalStateException
- if the transaction has completedpublic boolean getRecurse()
public void setRecurse(boolean recurse)
recurse
- if true enables recursion, otherwise disables itpublic boolean getRecordRoute()
proxyTo(URI)
will add a Record-Route header to the proxied request, false otherwise.public void setRecordRoute(boolean rr)
Record-routing is used to specify that this servlet engine must stay on the signaling path of subsequent requests.
rr
- if true the engine will record-route, otherwise it won'tpublic boolean getParallel()
public void setParallel(boolean parallel)
parallel
- if true the servlet engine will proxy to all
destinations in parallel, otherwise it will proxy to one at a timepublic boolean getStateful()
public void setStateful(boolean stateful)
This proxy parameter is a hint only. Implementations may choose to maintain transaction state regardless of the value of this flag, but if so the application will not be invoked again for this transaction.
stateful
- if true the proxy operation will be statefulpublic boolean getSupervised()
public void setSupervised(boolean supervised)
supervised
- if true, the servlet invoked to handle the request
originally received will be notified when the "best" response
is received.public int getSequentialSearchTimeout()
public void setSequentialSearchTimeout(int seconds)
Proxy
object. This is the amount of time the
container waits for a final response when proxying
sequentially. When the timer expires the container CANCELs the
current branch and proxies to the next element in the target
set.
The container is free to ignore this parameter.
seconds
- seconds waited for a final responses when proxying
sequentiallypublic SipURI getRecordRouteURI()
SipURI
that the application can use to
add parameters to the Record-Route header. This is used by
record-routing proxy applications in order to push state to the
endpoints and have it returned in subsequent requests belonging
to the same dialog.
Parameters added through a URI returned by this method can
be retrieved from a subsequent request in the same dialog by
calling ServletRequest.getParameter(java.lang.String)
.
Note that the URI returned is good only for specifying a set of parameters that the application can retrieve when invoked to handle subsequent requests in the same dialog. Other components of the URI are irrelevant and cannot be trusted to reflect the actual values that the container will be using when inserting a Record-Route header into proxied request.
java.lang.IllegalStateException
- if record-routing is not enabled
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |