Package com.tick42.glue.core
Interface GlueApplication.Builder<B extends GlueApplication.Builder<B,A>,A extends GlueApplication>
- Type Parameters:
B- type of this builderA- type of the application
- All Known Subinterfaces:
Glue.Builder
- All Known Implementing Classes:
Tick42Glue.Builder
- Enclosing interface:
- GlueApplication
public static interface GlueApplication.Builder<B extends GlueApplication.Builder<B,A>,A extends GlueApplication>
Helper to build a
GlueApplication instance.-
Method Summary
Modifier and TypeMethodDescriptiondefault Abuild()Convenience method to callbuildAsync()and block on the result.CompletionStage<? extends A>Creates the Glue application with the options specified by this builder.withApplicationName(String applicationName) Set the desired application name.<C,D> Glue.Builder withClickStreamMetrics(BiFunction<C, D, String> componentTextExtractor) Enables click-stream metrics and optionally passes a function to get text value from the clicked component.withConfigLoader(Supplier<GlueConfig> configLoader) Set the configuration loader to use.withShutdownRequestListener(Consumer<Glue> shutDownRequestListener) Deprecated.
-
Method Details
-
withConfigLoader
Set the configuration loader to use.- Parameters:
configLoader- configuration loader to use, notnull- Returns:
- this builder, never
null
-
withApplicationName
Set the desired application name.- Parameters:
applicationName- name to use, notnull- Returns:
- this builder, never
null - Since:
- 1.3
-
withShutdownRequestListener
Deprecated.Set shutdown listener.- Parameters:
shutDownRequestListener- the listener to use, notnull- Returns:
- this builder, never
null - Since:
- 1.3.8
-
withClickStreamMetrics
Enables click-stream metrics and optionally passes a function to get text value from the clicked component.- Type Parameters:
C- type of the componentD- type of additional parameter, required to extract the text from the component- Parameters:
componentTextExtractor- the extractor function to use, may benull- Returns:
- this builder, never
null - Since:
- 1.5.2
-
buildAsync
CompletionStage<? extends A> buildAsync()Creates the Glue application with the options specified by this builder.- Returns:
- a stage that completes when the Glue application is fully initialized, never
null
-
build
Convenience method to callbuildAsync()and block on the result.- Returns:
- Glue application instance, never
null - Throws:
GlueException- if cannot build the instance
-
Glue.Builder.withShutdownRequestListener(Consumer)