Package com.vaadin.browserless
Class SecuredBrowserlessApplicationContext.Builder<C>
java.lang.Object
com.vaadin.browserless.SecuredBrowserlessApplicationContext.Builder<C>
- Type Parameters:
C- the credentials type
- Enclosing class:
SecuredBrowserlessApplicationContext<C>
Builder for
SecuredBrowserlessApplicationContext. Obtained from
BrowserlessApplicationContext.Builder.withSecurityContextHandler(SecurityContextHandler);
delegates to the underlying base builder for shared configuration.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the secured application context.withCloseHook(Runnable hook) withComponentTesterPackages(Class<?>... classes) withComponentTesterPackages(String... packages) withLookupServices(Class<?>... services) withSecurityContextHandler(SecurityContextHandler<D> handler) Replaces the security context handler, possibly switching its credentials type.withServletFactory(BiFunction<com.vaadin.browserless.internal.Routes, com.vaadin.browserless.internal.UIFactory, VaadinServlet> factory) withUIFactory(com.vaadin.browserless.internal.UIFactory uiFactory) withViewPackages(Class<?>... classes) withViewPackages(String... packages)
-
Method Details
-
withSecurityContextHandler
public <D> SecuredBrowserlessApplicationContext.Builder<D> withSecurityContextHandler(SecurityContextHandler<D> handler) Replaces the security context handler, possibly switching its credentials type.- Type Parameters:
D- the new credentials type- Parameters:
handler- the handler; must not benull- Returns:
- a builder configured with the given handler
- Throws:
NullPointerException- ifhandlerisnull
-
withServletFactory
public SecuredBrowserlessApplicationContext.Builder<C> withServletFactory(BiFunction<com.vaadin.browserless.internal.Routes, com.vaadin.browserless.internal.UIFactory, VaadinServlet> factory) - See Also:
-
withUIFactory
public SecuredBrowserlessApplicationContext.Builder<C> withUIFactory(com.vaadin.browserless.internal.UIFactory uiFactory) - See Also:
-
withLookupServices
- See Also:
-
withViewPackages
- See Also:
-
withViewPackages
- See Also:
-
withComponentTesterPackages
public SecuredBrowserlessApplicationContext.Builder<C> withComponentTesterPackages(String... packages) - See Also:
-
withComponentTesterPackages
public SecuredBrowserlessApplicationContext.Builder<C> withComponentTesterPackages(Class<?>... classes) - See Also:
-
withCloseHook
- See Also:
-
build
Builds the secured application context.- Returns:
- a new secured application context
-