|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SipSessionExt
Interface Extension that adds extra features to the JSR 289 SipSession interface. It adds the following capabilities :
((SipSessionExt)sipSession).scheduleAsynchronousWork(new SipSessionAsynchronousWork() {
private static final long serialVersionUID = 1L;
public void doAsynchronousWork(SipSession sipSession) {
String textMessageToSend = (String) sipSession.getAttribute("textMessageToSend");
try {
SipServletRequest sipServletRequest = sipFactory.createRequest(
sipSession.getSipApplicationSession(),
"MESSAGE",
"sip:sender@sip-servlets.com",
"sip:receiver@sip-servlets.com");
SipURI sipUri = sipFactory.createSipURI("receiver", "127.0.0.1:5060");
sipServletRequest.setRequestURI(sipUri);
sipServletRequest.setContentLength(content.length());
sipServletRequest.setContent(content, "text/plain;charset=UTF-8");
sipServletRequest.send();
} catch (ServletParseException e) {
logger.error("Exception occured while parsing the addresses",e);
} catch (IOException e) {
logger.error("Exception occured while sending the request",e);
}
}
});
| Method Summary | |
|---|---|
boolean |
getCopyRecordRouteHeadersOnSubsequentResponses()
Allows for applications to copy the record route headers on the responses to subsequent INVITE requests where the dialog route set shouldn't normally be changed to cope with non compliant RFC 3261 servers. |
void |
scheduleAsynchronousWork(SipSessionAsynchronousWork work)
This method allows an application to access a SipSession in an asynchronous manner. |
void |
setCopyRecordRouteHeadersOnSubsequentResponses(boolean copyRecordRouteHeadersOnSubsequentResponses)
Allows for applications to copy the record route headers on the responses to subsequent INVITE requests where the dialog route set shouldn't normally be changed to cope with non compliant RFC 3261 servers. |
void |
setOutboundInterface(SipURI outboundInterface)
In multi-homed environment this method can be used to select the outbound interface to use when sending requests for this SipSession. |
| Method Detail |
|---|
void setOutboundInterface(SipURI outboundInterface)
outboundInterface - the sip uri representing the outbound interface to use when sending requests out
NullPointerException - on null sip uri
IllegalArgumentException - if the sip uri is not understood by the container as one of its outbound interfacevoid scheduleAsynchronousWork(SipSessionAsynchronousWork work)
work - the work to be performed on this SipSession.void setCopyRecordRouteHeadersOnSubsequentResponses(boolean copyRecordRouteHeadersOnSubsequentResponses)
copyRecordRouteHeadersOnSubsequentResponses - false by default, if true will exhibit the behavior described aboveboolean getCopyRecordRouteHeadersOnSubsequentResponses()
copyRecordRouteHeadersOnSubsequentResponses - true if the session currently exhibit the behavior described above
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||