|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cafesip.jiplet.sip.SipCommunicator
public class SipCommunicator
This class enables SIP-related operations from within a jiplet class. It has methods to proxy requests, proxy responses and handle proxy timeouts. In addition, it can cancel proxy requests and other operations.
| Constructor Summary | |
|---|---|
SipCommunicator(Jiplet jiplet,
javax.sip.RequestEvent request)
A constructor for this class. |
|
SipCommunicator(Jiplet jiplet,
javax.sip.ResponseEvent response)
|
|
SipCommunicator(Jiplet jiplet,
javax.sip.TimeoutEvent timeout)
|
|
| Method Summary | |
|---|---|
void |
cancelRequest()
This method is similar to the cancelRequest(int statusCode) method except that no response is sent to the originating request. |
void |
cancelRequest(int statusCode,
java.lang.String reason)
Cancels a proxy request. |
boolean |
dropOutboundLeg(javax.sip.ClientTransaction clientTransaction)
Call this method to drop an outbound leg for the case where other outbound legs may be present and the event on this leg shouldn't drop everything. |
javax.sip.RequestEvent |
getRequest()
|
javax.sip.ResponseEvent |
getResponse()
|
javax.sip.ServerTransaction |
getServerTransaction()
|
javax.sip.header.ContactHeader |
getStackContactHeader()
|
javax.sip.header.ViaHeader |
getStackViaHeader()
|
javax.sip.TimeoutEvent |
getTimeout()
|
void |
handleProxyTimeout(boolean stateful)
This method is used to handle proxy processing when a SIP timeout-occurs. |
protected boolean |
isReset()
|
void |
proxyRequest(java.util.ArrayList uris,
boolean addRecordRoute,
boolean stateful,
boolean presenceServer)
This method is used to proxy a received SIP request message. |
void |
proxyRequest(javax.sip.address.URI uri,
boolean addRecordRoute,
boolean stateful,
boolean presenceServer)
This method is used to proxy a received SIP request message. |
void |
proxyResponse(boolean presenceServer)
This method is used to proxy the received SIP response message. |
protected void |
setReset(boolean reset)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SipCommunicator(Jiplet jiplet,
javax.sip.RequestEvent request)
public SipCommunicator(Jiplet jiplet,
javax.sip.ResponseEvent response)
public SipCommunicator(Jiplet jiplet,
javax.sip.TimeoutEvent timeout)
| Method Detail |
|---|
public void cancelRequest(int statusCode,
java.lang.String reason)
statusCode - A value greater than zero will result in a response to the
user agent that started the dialog. If this is not desired,
use -1 as this parameter.reason - A reason phrase along with the status code. If null, the
reason phrase is not added.public void cancelRequest()
public boolean dropOutboundLeg(javax.sip.ClientTransaction clientTransaction)
clientTransaction - for this leg
public void proxyRequest(java.util.ArrayList uris,
boolean addRecordRoute,
boolean stateful,
boolean presenceServer)
throws javax.sip.InvalidArgumentException,
JipletException,
java.text.ParseException,
javax.sip.SipException
uris - list of URIs to proxy a SIP request message to. For ACK, CANCEL
and BYE messages for a stateful proxy, the contact list can be
an empty array list. The proxy will automatically proxy the
request based on the dialogaddRecordRoute - true if record route is to be added.true - if stateful proxy is required.true - if the proxy server is a presence server
javax.sip.SipException
java.text.ParseException
JipletException
javax.sip.InvalidArgumentException
public javax.sip.header.ViaHeader getStackViaHeader()
throws java.text.ParseException,
javax.sip.InvalidArgumentException
java.text.ParseException
javax.sip.InvalidArgumentException
public javax.sip.header.ContactHeader getStackContactHeader()
throws java.text.ParseException
java.text.ParseException
public void proxyRequest(javax.sip.address.URI uri,
boolean addRecordRoute,
boolean stateful,
boolean presenceServer)
throws javax.sip.InvalidArgumentException,
JipletException,
java.text.ParseException,
javax.sip.SipException
javax.sip.InvalidArgumentException
JipletException
java.text.ParseException
javax.sip.SipException
public void proxyResponse(boolean presenceServer)
throws JipletException,
javax.sip.SipException,
java.text.ParseException
true - if the proxy server is a presence server
JipletException
java.text.ParseException
javax.sip.SipException
public void handleProxyTimeout(boolean stateful)
throws java.text.ParseException,
javax.sip.SipException,
JipletException
stateful - true if the proxy is stateful
java.text.ParseException
javax.sip.SipException
JipletExceptionpublic javax.sip.ServerTransaction getServerTransaction()
protected boolean isReset()
protected void setReset(boolean reset)
public javax.sip.RequestEvent getRequest()
public javax.sip.ResponseEvent getResponse()
public javax.sip.TimeoutEvent getTimeout()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||