@Override protected VaadinServletService createServletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException { JMeterService service = new JMeterService(this, deploymentConfiguration); service.init(); return service; }
@Override protected VaadinServletService createServletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException { VaadinServletService servletService = super.createServletService(deploymentConfiguration); servletService.addSessionInitListener(e -> e.getSession().addUIProvider(this.uiProvider)); servletService.addSessionInitListener(e -> sessions.add(e.getSession())); servletService.addSessionDestroyListener(e -> sessions.remove(e.getSession())); return servletService; }
@Override protected VaadinServletService createServletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException { VaadinServletService servletService = super.createServletService(deploymentConfiguration); servletService.addSessionInitListener(new SessionInitListener() { @Override public void sessionInit(SessionInitEvent sessionInitEvent) throws ServiceException { sessionInitEvent.getSession().addUIProvider(provider); } }); return servletService; }
public JMeterService(VaadinServlet servlet, DeploymentConfiguration deploymentConfiguration) throws ServiceException { super(servlet, deploymentConfiguration,null); }
@BeforeClass public static void beforeClass() { DeploymentConfiguration conf = new TestDeploymentConfiguration(); VaadinService service = new TestVaadinService(conf); VaadinService.setCurrent(service); }
public TestVaadinService(DeploymentConfiguration deploymentConfiguration) { super(deploymentConfiguration); }
/** * Create a servlet service instance that allows the use of a custom service * URL. * * @param servlet * @param deploymentConfiguration * @param serviceUrl custom service URL to use (relative to context path, starting * with a slash) or null for default * @throws ServiceException */ public Vaadin4SpringServletService(VaadinServlet servlet, DeploymentConfiguration deploymentConfiguration, String serviceUrl) throws ServiceException { super(servlet, deploymentConfiguration, serviceUrl); logger.info("Using custom Vaadin4Spring servlet service"); applicationContext = WebApplicationContextUtils.getWebApplicationContext(servlet.getServletContext()); }