Package org.onemind.swingweb.session

Examples of org.onemind.swingweb.session.SwingWebSession


    /** the logger * */
    private static final Logger _logger = Logger.getLogger(SwingWebServlet.class.getName());

    public SwingWebSession createSession(SwingWebContext context, HttpSession session)
    {
        return new SwingWebSession(new SwingWebComponentManager());
    }
View Full Code Here


                        session.removeAttribute(uri);
                    } else
                    {
                        try
                        {
                            SwingWebSession swSession = (SwingWebSession) obj;
                            if (swSession == null)
                            {
                                swSession = (SwingWebSession) createSession(_manager.getContext(), session);
                                swSession.addListener(this);
                                swSession.putValue("SWINGWEB_SESSION_ID", String.valueOf(System.currentTimeMillis()));
                                session.setAttribute(uri, swSession);
                                swSession.putAllValues(env);
                                swSession.putValue("HTTP_FORM", form);
                                swSession.putValue("HTTP_SESSION", session);
                                swSession.putValue("COMPONENT_OPTIONS_CONFIG", _comOptsFile.getAbsolutePath());
                                swSession.putValue("COMPONENT_OPTIONS", _comOpts);
                                _sessions.put(swSession, session);
                                _manager.setCurrentSession(swSession);
                                startApp(swSession, req, resp);
                            } else
                            {
                                swSession.putAllValues(env);
                                swSession.putValue("COMPONENT_OPTIONS_CONFIG", _comOptsFile.getAbsolutePath());
                                swSession.putValue("COMPONENT_OPTIONS", _comOpts);
                                swSession.putValue("HTTP_FORM", form);
                                swSession.putValue("HTTP_SESSION", session);
                                _manager.setCurrentSession(swSession);
                            }
                            if (_getAfterPost)
                            {
                                if (req.getMethod().equalsIgnoreCase("GET"))
View Full Code Here

            {
                String name = (String) names.nextElement();
                Object value = session.getAttribute(name);
                if (value instanceof SwingWebSession)
                {
                    SwingWebSession swSession = ((SwingWebSession) value);
                    _manager.setCurrentSession(swSession);
                    try
                    {
                        swSession.close();
                    } finally
                    {
                        _manager.setCurrentSession(null);
                    }
                }
View Full Code Here

    /** the logger * */
    private static final Logger _logger = Logger.getLogger(SwingWebThinClientServlet.class.getName());

    public SwingWebSession createSession(SwingWebContext context, HttpSession session)
    {
        return new SwingWebSession(new SwingWebComponentManager());
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected SwingWebSession createSession(SwingWebContext context, HttpSession httpSession)
    {
        SwingWebSession session = new SwingWebSession(_sharedComponentManager);
        return session;
    }
View Full Code Here

    public void testAwtWidgetExample() throws Exception
    {
        SwingWebAppManager manager = new SwingWebAppManager(getClass().getResourceAsStream("/swingweb-demo-config.xml"));
        SwingWebComponentManager comManager = new SwingWebComponentManager();
        _session = new SwingWebSession(comManager);
        manager.setCurrentSession(_session);
        try
        {
            manager.startApp(AwtWidgetExample.class, null);
            PrintWriter writer = new PrintWriter(System.out);
View Full Code Here

TOP

Related Classes of org.onemind.swingweb.session.SwingWebSession

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.