Class DefaultApplicationConfigurationFactory

    • Constructor Detail

      • DefaultApplicationConfigurationFactory

        public DefaultApplicationConfigurationFactory()
    • Method Detail

      • getTokenFileFromClassloader

        protected String getTokenFileFromClassloader​(VaadinContext context)
                                              throws IOException
        Gets token file from the classpath using the provided context.

        The contextClass may be a class which is defined in the Web Application module/bundle and in this case it may be used to get Web Application resources. Also a VaadinContext context instance may be used to get a context of the Web Application (since the contextClass may be a class not from Web Application module). In WAR case it doesn't matter which class is used to get the resources (Web Application classes or e.g. "flow-server" classes) since they are loaded by the same ClassLoader. But in OSGi "flow-server" module classes can't be used to get Web Application resources since they are in different bundles.

        Parameters:
        context - a VaadinContext which may provide information how to get token file for the web application
        Returns:
        the token file content
        Throws:
        IOException - if I/O fails during access to the token file