/** * Computes the sip application session key from the input parameters. * The sip application session key will be of the form (UUID,APPNAME) * @param applicationName the name of the application that will be the second component of the key * @param id the Id composing the first component of the key * @return the computed key * @throws NullPointerException if one of the two parameters is null */ public static SipApplicationSessionKey getSipApplicationSessionKey(final String applicationName, final String id, final String appGeneratedKey) { if(applicationName == null) { throw new NullPointerException("the application name cannot be null for sip application session key creation"); } return new SipApplicationSessionKey( id, applicationName, appGeneratedKey); }
public SipApplicationSession getApplicationSessionByKey(String applicationSessionKey, boolean create, boolean isContainerManaged) { if(applicationSessionKey == null) { throw new NullPointerException("the given key is null !"); } SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(null, sipContext.getApplicationName(), applicationSessionKey); MobicentsSipApplicationSession sipApplicationSession = sipContext.getSipManager().getSipApplicationSession(sipApplicationSessionKey, create); if(sipApplicationSession == null) { return null; } else { // make sure to acquire this app session and add it to the set of app sessions we monitor in the context of the application // to release them all when we exit application code sipContext.enterSipApp(sipApplicationSession, null, true, isContainerManaged); return sipApplicationSession.getFacade(); } }
SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(sessionKey.getApplicationSessionId(), sessionKey.getApplicationName(), null); MobicentsSipApplicationSession sipApplicationSession = sipContext.getSipManager().getSipApplicationSession(sipApplicationSessionKey, false); sipSession = sipContext.getSipManager().getSipSession(sessionKey, false, sipFactoryImpl, sipApplicationSession);
SipApplicationSessionKey key = new SipApplicationSessionKey(sessId, sipApplicationName); ClusteredSipApplicationSession sipApplicationSession = manager_.findLocalSipApplicationSession(key, false); if (sipApplicationSession == null)
SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(sessId, sipApplicationName); manager_.processRemoteSipApplicationSessionInvalidation(sipApplicationSessionKey); } else { sessId = getSipApplicationSessionIdFromFqn(fqn, isBuddy); attrKey = getSipApplicationSessionIdPojoKeyFromFqn(fqn, isBuddy); SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(sessId, sipApplicationName); manager_.processRemoteSipApplicationSessionAttributeRemoval(sipApplicationSessionKey, attrKey); } else { if(isFqnSipApplicationSessionRootSized(size, isBuddy)) { sessId = getSipApplicationSessionIdFromFqn(fqn, isBuddy); SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(sessId, sipApplicationName); manager_.processSipApplicationSessionLocalPojoModification(sipApplicationSessionKey); } else {
if(isFqnSipApplicationSessionRootSized(size, isBuddy)) { sessId = getSipApplicationSessionIdFromFqn(fqn, isBuddy); SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(sessId, sipApplicationName); manager_.processSipApplicationSessionLocalPojoModification(sipApplicationSessionKey); } else {