public interface Proxy
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels this proxy transaction and any of its child branches if recursion was enabled.
|
void |
cancel(String[] protocol,
int[] reasonCode,
String[] reasonText)
This overloaded method of cancel() provides a way to specify the reason
for cancelling this Proxy by including the appropriate Reason headers [RFC 3326].
|
List<ProxyBranch> |
createProxyBranches(List<? extends URI> targets)
Returns the list of
objects given a set of targets.
|
boolean |
getAddToPath()
Returns true if subsequent invocations of
will add a Path header to the proxied request, false otherwise.
|
boolean |
getNoCancel()
Returns true if the proxy will not cancel outstanding branches upon receiving the first 2xx INVITE response as in RFC 3841
|
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.
|
SipURI |
getPathURI()
Returns a SipURI that the application can use to add parameters to the Path header.
|
ProxyBranch |
getProxyBranch(URI uri)
Any branch has a primary URI associated with it, using which it was created.
|
List<ProxyBranch> |
getProxyBranches()
More than one branches are associated with a proxy when
or
is used.
|
int |
getProxyTimeout()
The current value of the overall proxy timeout value.
|
boolean |
getRecordRoute()
Returns true if subsequent invocations of
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()
Deprecated.
Returns the current value of the sequential search timeout parameter. This is measured in seconds.
|
boolean |
getStateful()
Deprecated.
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(List<? extends URI> uris)
Proxies a SIP request to the specified set of destinations.
|
void |
proxyTo(URI uri)
Proxies a SIP request to the specified destination.
|
void |
setAddToPath(boolean p)
Specifies whether branches initiated in this proxy operation should include a Path header for the REGISTER request for this servlet container or not.
|
void |
setNoCancel(boolean noCancel)
Specifies whether the proxy should, or should not cancel outstanding branches
upon receiving the first 2xx INVITE response as defined in RFC 3841.
|
void |
setOutboundInterface(InetAddress address)
In multi-homed environment this method can be used to select the outbound interface
and port number to use for proxy branches.
|
void |
setOutboundInterface(InetSocketAddress address)
In multi-homed environment this method can be used to select the outbound interface
and port number to use for proxy branches.
|
void |
setParallel(boolean parallel)
Specifies whether to proxy in parallel or sequentially.
|
void |
setProxyTimeout(int seconds)
Sets the overall proxy timeout.
|
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)
Deprecated.
Sets the sequential search timeout value for this 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.
|
void |
setStateful(boolean stateful)
Deprecated.
Specifies whether the server should proxy statelessly or not, that is whether it should maintain transaction state whilst the proxying operation is in progress.
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.
|
void |
setSupervised(boolean supervised)
Specifies whether the controlling servlet is to be invoked for incoming responses relating to this proxying.
|
void |
startProxy()
Proxies a SIP request to the set of destinations previously specified in
.
|
void cancel()
void cancel(String[] protocol, int[] reasonCode, String[] reasonText)
protocol - describes the source of the 'cause' field in the Reason header field.reasonCode - corresponds to the 'cause' field. For eg, if protocol is SIP,
the reasonCode would be the status code of the response which caused the cancelreasonText - describes the reason for cancelling the Proxy.List<ProxyBranch> createProxyBranches(List<? extends URI> targets)
boolean getAddToPath()
SipServletRequest getOriginalRequest()
boolean getParallel()
SipURI getPathURI()
ProxyBranch getProxyBranch(URI uri)
List<ProxyBranch> getProxyBranches()
int getProxyTimeout()
boolean getRecordRoute()
SipURI getRecordRouteURI()
boolean getRecurse()
int getSequentialSearchTimeout()
boolean getStateful()
boolean getSupervised()
void proxyTo(List<? extends URI> uris)
void proxyTo(URI uri)
void setAddToPath(boolean p)
void setOutboundInterface(InetAddress address)
address - the socket address representing the outbound interface to use when forwarding requests with this proxyNullPointerException - on null addressIllegalArgumentException - if the address is not understood by the container as one of its outbound interfacevoid setOutboundInterface(InetSocketAddress address)
address - the address which represents the outbound interfaceNullPointerException - on null addressIllegalArgumentException - if the address is not understood by the container as one of its outbound interfaceIllegalStateException - if this method is called on an invalidated sessionvoid setParallel(boolean parallel)
void setProxyTimeout(int seconds)
void setRecordRoute(boolean rr)
IllegalStateException - if the proxy has already been startedvoid setRecurse(boolean recurse)
void setSequentialSearchTimeout(int seconds)
void setStateful(boolean stateful)
void setSupervised(boolean supervised)
void startProxy()
boolean getNoCancel()
void setNoCancel(boolean noCancel)
noCancel - when true, the proxy will not cancel outstanding branches upon receiving the first 2xx responseCopyright © 2016. All Rights Reserved.