Package org.itsnat.core.http

Examples of org.itsnat.core.http.ItsNatHttpSession


         en navegadores tal y como BlackBerry y alg�n S60WebKit,
         fueron de nuevo re-insertados. En otros navegadores este test no
         tiene inter�s.
        */

        ItsNatHttpSession session = (ItsNatHttpSession)request.getItsNatSession();
        String userAgent = session.getUserAgent();

        Document doc = itsNatDoc.getDocument();

        StringBuilder code = new StringBuilder();

View Full Code Here


    {
        final ItsNatDocument itsNatDoc = null;
        Document doc = itsNatDoc.getDocument();
        ItsNatVariableResolver resolver = itsNatDoc.createItsNatVariableResolver();
        ClientDocument owner = itsNatDoc.getClientDocumentOwner();
        ItsNatHttpSession itsNatSession = (ItsNatHttpSession)owner.getItsNatSession();
        HttpSession session = itsNatSession.getHttpSession();
        session.setAttribute("sessionId",itsNatSession.getId());
        itsNatDoc.setAttribute("docId",itsNatDoc.getId());
        resolver.setLocalVariable("refreshInterval",new Integer(2000));
        resolver.setLocalVariable("commMode",new Integer(itsNatDoc.getCommMode()));
        resolver.setLocalVariable("linkText","Click to monitor your page");
View Full Code Here

        resolver.setLocalVariable("refreshInterval",new Integer(3000));
        resolver.setLocalVariable("commMode",new Integer(itsNatDoc.getCommMode()));

        for(int i = 0; i < sessionList.size(); i++)
        {
            ItsNatHttpSession otherSession = (ItsNatHttpSession)sessionList.get(i);

            ItsNatDocument[] remDocs = otherSession.getItsNatDocuments();

            for(int j = 0; j < remDocs.length; j++)
            {
                ItsNatDocument currRemDoc = remDocs[j];
                if (itsNatDoc == currRemDoc) continue;
                String id;
                synchronized(currRemDoc)
                {
                    ItsNatDocumentTemplate docTemplate = currRemDoc.getItsNatDocumentTemplate();
                    if (docTemplate != thisDocTemplate)
                        continue;
                }

                String docId = currRemDoc.getId(); // No sync is needed
                Element sessionElem = (Element)sessionNodeList.addElement();

                ItsNatVariableResolver resolver2 = resolver.createItsNatVariableResolver();
                resolver2.setLocalVariable("sessionId",otherSession.getId());
                resolver2.setLocalVariable("agentInfo",otherSession.getUserAgent());
                resolver2.setLocalVariable("docId",docId);
                resolver2.resolve(sessionElem);
            }
        }
    }
View Full Code Here

{
    public static boolean isMobileBrowser(ItsNatServletRequest request)
    {
        if (isIEMobile6on6(request))
            return true;
        ItsNatHttpSession session = (ItsNatHttpSession)request.getItsNatSession();
        String userAgent = session.getUserAgent();
        return (userAgent.indexOf("Opera Mini") != -1) ||
               (userAgent.indexOf("Opera Mobi") != -1) || // Opera Mobile 9.5 beta
               (userAgent.indexOf("SAMSUNG-SGH-i900") != -1) || // Opera Mobile 9.5 (Omnia)
               (userAgent.indexOf("Windows CE") != -1) || // Opera Mobile 9.5
               (userAgent.indexOf("Symbian") != -1) ||  // Opera Mobile 9.5 & S60WebKit
View Full Code Here

               (userAgent.indexOf("BlackBerry") != -1);
    }

    public static boolean isJoystickModePreferred(ItsNatServletRequest request)
    {
        ItsNatHttpSession session = (ItsNatHttpSession)request.getItsNatSession();
        String userAgent = session.getUserAgent();
        if (userAgent.indexOf("Android") != -1)
            return true;
        return false;
    }
View Full Code Here

        }
    }

    public void saveDocumentToSession()
    {
        ItsNatHttpSession itsNatSession = (ItsNatHttpSession)itsNatRequest.getItsNatSession();
        HttpSession session = itsNatSession.getHttpSession();
        session.setAttribute("previous_doc",this);
    }
View Full Code Here

        session.setAttribute("previous_doc",this);
    }

    public DisabledEventsAndCompListener loadDocumentFromSession()
    {
        ItsNatHttpSession itsNatSession = (ItsNatHttpSession)itsNatRequest.getItsNatSession();
        HttpSession session = itsNatSession.getHttpSession();
        DisabledEventsAndCompListener docPrev = (DisabledEventsAndCompListener)session.getAttribute("previous_doc");
        session.removeAttribute("previous_doc"); // No longer available
        return docPrev;
    }
View Full Code Here

    }

    public void saveDocumentToSession()
    {
        ItsNatDocument itsNatDoc = itsNatRequest.getItsNatDocument();
        ItsNatHttpSession itsNatSession = (ItsNatHttpSession)itsNatRequest.getItsNatSession();
        HttpSession session = itsNatSession.getHttpSession();
        session.setAttribute("previous_doc",itsNatDoc);
    }
View Full Code Here

        session.setAttribute("previous_doc",itsNatDoc);
    }

    public ItsNatDocument loadDocumentFromSession()
    {
        ItsNatHttpSession itsNatSession = (ItsNatHttpSession)itsNatRequest.getItsNatSession();
        HttpSession session = itsNatSession.getHttpSession();
        ItsNatDocument itsNatDocPrev = (ItsNatDocument)session.getAttribute("previous_doc");
        session.removeAttribute("previous_doc"); // No longer available
        return itsNatDocPrev;
    }
View Full Code Here

{
    public static boolean isMobileBrowser(ItsNatServletRequest request)
    {
        if (isIEMobile6on6(request))
            return true;
        ItsNatHttpSession session = (ItsNatHttpSession)request.getItsNatSession();
        String userAgent = session.getUserAgent();
        return (userAgent.indexOf("Android") != -1) ||  // Opera Mobile
               (userAgent.indexOf("S60") != -1) || // Opera Mobile
               (userAgent.indexOf("Symbian") != -1) ||  // Opera Mobile 9.5 & S60WebKit
               (userAgent.indexOf("Nokia6600s") != -1) || // S40WebKit
               (userAgent.indexOf("iPod") != -1) ||
View Full Code Here

TOP

Related Classes of org.itsnat.core.http.ItsNatHttpSession

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.