Package com.vaadin.browserless.quarkus
Class QuarkusBrowserlessApplicationContext
java.lang.Object
com.vaadin.browserless.quarkus.QuarkusBrowserlessApplicationContext
Factory for creating a Quarkus-integrated
BrowserlessApplicationContext.
Wires a Quarkus-aware servlet and the QuarkusTestLookupInitializer.
Three entry points are provided:
create(Routes)— returns the unsecuredBrowserlessApplicationContext.createSecured(Routes)— returns the credential-typedSecuredBrowserlessApplicationContext; requires Quarkus Security on the classpath.builder(Routes)— returns a pre-wiredBrowserlessApplicationContext.Builderfor full customization (e.g. plugging in a different security handler).
var app = QuarkusBrowserlessApplicationContext.createSecured(routes); var admin = app.newUser(securityIdentity); var window = admin.newWindow(); window.navigate(ProtectedView.class);
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.vaadin.browserless.BrowserlessApplicationContext.Builderbuilder(com.vaadin.browserless.internal.Routes routes) Creates a Quarkus-pre-wired builder.static com.vaadin.browserless.BrowserlessApplicationContext.Builderbuilder(com.vaadin.browserless.internal.Routes routes, com.vaadin.browserless.internal.UIFactory uiFactory) Creates a Quarkus-pre-wired builder with a custom UI factory.static com.vaadin.browserless.BrowserlessApplicationContextcreate(com.vaadin.browserless.internal.Routes routes) Creates an unsecured Quarkus-integrated application context.static com.vaadin.browserless.BrowserlessApplicationContextcreate(com.vaadin.browserless.internal.Routes routes, com.vaadin.browserless.internal.UIFactory uiFactory) Creates an unsecured Quarkus-integrated application context with a custom UI factory.static com.vaadin.browserless.SecuredBrowserlessApplicationContext<io.quarkus.security.identity.SecurityIdentity> createSecured(com.vaadin.browserless.internal.Routes routes) Creates a Quarkus-integrated application context with Quarkus Security wiring.static com.vaadin.browserless.SecuredBrowserlessApplicationContext<io.quarkus.security.identity.SecurityIdentity> createSecured(com.vaadin.browserless.internal.Routes routes, com.vaadin.browserless.internal.UIFactory uiFactory) Creates a secured Quarkus-integrated application context with a custom UI factory.
-
Method Details
-
builder
public static com.vaadin.browserless.BrowserlessApplicationContext.Builder builder(com.vaadin.browserless.internal.Routes routes) Creates a Quarkus-pre-wired builder. The builder has the Quarkus servlet and the lookup initializer configured; callers can chain additional customizations before callingBrowserlessApplicationContext.Builder.build().- Parameters:
routes- the discovered routes- Returns:
- a pre-wired builder
-
builder
public static com.vaadin.browserless.BrowserlessApplicationContext.Builder builder(com.vaadin.browserless.internal.Routes routes, com.vaadin.browserless.internal.UIFactory uiFactory) Creates a Quarkus-pre-wired builder with a custom UI factory.- Parameters:
routes- the discovered routesuiFactory- the UI factory- Returns:
- a pre-wired builder
-
create
public static com.vaadin.browserless.BrowserlessApplicationContext create(com.vaadin.browserless.internal.Routes routes) Creates an unsecured Quarkus-integrated application context.- Parameters:
routes- the discovered routes- Returns:
- a new unsecured application context configured for Quarkus
-
create
public static com.vaadin.browserless.BrowserlessApplicationContext create(com.vaadin.browserless.internal.Routes routes, com.vaadin.browserless.internal.UIFactory uiFactory) Creates an unsecured Quarkus-integrated application context with a custom UI factory.- Parameters:
routes- the discovered routesuiFactory- the UI factory- Returns:
- a new unsecured application context configured for Quarkus
-
createSecured
public static com.vaadin.browserless.SecuredBrowserlessApplicationContext<io.quarkus.security.identity.SecurityIdentity> createSecured(com.vaadin.browserless.internal.Routes routes) Creates a Quarkus-integrated application context with Quarkus Security wiring. Requires Quarkus Security on the classpath; throws otherwise.- Parameters:
routes- the discovered routes- Returns:
- a new secured application context configured for Quarkus Security
- Throws:
IllegalStateException- if Quarkus Security is not on the classpath
-
createSecured
public static com.vaadin.browserless.SecuredBrowserlessApplicationContext<io.quarkus.security.identity.SecurityIdentity> createSecured(com.vaadin.browserless.internal.Routes routes, com.vaadin.browserless.internal.UIFactory uiFactory) Creates a secured Quarkus-integrated application context with a custom UI factory. Requires Quarkus Security on the classpath; throws otherwise.- Parameters:
routes- the discovered routesuiFactory- the UI factory- Returns:
- a new secured application context configured for Quarkus Security
- Throws:
IllegalStateException- if Quarkus Security is not on the classpath
-