Package com.tick42.glue.internal
Class Tick42Glue.Builder
- java.lang.Object
-
- com.tick42.glue.internal.Tick42Glue.Builder
-
- All Implemented Interfaces:
GlueApplication.Builder<Glue.Builder,Glue>,Glue.Builder
- Enclosing class:
- Tick42Glue
public static class Tick42Glue.Builder extends Object implements Glue.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Tick42Glue>buildAsync()Creates the Glue application with the options specified by this builder.Tick42Glue.BuilderdisableStartingContext()Ignore configuration provided via_GD_STARTING_CONTEXT_environment variable.Tick42Glue.BuilderwithApplicationName(String applicationName)Set the desired application name.Tick42Glue.BuilderwithArgs(String... args)Tick42Glue.BuilderwithConfigLoader(Supplier<GlueConfig> configLoader)Set the configuration loader to use.Tick42Glue.BuilderwithConnection(com.tick42.gateway.connection.GatewayConnection connection)Tick42Glue.BuilderwithInitialListener(GlueEvent.Listener<?>... listeners)Tick42Glue.BuilderwithShutdownRequestListener(Consumer<Glue> shutdownRequestListener)Set shutdown listener.Tick42Glue.BuilderwithStartingOptions(StartingOptions startingOptions)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tick42.glue.core.GlueApplication.Builder
build
-
-
-
-
Method Detail
-
withConnection
public Tick42Glue.Builder withConnection(com.tick42.gateway.connection.GatewayConnection connection)
-
disableStartingContext
public Tick42Glue.Builder disableStartingContext()
Description copied from interface:Glue.BuilderIgnore configuration provided via_GD_STARTING_CONTEXT_environment variable.- Specified by:
disableStartingContextin interfaceGlue.Builder
-
withStartingOptions
public Tick42Glue.Builder withStartingOptions(StartingOptions startingOptions)
-
withConfigLoader
public Tick42Glue.Builder withConfigLoader(Supplier<GlueConfig> configLoader)
Description copied from interface:GlueApplication.BuilderSet the configuration loader to use.- Specified by:
withConfigLoaderin interfaceGlueApplication.Builder<Glue.Builder,Glue>- Parameters:
configLoader- configuration loader to use, notnull- Returns:
- this builder, never
null
-
withApplicationName
public Tick42Glue.Builder withApplicationName(String applicationName)
Description copied from interface:GlueApplication.BuilderSet the desired application name.- Specified by:
withApplicationNamein interfaceGlueApplication.Builder<Glue.Builder,Glue>- Parameters:
applicationName- name to use, notnull- Returns:
- this builder, never
null
-
withShutdownRequestListener
public Tick42Glue.Builder withShutdownRequestListener(Consumer<Glue> shutdownRequestListener)
Description copied from interface:GlueApplication.BuilderSet shutdown listener.- Specified by:
withShutdownRequestListenerin interfaceGlueApplication.Builder<Glue.Builder,Glue>- Parameters:
shutdownRequestListener- the listener to use, notnull- Returns:
- this builder, never
null
-
withArgs
public Tick42Glue.Builder withArgs(String... args)
-
withInitialListener
public Tick42Glue.Builder withInitialListener(GlueEvent.Listener<?>... listeners)
-
buildAsync
public CompletionStage<Tick42Glue> buildAsync()
Description copied from interface:GlueApplication.BuilderCreates the Glue application with the options specified by this builder.- Specified by:
buildAsyncin interfaceGlueApplication.Builder<Glue.Builder,Glue>- Returns:
- a stage that completes when the Glue application is fully initialized, never
null
-
-