/** * Populate the attributes stored in the distributed store to local * transient ones. */ protected void populateAttributes() { Map map = proxy_.getSipSessionAttributes(sipApplicationSessionKey.getId(), getHaId()); // Preserve any local attributes that were excluded from replication Map excluded = removeExcludedAttributes(attributes_); if (excluded != null) map.putAll(excluded); attributes_ = Collections.synchronizedMap(map); attrModifiedMap_.clear(); attrRemovedMap_.clear(); }
public void removeMyselfLocal() { // Need to evict attribute first before session to clean up everything. // BRIAN -- the attributes *are* already evicted, but we leave the // removeAttributesLocal call here in order to evict the ATTRIBUTE node. // Otherwise empty nodes for the session root and child ATTRIBUTE will // remain in the tree and screw up our list of session names. proxy_.removeSipSessionAttributesLocal(sipApplicationSessionKey.getId(), getHaId()); proxy_.removeSipSessionLocal(sipApplicationSessionKey.getId(), getHaId()); }
public void removeMyself() { // This is a shortcut to remove session and it's child attributes. proxy_.removeSipSession(sipApplicationSessionKey.getId(), getHaId()); }
public void removeMyself() { proxy_.removeSipSession(sipApplicationSessionKey.getId(), getHaId()); }
public void removeMyselfLocal() { proxy_.removeSipSessionLocal(sipApplicationSessionKey.getId(), getHaId()); }
final String sipAppSessionKey = sipApplicationSessionKey.getId(); final String sipSessionKey = getHaId();
final String sipAppSessionKey = sipApplicationSessionKey.getId(); final String sipSessionKey = getHaId(); if (logger.isDebugEnabled()) {
final String sipAppSessionKey = sipApplicationSessionKey.getId(); final String sipSessionKey = getHaId();
+ "version from: " + getVersion() + " and replicate."); final String sipAppSessionKey = sipApplicationSessionKey.getId(); final String sipSessionKey = getHaId(); if(isNew) {
public void putSipSession(String realId, ClusteredSipSession session) { Fqn fqn = getSipSessionFqn(session.getSipApplicationSession().getKey().getId(), realId); if (session.getReplicateSessionBody()) { if(log_.isDebugEnabled()) { log_.debug("Session is dirty or new and is being fully replicated " + session.toString()); } Map map = new HashMap(); // if (useTreeCacheMarshalling_) // map.put(realId, session); // else map.put(realId, externalizeSipSession(session)); // Put in (VERSION_KEY, version) after the real put for cache invalidation map.put(VERSION_KEY, new Integer(session.getVersion())); cacheWrapper_.put(fqn, map); } else { if(log_.isDebugEnabled()) { log_.debug("Session is not being replicated right now, but the version is being updated and remote nodes will pull it on demand when they notice or other event forces full replication. Only the version field is updated now. " + session.toString()); } // Invalidate the remote caches cacheWrapper_.put(fqn, VERSION_KEY, new Integer(session.getVersion())); } }
final String branch = JainSipUtils.createBranch(sipApplicationSession.getKey().getId(), sipFactoryImpl.getSipApplicationDispatcher().getHashFromApplicationName(session.getKey().getApplicationName())); viaHeader.setBranch(branch);
applicationSessionId = sipApplicationSessionImpl.getKey().getId(); } else { applicationSessionId = key.getApplicationSessionId();
final String sipAppSessionId = sipApplicationSessionKey.getId(); final String sipSessionId = getHaId(); Long ct = (Long) proxy_.getSipSessionMetaData(sipAppSessionId, sipSessionId, CREATION_TIME);
toTag = ApplicationRoutingHeaderComposer.getHash(sipFactoryImpl.getSipApplicationDispatcher(),sipSessionKey.getApplicationName(), sipAppSessionKey.getId());
final String branch = JainSipUtils.createBranch(originalAppSession.getKey().getId(), sipApplicationDispatcher.getHashFromApplicationName(originalAppSession.getKey().getApplicationName())); ViaHeader viaHeader = JainSipUtils.createViaHeader( getSipNetworkInterfaceManager(), newRequest, branch, null); newFromHeader.setTag(ApplicationRoutingHeaderComposer.getHash(getSipApplicationDispatcher(), originalAppSession.getKey().getApplicationName(), originalAppSession.getKey().getId())); final MobicentsSipSessionKey key = SessionManagerUtil.getSipSessionKey(originalAppSession.getKey().getId(), originalAppSession.getKey().getApplicationName(), newRequest, false); final MobicentsSipSession session = originalAppSession.getSipContext().getSipManager().getSipSession(key, true, this, originalAppSession); if(originalSession != null) {
final String branch = JainSipUtils.createBranch(session.getSipApplicationSession().getKey().getId(), sipApplicationDispatcher.getHashFromApplicationName(session.getSipApplicationSession().getKey().getApplicationName())); ViaHeader viaHeader = JainSipUtils.createViaHeader( sipFactoryImpl.getSipNetworkInterfaceManager(), prackRequest, branch, session.getOutboundInterface());
public SipSession getSession(boolean create) { MobicentsSipSession session = getSipSession(); if (session == null && create) { MobicentsSipApplicationSession sipApplicationSessionImpl = (MobicentsSipApplicationSession)getSipApplicationSession(create); MobicentsSipSessionKey sessionKey = SessionManagerUtil.getSipSessionKey(sipApplicationSessionImpl.getKey().getId(), currentApplicationName, message, false); session = sipApplicationSessionImpl.getSipContext().getSipManager().getSipSession(sessionKey, create, sipFactoryImpl, sipApplicationSessionImpl); session.setSessionCreatingTransactionRequest(this); session.setOrphan(isOrphan()); sessionKey = session.getKey(); } if(session != null) { return session.getFacade(); } return null; }
.getSipApplicationSession(); newFromHeader.setTag(ApplicationRoutingHeaderComposer.getHash(sipFactoryImpl.getSipApplicationDispatcher(), originalSession.getKey().getApplicationName(), appSession.getKey().getId())); final MobicentsSipSessionKey key = SessionManagerUtil.getSipSessionKey(appSession.getKey().getId(), originalSession.getKey().getApplicationName(), newRequest, false); final MobicentsSipSession session = appSession.getSipContext().getSipManager().getSipSession(key, true, sipFactoryImpl, appSession); session.setHandler(originalSession.getHandler()); final String branch = JainSipUtils.createBranch(appSession.getKey().getId(), sipApplicationDispatcher.getHashFromApplicationName(appSession.getKey().getApplicationName())); ViaHeader viaHeader = JainSipUtils.createViaHeader( sipFactoryImpl.getSipNetworkInterfaceManager(), newRequest, branch, session.getOutboundInterface());
fromHeader.setTag(ApplicationRoutingHeaderComposer.getHash(sipApplicationDispatcher, sipAppSession.getApplicationName(), sipApplicationSessionKey.getId())); } else { fromHeader.setTag(fromTagToUse); mobicentsSipApplicationSession.getKey().getId(), mobicentsSipApplicationSession.getKey().getApplicationName(), requestToWrap, false); MobicentsSipSession session = mobicentsSipApplicationSession.getSipContext().getSipManager(). getSipSession(key, true, this, mobicentsSipApplicationSession); final String branch = JainSipUtils.createBranch(sipApplicationSessionKey.getId(), sipApplicationDispatcher.getHashFromApplicationName(sipApplicationSessionKey.getApplicationName())); ViaHeader viaHeader = JainSipUtils.createViaHeader( getSipNetworkInterfaceManager(), requestToWrap, branch, session.getOutboundInterface());
final SipSessionKey sessionKey = SessionManagerUtil.getSipSessionKey(appSession.getKey().getId(), nextApplicationName, request, false); final MobicentsSipSession sipSessionImpl = sipManager.getSipSession(sessionKey, true, sipFactoryImpl, appSession); sipServletRequest.setSipSession(sipSessionImpl);