Package com.ericsson.ssa.sip

Examples of com.ericsson.ssa.sip.Dispatcher


                    "No Branch in Via header " + req.toString());
            }

            SipServletResponseImpl resp = (SipServletResponseImpl) req.createResponse(400,
                    "No Branch in Via header");
            Dispatcher d = resp.popDispatcher();

            if (d != null) {
                d.dispatch(resp);
            }
        }
    }
View Full Code Here


            String id = getBranchId(req) + req.getMethod();
            ClientTransaction ct = new NonInviteClientTransaction(id, req);
            putClientTransaction(ct);
        }

        Dispatcher d = req.popDispatcher();

        if (d != null) {
            d.dispatch(req);
        }
    }
View Full Code Here

    /*
     * Nothing todo here more then pop. Should only get her for stateless proxy
     * Responses should go on ServerTransaction
     */
    public void dispatch(SipServletResponseImpl resp) {
        Dispatcher d = resp.popDispatcher();

        if (d != null) {
            d.dispatch(resp);
        }
    }
View Full Code Here

            toConfirmed();
        } else if ((_response != null) &&
                ((_state == PROCEEDING) || (_state == COMPLETED))) {
            _response.restoreRetransmissionTransactionStack();

            Dispatcher d = _response.popDispatcher();

            // it's acceptable to block the transaction
            // during the response transmission since
            // it's an answer to a request re-transmission
            if (d != null) {
                d.dispatch(_response);
            }

            if (SipMonitoring.isEnabled(SipMonitoring.TRANSACTION_MANAGER)) {
                updateLastAccessTimestamp();
            }
View Full Code Here

    }

    public void timeout(GeneralTimer timer) {
        TransactionTimer tt = (TransactionTimer) timer.getInfo();
        SipServletRequestImpl req = null;
        Dispatcher d = null;

        switch (tt) {
        case TimerE:

            synchronized (this) {
                if ((_state == TRYING) || (_state == PROCEEDING)) {
                    long delay = T2; // default to PROCEEDING delay

                    if (_state == TRYING) {
                        // Have to dirty cast in order not to reimplement hole
                        // structure
                        delay = ((GeneralTimerImpl) timer).getDelay();
                        // calculate next timer*2 but less then T2 (4sec)
                        delay = ((delay * 2) <= T2) ? (delay * 2) : T2;
                    }

                    if (_timerE != null) {
                        _timerE.cancel();
                    }

                    // schedule new timer
                    _timerE = _timerService.createTimer(this, delay,
                            TimerE);

                    // resend the request
                    getRequest().restoreRetransmissionApplicationStack();
                    req = (SipServletRequestImpl) getRequest().clone();
                }
            }

            // dispatch after synch block...
            if (req != null) {
                d = req.popDispatcher();

                if (d != null) {
                    d.dispatch(req);
                }

                if (SipMonitoring.isEnabled(SipMonitoring.TRANSACTION_MANAGER)) {
                    updateLastAccessTimestamp();
                }
View Full Code Here

    synchronized boolean handle(SipServletRequestImpl req) {
        if ((_response != null) &&
                ((_state == PROCEEDING) || (_state == COMPLETED))) {
            _response.restoreRetransmissionTransactionStack();

            Dispatcher d = _response.popDispatcher();

            // it's acceptable to block the transaction
            // during the response transmission since
            // it's a request re-transmission
            if (d != null) {
                d.dispatch(_response);
            }

            if (SipMonitoring.isEnabled(SipMonitoring.TRANSACTION_MANAGER)) {
                updateLastAccessTimestamp();
            }
View Full Code Here

                    _log.log(Level.FINE, "IllegalState in ICT = " + _state);
                }
            }
        }

        Dispatcher d = resp.popDispatcher();

        try {
            if (d != null) {
                d.dispatch(resp);
            }
        } // Transport Error
        catch (Exception e) {
          if (_state != TERMINATED) {
            terminate();
View Full Code Here

        return false; // Continue up the chain
    }

    public void timeout(GeneralTimer timer) {
        TransactionTimer tt = (TransactionTimer) timer.getInfo();
        Dispatcher d = null;
        SipServletResponseImpl resp = null;
        SipServletRequestImpl req = null;

        switch (tt) {
        case TimerA:

            synchronized (this) {
                if (_state == CALLING) {
                    // Have to dirty cast in order not to reimplement hole
                    // structure
                    long delay = ((GeneralTimerBase) timer).getDelay();
                    // calculate next timer*2
                    delay *= 2;
                    // schedule new timer
                    _timerA = _timerService.createTimer(this, delay, TimerA);
                    // resend the request
                    getRequest().restoreRetransmissionApplicationStack();
                    req = (SipServletRequestImpl) getRequest().clone();
                }
            }

            if (req != null) {
                // dispatch after synch block...
                d = req.popDispatcher();

                if (d != null) {
                    d.dispatch(req);
                }

                if (SipMonitoring.isEnabled(SipMonitoring.TRANSACTION_MANAGER)) {
                    updateLastAccessTimestamp();
                }
View Full Code Here

TOP

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

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.