微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

com.vaadin.server.SessionInitEvent的实例源码

项目:Krishnasspace    文件CustomVaadinServlet.java   
@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);

        }
    });
}
项目:vaadin4spring    文件SpringAwareVaadinPortlet.java   
@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);
            }
        }
    });
}
项目:panifex-platform    文件ModularsessionInitListenerTest.java   
@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();
    }
}
项目:scoutmaster    文件VaadinServlet.java   
@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());
        }
    });
}
项目:java-pwa    文件MyUI.java   
@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;
                    }
                }
            });
        }
    });
}
项目:webcam    文件GifBoothServlet.java   
@Override
protected void servletinitialized() throws servletexception {
    super.servletinitialized();
    getService().addSessionInitListener(new SessionInitListener() {

        @Override
        public void sessionInit(SessionInitEvent event)
                throws ServiceException {
            event.getSession().addBootstrapListener(bootstrapListener);
        }
    });
}
项目:vaadin-osgi    文件BaseVaadinServlet.java   
@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;
}
项目:CloTouch    文件MyServlet.java   
@Override
protected void servletinitialized() throws servletexception {
    super.servletinitialized();
    getService().addSessionInitListener(new SessionInitListener() {
        @Override
        public void sessionInit(SessionInitEvent event) throws ServiceException {
            event.getSession().addUIProvider(uiProvider);
        }
    });
}
项目:jesterj    文件IngestServlet.java   
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {
  event.getSession().addUIProvider(provider);
}
项目:panifex-platform    文件ModularsessionInitListener.java   
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {
    event.getSession().addUIProvider(uiProvider);
}
项目:mideaas    文件MideaasServlet.java   
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {
    // Todo Auto-generated method stub
    //System.out.println("Session created");
}
项目:touchkit    文件TouchKitSettings.java   
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {
    event.getSession().addBootstrapListener(this);
}
项目:holon-vaadin    文件TestVaadinSessionInitListener.java   
@Override
public void sessionInit(SessionInitEvent event) throws ServiceException {

}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。