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.withApplicationProperties(Map<String, String> properties) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withApplicationProperty(String name, String value) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withCloseHook(Runnable hook) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withComponentTesterPackages(Class<?>... classes) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withComponentTesterPackages(String... packages) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withConfiguration(BrowserlessConfiguration configuration) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withFeatureFlag(com.vaadin.experimental.Feature feature, boolean enabled) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withFeatureFlag(String featureId, boolean enabled) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withFeatureFlags(com.vaadin.experimental.Feature... features) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withFeatureFlags(String... featureIds) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withLookupServices(Class<?>... services) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withSecurityContextHandler(SecurityContextHandler<D> handler) Replaces the security context handler, possibly switching its credentials type.withServletFactory(BiFunction<Routes, UIFactory, com.vaadin.flow.server.VaadinServlet> factory) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withSessionLockIsolation(boolean sessionLockIsolation) Deprecated.withUIFactory(UIFactory uiFactory) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withViewPackages(Class<?>... classes) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.withViewPackages(String... packages) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.
-
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<Routes, UIFactory, com.vaadin.flow.server.VaadinServlet> factory) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
factory- creates the servlet the context runs on- Returns:
- this builder, for chaining
- See Also:
-
withUIFactory
Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
uiFactory- creates the UI instance- Returns:
- this builder, for chaining
- See Also:
-
withLookupServices
Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
services- the lookup services to register- Returns:
- this builder, for chaining
- See Also:
-
withViewPackages
Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
packages- the packages to scan- Returns:
- this builder, for chaining
- See Also:
-
withViewPackages
Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
classes- the classes to register- Returns:
- this builder, for chaining
- See Also:
-
withComponentTesterPackages
public SecuredBrowserlessApplicationContext.Builder<C> withComponentTesterPackages(String... packages) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
packages- the packages to scan- Returns:
- this builder, for chaining
- See Also:
-
withComponentTesterPackages
public SecuredBrowserlessApplicationContext.Builder<C> withComponentTesterPackages(Class<?>... classes) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
classes- the classes to register- Returns:
- this builder, for chaining
- See Also:
-
withCloseHook
Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
hook- the lifecycle hook to install- Returns:
- this builder, for chaining
- See Also:
-
withSessionLockIsolation
@Deprecated(since="25.4") public SecuredBrowserlessApplicationContext.Builder<C> withSessionLockIsolation(boolean sessionLockIsolation) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
sessionLockIsolation- whether each user gets a session lock of its own- Returns:
- this builder, for chaining
- See Also:
-
withApplicationProperty
public SecuredBrowserlessApplicationContext.Builder<C> withApplicationProperty(String name, String value) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
name- the attribute namevalue- the value to set- Returns:
- this builder, for chaining
- Since:
- 25.3
- See Also:
-
withApplicationProperties
public SecuredBrowserlessApplicationContext.Builder<C> withApplicationProperties(Map<String, String> properties) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
properties- the initialization properties- Returns:
- this builder, for chaining
- Since:
- 25.3
- See Also:
-
withFeatureFlags
Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
featureIds- the features to enable- Returns:
- this builder, for chaining
- Since:
- 25.3
- See Also:
-
withFeatureFlags
public SecuredBrowserlessApplicationContext.Builder<C> withFeatureFlags(com.vaadin.experimental.Feature... features) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
features- the features to enable- Returns:
- this builder, for chaining
- Since:
- 25.3
- See Also:
-
withFeatureFlag
public SecuredBrowserlessApplicationContext.Builder<C> withFeatureFlag(String featureId, boolean enabled) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
featureId- the feature to enableenabled- whether the feature is on- Returns:
- this builder, for chaining
- Since:
- 25.3
- See Also:
-
withFeatureFlag
public SecuredBrowserlessApplicationContext.Builder<C> withFeatureFlag(com.vaadin.experimental.Feature feature, boolean enabled) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
feature- the feature to enableenabled- whether the feature is on- Returns:
- this builder, for chaining
- Since:
- 25.3
- See Also:
-
withConfiguration
public SecuredBrowserlessApplicationContext.Builder<C> withConfiguration(BrowserlessConfiguration configuration) Forwards to the matching method on the underlyingBrowserlessApplicationContext.Builder.- Parameters:
configuration- the deployment configuration to use- Returns:
- this builder, for chaining
- Since:
- 25.3
- See Also:
-
build
Builds the secured application context.- Returns:
- a new secured application context
-
BrowserlessApplicationContext.Builder.withSessionLockIsolation(boolean)