Package javax.servlet.sip.ar

Examples of javax.servlet.sip.ar.SipTargetedRequestInfo


     */
    static SipTargetedRequestInfo get (SipServletRequestImpl request) {
        try {           
            SipApplicationSessionImpl sas = null;
            String appName = null;
            SipTargetedRequestInfo stri = null;
           
            SessionTarget st = request.getSessionTarget();
           
            if (st != null) {
                return st.getTargetedRequestInfo();
            }
           
           
            // XXX it is a pity that we do the SAS loading twice.
            // once here to check for a targeted request and once in the Factory
            // when we actually create the ss/sas for the request
            // maybe we can refactor a bit, so that if we have a targeted
            // request we already set the SAS that we found on the request somehow...
            String uriEncodedSasId = null;
            Address routeAddr = request.getInitialPoppedRoute();
            if (routeAddr != null) {
                uriEncodedSasId = UriUtil.getAndDecodeParameter(
                        routeAddr.getURI(), URIImpl.SASID_PARAM);
            }
            if (uriEncodedSasId == null)
                uriEncodedSasId = UriUtil.getAndDecodeParameter(request.getRequestURI(), URIImpl.SASID_PARAM);
            if (uriEncodedSasId != null) {
                appName = SipApplicationSessionUtil.getApplicationName(uriEncodedSasId);
                if (appName != null) {
                    sas = SipSessionManagerRegistry.getInstance().get(appName).findSipApplicationSession(uriEncodedSasId);
                    if (sas != null && sas.isValid()) {
                        if (m_logger.isLoggable(Level.FINEST)) {
                                    m_logger.log(Level.FINEST, "targeted request for app {0} with encodedURI: {1}", new Object[] {appName, uriEncodedSasId});
                                }
                        return new SipTargetedRequestInfo(SipTargetedRequestType.ENCODED_URI, appName);
                    }
                }
            }
    
        } catch (UnsupportedEncodingException e1) {
View Full Code Here


                    m_logger.log(Level.FINEST, "routing based on restored AR routing info region {0} and stateinfo {1} ", new Object[] {region, newStateInfo});
                }
            } else {
               
                // try the targeted request first                                                     
                SipTargetedRequestInfo stri = TargettedRequestHandler.get(request);
                //TODO. Complete formatting after review is done.
                if (stri != null) {
                    String appName = stri.getApplicationName();
                    info = runtimeRouter.getNextApplication(
                            request,
                            region,
                            SipApplicationRoutingDirective.CONTINUE,
                            stri,
View Full Code Here

        return Header.JOIN;
    }
   
    @Override
    public SipTargetedRequestInfo getTargetedRequestInfo() {
        return new SipTargetedRequestInfo(SipTargetedRequestType.JOIN,
                getApplicationSessionImpl().getApplicationName());
    }
View Full Code Here

TOP

Related Classes of javax.servlet.sip.ar.SipTargetedRequestInfo

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.