当前位置: 首页>>代码示例>>Java>>正文


Java SessionInitEvent类代码示例

本文整理汇总了Java中com.vaadin.server.SessionInitEvent的典型用法代码示例。如果您正苦于以下问题:Java SessionInitEvent类的具体用法?Java SessionInitEvent怎么用?Java SessionInitEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SessionInitEvent类属于com.vaadin.server包,在下文中一共展示了SessionInitEvent类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: servletInitialized

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
protected void servletInitialized() throws ServletException {
	super.servletInitialized();
	getService().addSessionInitListener(new SessionInitListener() {

		/**
		 * 
		 */
		private static final long serialVersionUID = -8279023207169735541L;

		@Override
		public void sessionInit(SessionInitEvent event)
				throws ServiceException {
			event.getSession().addUIProvider(uiProvider);

		}
	});
}
 
开发者ID:KrishnaPhani,项目名称:KrishnasSpace,代码行数:19,代码来源:CustomVaadinServlet.java

示例2: portletInitialized

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
protected void portletInitialized() throws PortletException {
    getService().addSessionInitListener(new SessionInitListener() {
        private static final long serialVersionUID = -4571879262155039969L;

        @Override
        public void sessionInit(SessionInitEvent event) throws ServiceException {
            try {
                ApplicationContext context = PortletApplicationContextUtils
                        .getRequiredWebApplicationContext(getPortletContext());
                SpringAwareUIProvider uiProvider = new SpringAwareUIProvider(context);
                event.getSession().addUIProvider(uiProvider);
            } catch (IllegalStateException e) {
                throw new ServiceException(e);
            }
        }
    });
}
 
开发者ID:peholmst,项目名称:vaadin4spring,代码行数:19,代码来源:SpringAwareVaadinPortlet.java

示例3: testOnSessionInit

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Test
public void testOnSessionInit() throws Exception {
    SessionInitEvent event = createMock(SessionInitEvent.class);

    // expect adding ui provider
    VaadinSession sessionMock = createMock(VaadinSession.class);
    expect(event.getSession()).andReturn(sessionMock);
    sessionMock.addUIProvider(uiProviderMock);

    replayAll();
    try {
        listener.sessionInit(event);
    } finally {
        verifyAll();
    }
}
 
开发者ID:panifex,项目名称:panifex-platform,代码行数:17,代码来源:ModularSessionInitListenerTest.java

示例4: servletInitialized

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
protected void servletInitialized() throws ServletException
{
	super.servletInitialized();
	getService().addSessionInitListener(new SessionInitListener()
	{
		/**
		 *
		 */
		private static final long serialVersionUID = 1L;

		@Override
		public void sessionInit(SessionInitEvent event)
		{
			// event.getSession().addBootstrapListener(new
			// BootstrapListener());
		}
	});
}
 
开发者ID:bsutton,项目名称:scoutmaster,代码行数:20,代码来源:VaadinServlet.java

示例5: servletInitialized

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
protected void servletInitialized() throws ServletException {
	super.servletInitialized();

          HeaderTagHandler.init(getService());
	
	getService().addSessionInitListener(new SessionInitListener() {

		@Override
		public void sessionInit(SessionInitEvent event) throws ServiceException {
			event.getSession().addRequestHandler(new RequestHandler() {

				@Override
				public boolean handleRequest(VaadinSession session, VaadinRequest request,
						VaadinResponse response) throws IOException {

					String pathInfo = request.getPathInfo();
					InputStream in = null;

					if (pathInfo.endsWith("sw.js")) {
						response.setContentType("application/javascript");
						in = getClass().getResourceAsStream("/sw.js");
					}

					if (in != null) {
						OutputStream out = response.getOutputStream();
						IOUtils.copy(in, out);
						in.close();
						out.close();

						return true;
					} else {

						return false;
					}
				}
			});
		}
	});
}
 
开发者ID:amahdy,项目名称:java-pwa,代码行数:41,代码来源:MyUI.java

示例6: servletInitialized

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
protected void servletInitialized() throws ServletException {
    super.servletInitialized();
    getService().addSessionInitListener(new SessionInitListener() {

        @Override
        public void sessionInit(SessionInitEvent event)
                throws ServiceException {
            event.getSession().addBootstrapListener(bootstrapListener);
        }
    });
}
 
开发者ID:tehapo,项目名称:webcam,代码行数:13,代码来源:GifBoothServlet.java

示例7: createServletService

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@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;
}
 
开发者ID:peergreen,项目名称:vaadin-osgi,代码行数:12,代码来源:BaseVaadinServlet.java

示例8: servletInitialized

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
protected void servletInitialized() throws ServletException {
    super.servletInitialized();
    getService().addSessionInitListener(new SessionInitListener() {
        @Override
        public void sessionInit(SessionInitEvent event) throws ServiceException {
            event.getSession().addUIProvider(uiProvider);
        }
    });
}
 
开发者ID:mjvesa,项目名称:CloTouch,代码行数:11,代码来源:MyServlet.java

示例9: sessionInit

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {
  event.getSession().addUIProvider(provider);
}
 
开发者ID:nsoft,项目名称:jesterj,代码行数:5,代码来源:IngestServlet.java

示例10: sessionInit

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {
    event.getSession().addUIProvider(uiProvider);
}
 
开发者ID:panifex,项目名称:panifex-platform,代码行数:5,代码来源:ModularSessionInitListener.java

示例11: sessionInit

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {
	// TODO Auto-generated method stub
	//System.out.println("Session created");
}
 
开发者ID:ahn,项目名称:mideaas,代码行数:6,代码来源:MideaasServlet.java

示例12: sessionInit

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {
    event.getSession().addBootstrapListener(this);
}
 
开发者ID:vaadin,项目名称:touchkit,代码行数:5,代码来源:TouchKitSettings.java

示例13: sessionInit

import com.vaadin.server.SessionInitEvent; //导入依赖的package包/类
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {

}
 
开发者ID:holon-platform,项目名称:holon-vaadin,代码行数:5,代码来源:TestVaadinSessionInitListener.java


注:本文中的com.vaadin.server.SessionInitEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。