Package com.ericsson.ssa.sip

Examples of com.ericsson.ssa.sip.SipApplicationSessionImpl


    public SipApplicationSessionImpl createSipApplicationSession(
            String id, SipApplicationListeners sipApplicationListeners) {
        if (id == null) {
            return createSipApplicationSession(sipApplicationListeners);
        }
        SipApplicationSessionImpl sess = null;

        sess = applicationSessions.get(id);
        if (sess == null) {
            sess = createNewSipApplicationSession(id);
            SipApplicationSessionImpl newsess =
                    applicationSessions.putIfAbsent(id, sess);
            if (newsess != null) {
                sess = newsess;
            }
        }
View Full Code Here


     * @return The SipApplicationSession with the given id, or null if not
     * found
     * @throws RemoteLockException
     */
    public SipApplicationSessionImpl findSipApplicationSession(String id) throws RemoteLockException {
        SipApplicationSessionImpl appSessImpl = applicationSessions.get(id);
        if (appSessImpl == null)
            return null;
        initSipApplicationSession(appSessImpl, null);
        return appSessImpl;
       
View Full Code Here

     * active cache.
     *
     * @param sas The SipApplicationSession to be removed
     */
    public void removeSipApplicationSession(SipApplicationSessionImpl sas) {
        SipApplicationSessionImpl appSessImpl = applicationSessions.get(sas.getId());

        if (sas == appSessImpl) {
            SipApplicationSessionImpl val = applicationSessions.remove(sas.getId());
            if (logger.isLoggable(Level.FINEST)) {
                logger.log(Level.FINEST, "The application session with ID=" + sas.getId() + " has been removed from the active cache ref:"
                        + sas.getObjectRefString());
            }
        } else {
View Full Code Here

     * @param id The id of the new SipApplicationSession
     *
     * @return The new SipApplicationSession
     */
    protected SipApplicationSessionImpl createNewSipApplicationSession(String id) {
        return new SipApplicationSessionImpl(this, id);
    }
View Full Code Here

        if (logger.isLoggable(Level.FINEST)) {
            StringBuffer sb = new StringBuffer();
            sb.append("\nActive Objects in Application: ").append(getApplicationId()).append('\n');

            for (Map.Entry<String, SipApplicationSessionImpl> sasEntry : applicationSessions.entrySet()) {
              SipApplicationSessionImpl sas = sasEntry.getValue();
                sb.append("  SAS: ").append(sasEntry.getKey()).append(" ref: ").append(sas.getObjectRefString()).append(" isValid:").append(sas.isValid()).append('\n');  
            }

            for (Map.Entry<String, SipSessionDialogImpl> ssEntry : sipSessions.entrySet()) {
                SipSessionDialogImpl ss = ssEntry.getValue();
                String creationDate = " at: "+ new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(ss.getCreationTime()));
View Full Code Here

            synchronized (applicationSessions) {
                Iterator<SipApplicationSessionImpl> it = applicationSessions.values().iterator();

                while (it.hasNext()) {
                    SipApplicationSessionImpl sas = it.next();

                    if (!DataCentricUtilHolder.getInstance().isLocal(sas.getBeKey())) {
                        invalidationSet.add(sas);
                    }
                }
            }
View Full Code Here

     */
    public ReplicableEntity findSasAndPassivate(String id,
                                                        AtomicBoolean cachedSASIsLocal) {
        cachedSASIsLocal.set(false);
        HASipApplicationSession haSipApplicationSession = null;
        SipApplicationSessionImpl sipApplicationSession
                = findSipApplicationSessionFromCacheOnly(id);
        if (sipApplicationSession instanceof HASipApplicationSession) {
            haSipApplicationSession = (HASipApplicationSession) sipApplicationSession;
            if (SipReplicationUtil.isInstanceLoadBalancedByCLB() &&
                    SipReplicationUtil.isLocal(haSipApplicationSession.getId())) {
View Full Code Here

    // But I have left it as a normal process* method in case at some
    // point it should be a unicast load received acknowledgement.
    public void processLoadReceivedSas(String id) {
        activationHelper.unregisterSasTimerMigrationTask(id);
        //remove active sip application session if present and not locked
        SipApplicationSessionImpl sipApplicationSession
            = findSipApplicationSessionFromCacheOnly(id);
        if(sipApplicationSession != null
                && !sipApplicationSession.isForegroundLocked()) {
            sipApplicationSession.passivate();
        }
    }
View Full Code Here

            }
        }
    }

    protected void clearFromSipApplicationSessionManagerCache(String id) {
        SipApplicationSessionImpl sess
            = super.findSipApplicationSessionFromCacheOnly(id);
        if(sess != null) {                              
            this.removeSipApplicationSessionFromCache(sess);
        }
    }   
View Full Code Here

        if (store == null) {
            return null;
        }

        try {
            SipApplicationSessionImpl session = null;
            try {
                if (SecurityUtil.isPackageProtectionEnabled()){
                    try{
                        session = (SipApplicationSessionImpl) AccessController.doPrivileged(new PrivilegedStoreLoadSipApplicationSession(id, version, store));
                    }catch(PrivilegedActionException ex){
                        Exception exception = ex.getException();
                        if (exception instanceof IOException){
                            throw (IOException)exception;
                        } else if (exception instanceof ClassNotFoundException) {
                            throw (ClassNotFoundException)exception;
                        }
                    }
                } else {
                    if (version != null) {
                         session = store.load(id, version);
                    } else {
                         session = store.load(id);
                    }
                }  
            } catch (ClassNotFoundException e) {
                IOException ex1 =
                    (IOException) new IOException("Error during swapInSipApplicationSession: " + e.getMessage()).initCause(e);
                throw ex1;                
            }
           
            if (SASLockStatus.isSASLocked()) {
                session = activate(session, removeFromExpat);
            } else if (session != null) {
                synchronized (session.getSasObjectLock()) {
                    SASLockStatus.resetSASLockedToDefaultValue();
                    session = activate(session, removeFromExpat);
                }
            }
            return session;
View Full Code Here

TOP

Related Classes of com.ericsson.ssa.sip.SipApplicationSessionImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.