|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SipSessionsUtil
A utility class providing additional support for converged HTTP/SIP applications and converged Java EE / SIP applications.
This class can be accessed through the ServletContext
parameter named javax.servlet.sip.SipSessionsUtil
or it can be injected
using the @Resource annotation.
Method Summary | |
---|---|
SipApplicationSession |
getApplicationSessionById(java.lang.String applicationSessionId)
Returns the SipApplicationSession for a given applicationSessionId. |
SipApplicationSession |
getApplicationSessionByKey(java.lang.String applicationSessionKey,
boolean create)
Returns the SipApplicationSession for a given session applicationSessionKey . |
SipSession |
getCorrespondingSipSession(SipSession session,
java.lang.String headerName)
Returns related SipSession. |
Method Detail |
---|
SipApplicationSession getApplicationSessionById(java.lang.String applicationSessionId)
applicationSessionId
- the SipApplicationSession's id
java.lang.NullPointerException
- if the applicationSessionId
is null.SipApplicationSession.getId()
SipApplicationSession getApplicationSessionByKey(java.lang.String applicationSessionKey, boolean create)
applicationSessionKey
.
The applicationSessionKey
String is the same as that supplied to
SipFactory#createApplicationSessionByKey. The method shall return the
Application Session only if the queried application session belongs to the
application from where this method is invoked.
The method returns null in case the container does not
find the SipApplicationSession instance matching the applicationSessionKey
.
applicationSessionKey
- session applicationSessionKey of the SipApplicationSessioncreate
- controls whether new session should be created upon lookup
failure
create
is set to false
. If create
is true
, create a new SipApplicationSession with the
given applicationSessionKey
java.lang.NullPointerException
- if the applicationSessionKey
is null.SipFactory.createApplicationSessionByKey(String)
SipSession getCorrespondingSipSession(SipSession session, java.lang.String headerName)
@Resource SipSessionsUtil sipSessionsUtil; protected void doInvite(SipServletRequest req) { SipSession joining = req.getSession(true); SipSession beingJoined = sipSessionsUtil.getCorrespondingSipSession( joining,"Join"); [...] }
session
- one of the two related SIP sessions. For example, it can
be the joining session or the replacing session.headerName
- the header name through which the association is made.
For example, for RFC 3911, it is Join
,
for RFC 3891, it is Replaces
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |