Class FaviconMixin.Builder
- All Implemented Interfaces:
RestBuilder<FaviconMixin.Builder>
- Enclosing class:
- FaviconMixin
FaviconMixin instances.
Mirrors FaviconProvider.Builder's configuration methods on the mixin's own surface and
forwards each call to an underlying FaviconProvider.Builder, which builds the shared worker
the mixin delegates to.
Extends RestMixin.Builder so the mixin's bespoke worker-config setters
(bytes(byte[]), classpath(String), cacheControl(String)) chain with true
covariant returns alongside the inherited RestBuildersurface (e.g. path, roleGuard).
This is how a multi-flavor capability avoids triplicating its REST-level config: the worker config is
forwarded once into FaviconProvider.Builder, and the REST config is inherited once from
AbstractRestBuilder.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()Constructor — package access forFaviconMixin.create(). -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aFaviconMixininstance, delegating to the sharedFaviconProviderworker and stashing this builder so its@Rest-level overrides take precedence over the annotation.bytes(byte[] value) Sets the raw favicon bytes.cacheControl(String value) Sets theCache-Controlheader value emitted with the favicon response.Sets the classpath resource path from which to load the favicon bytes.Methods inherited from class org.apache.juneau.rest.server.AbstractRestBuilder
allowedHeaderParams, allowedMethodHeaders, allowedMethodParams, allowedParserOptions, allowedSerializerOptions, asyncCompletionExecutor, asyncTimeoutMillis, children, clientVersionHeader, config, consumes, converters, createResource, debugMarshalling, defaultAccept, defaultCharset, defaultContentType, defaultRequestAttributes, defaultRequestHeaders, defaultResponseHeaders, description, disableContentParam, eagerInit, encoders, getExtras, getMdcAsyncPropagation, getResourceType, guards, lazyChildren, maxInput, mdcAsyncPropagation, messages, mixinDefs, mixins, noInherit, observability, openApiProvider, parsers, partParser, partSerializer, path, paths, problemDetails, produces, renderResponseStackTraces, responseProcessors, restOpArgs, roleGuard, rolesDeclared, self, serializers, set, siteName, staticFiles, swaggerProvider, title, toRestAnnotation, uriAuthority, uriContext, uriRelativity, uriResolution, virtualThreads
-
Constructor Details
-
Builder
protected Builder()Constructor — package access forFaviconMixin.create().
-
-
Method Details
-
bytes
Sets the raw favicon bytes.Mutually exclusive with
classpath(String)— whichever is set last wins atbuild()time.- Parameters:
value- The favicon bytes (typically an.icoor.pngpayload). Must not benull .- Returns:
- This object.
-
classpath
Sets the classpath resource path from which to load the favicon bytes.A resolved-to-
nullstream falls back to the framework's default favicon. Mutually exclusive withbytes(byte[]).- Parameters:
value- The classpath resource path (e.g."/myapp/icon.ico"). Must not benull or blank.- Returns:
- This object.
-
cacheControl
Sets theCache-Controlheader value emitted with the favicon response.Defaults to "max-age=2592000, public" (30 days).
- Parameters:
value- The newCache-Controlvalue. Must not benull or blank.- Returns:
- This object.
-
build
Builds aFaviconMixininstance, delegating to the sharedFaviconProviderworker and stashing this builder so its@Rest-level overrides take precedence over the annotation.- Overrides:
buildin classRestMixin.Builder<FaviconMixin,FaviconMixin.Builder> - Returns:
- A configured instance.
-