Package javax.servlet.sip

Examples of javax.servlet.sip.SipSession


                        if (m_Log.isLoggable(Level.FINE)) {
                            m_Log.log(Level.FINE,
                                    "Timer fired after 64*T1s - end dialog");
                        }
                        // Lock the DS for the entire duration.
                        SipSession session = m_RetransmitResponse.getSession();
                        DialogFragment dialog = ((SipSessionImplBase) session).getDF();
                        if (dialog != null) { // to be on the safe side
                            uow.lockDialog(dialog);
                        }
                        // issue 1085 :: create byeRequest before invoking the listeners.
                        // issue 1350 :: check that session is still valid. If app is undeployed it will not be
                        if(session.isValid()){
                          byeRequest = session.createRequest("BYE");
                        }
                        else {
                          if (m_Log.isLoggable(Level.FINE)) {
                                m_Log.log(Level.FINE,
                                        "Skipping to send BYE since SipSession is no longer valid");
View Full Code Here


     */
    public boolean activate() {
        // Add to active cache
        SipSessionManager mgr = getSipSessionManager();
        if (mgr != null) {
            SipSession ss = mgr.addSipSession(this);
            if (ss != null) {
                // While this thread has been in the process of loading the
                // requested SipSession, and is now trying to activate it,
                // another thread has also loaded the same SipSession, and
                // has already added it to the active cache. Abort activation.
View Full Code Here

            }
        }


        if (linkedSessions) {
            SipSession session1 = origRequest.getSession();
            SipSession session2 = copiedReq.getSession();

            if ((session1 == null) || (session2 == null)) {
                throw new NullPointerException();
            }
View Full Code Here

        if (isAlreadyLinked((SipServletRequestImpl) origRequest)) {
            throw new IllegalArgumentException();
        }

        SipSession session1 = origRequest.getSession();

        if ((session1 == null) || (session2 == null)) {
            throw new NullPointerException();
        }

        // are sessions consistent?
        if (isValidSessions((SipSessionBase) session1, (SipSessionBase) session2) &&
                (origRequest.getApplicationSession(false) != null) &&
                (session1.getApplicationSession()
                             .equals(origRequest.getApplicationSession()) == false)) {
            throw new IllegalArgumentException();
        }

        // headerMap can only contain TO, FROM or CONTACT system headers.
View Full Code Here

    private synchronized SipServletRequestImpl getLinkedSipServletRequest(
        SipServletRequestImpl req1) {
        SipServletRequestImpl req2 = req1.getLinkedRequest();

        if (req2 != null) {
            SipSession session1 = req1.getSession();
            SipSession session2 = req2.getSession();

            if (!isAlreadyLinkedToEachOther((SipSessionBase) session1,
                        (SipSessionBase) session2)) {
                // since the sessions are not linked to each other,
                // the request can't be linked either...
View Full Code Here

    private boolean isTerminated(SipSession sess) {
        return sess.getState() == SipSession.State.TERMINATED;
    }

    public synchronized void unlinkSipSessions(SipSession session1) {
        SipSession session2 = getLinkedSession((SipSessionBase) session1, false);

        if ((session2 == null) || isTerminated(session1) ) {
            throw new IllegalArgumentException();
        }
View Full Code Here

            throw new NullPointerException();
        }

        for (Iterator<?> i = getSessions(SipFactoryImpl.SIP_URI_PROTOCOL);
                i.hasNext();) {
            SipSession s = (SipSession) i.next();
            if (s.getId().equals(id)) {
                // match...
                return s;
            }
        }
View Full Code Here

     * @param sipSession The SipSession to add
     *
     * @return the previous SipSession, or null
     */
    public SipSession addSipSession(SipSessionDialogImpl sipSession) {
        SipSession ret = null;

        if (sipSession != null) {
            ret = sipSessions.put(sipSession.getId(), sipSession);
        }

View Full Code Here

TOP

Related Classes of javax.servlet.sip.SipSession

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.