Class FaviconProvider.Builder
java.lang.Object
org.apache.juneau.rest.server.convention.FaviconProvider.Builder
- Enclosing class:
- FaviconProvider
Builder for
FaviconProvider instances.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()Constructor — package access forFaviconProvider.create(). -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aFaviconProviderinstance.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.
-
Constructor Details
-
Builder
protected Builder()Constructor — package access forFaviconProvider.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.Resolved via
FaviconProvider.class.getResourceAsStream(...)atbuild()time. 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 aFaviconProviderinstance.- Returns:
- A configured instance.
-