Example usage for com.vaadin.server VaadinSession VaadinSession

List of usage examples for com.vaadin.server VaadinSession VaadinSession

Introduction

In this page you can find the example usage for com.vaadin.server VaadinSession VaadinSession.

Prototype

public VaadinSession(VaadinService service) 

Source Link

Document

Creates a new VaadinSession tied to a VaadinService.

Usage

From source file:org.lunifera.runtime.web.gyrex.vaadin.internal.VaadinOSGiServlet.java

License:Open Source License

@Override
protected OSGiServletService createServletService(DeploymentConfiguration deploymentConfiguration) {
    OSGiServletService service = new OSGiServletService(this, deploymentConfiguration, webAppProperties,
            new OSGiServletService.IVaadinSessionFactory() {
                @Override/* www. j  av  a 2 s  .  c om*/
                public VaadinSession createSession(VaadinRequest request,
                        HttpServletRequest httpServletRequest) {
                    VaadinSession session = new VaadinSession(request.getService());
                    for (UiProviderInfo info : tracker.getInfos()) {
                        session.addUIProvider(new OSGiUIProvider(info.getFactory(), info.getProviderClass()));
                    }
                    return session;
                }
            });
    return service;
}

From source file:org.lunifera.runtime.web.vaadin.osgi.servlet.VaadinOSGiServlet.java

License:Open Source License

@Override
protected OSGiServletService createServletService(DeploymentConfiguration deploymentConfiguration)
        throws ServiceException {

    // create the servlet service initialized with the ui provider
    OSGiServletService service = new OSGiServletService(this, deploymentConfiguration,
            new OSGiServletService.IVaadinSessionFactory() {
                @Override/*w  w w.  j  a va2  s.c o m*/
                public VaadinSession createSession(VaadinRequest request,
                        HttpServletRequest httpServletRequest) {
                    VaadinSession session = new VaadinSession(request.getService());
                    for (UIProvider provider : webApplication.getUiProviders()) {
                        session.addUIProvider(provider);
                    }
                    return session;
                }
            });
    service.init();
    return service;
}

From source file:org.lunifera.runtime.web.vaadin.standalone.servlet.VaadinOSGiServlet.java

License:Open Source License

@Override
protected OSGiServletService createServletService(DeploymentConfiguration deploymentConfiguration) {

    // create the servlet service initialized with the ui provider
    OSGiServletService service = new OSGiServletService(this, deploymentConfiguration,
            new OSGiServletService.IVaadinSessionFactory() {
                @Override/*from w w  w  .  jav  a  2  s.  co m*/
                public VaadinSession createSession(VaadinRequest request,
                        HttpServletRequest httpServletRequest) {
                    VaadinSession session = new VaadinSession(request.getService());
                    for (OSGiUIProvider provider : webApplication.getUiProviders()) {
                        session.addUIProvider(provider);
                    }
                    return session;
                }
            });
    return service;
}

From source file:org.semanticsoft.vaaclipse.app.servlet.VaadinOSGiServlet.java

License:Open Source License

@Override
protected OSGiServletService createServletService(DeploymentConfiguration deploymentConfiguration) {

    // create the servlet service initialized with the ui provider
    OSGiServletService service = new OSGiServletService(this, deploymentConfiguration,
            new OSGiServletService.IVaadinSessionFactory() {
                @Override/* ww  w.j a v a 2s . c o m*/
                public VaadinSession createSession(VaadinRequest request,
                        HttpServletRequest httpServletRequest) {
                    VaadinSession session = new VaadinSession(request.getService());
                    session.addUIProvider(new OSGiUIProvider());
                    return session;
                }
            });
    return service;
}