|
||||||||||
| 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 | |
|---|---|
void |
scheduleAsynchronousWork(SipSessionAsynchronousWork work)
This method allows an application to access a SipSession in an asynchronous manner. |
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||