Package ch.grengine.sources
Class FixedSetSources.Builder
java.lang.Object
ch.grengine.sources.FixedSetSources.Builder
- Enclosing class:
- FixedSetSources
Builder for instances of
FixedSetSources.- Since:
- 1.0
- Author:
- Alain Stalder, Made in Switzerland.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longthe default latency (5000ms = five seconds). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds a new instance ofFixedSetSources.gets the compiler factory.longgets the latency in milliseconds.getName()gets the sources name.gets the fixed source set.setCompilerFactory(CompilerFactory compilerFactory) sets the compiler factory for compiling sources, default is a new instance ofDefaultGroovyCompilerFactory.setLatencyMs(long latencyMs) sets the latency in milliseconds for checking if script files in the directory have changed, default isDEFAULT_LATENCY_MS.sets the sources name, default is a generated random ID.
-
Field Details
-
DEFAULT_LATENCY_MS
public static final long DEFAULT_LATENCY_MSthe default latency (5000ms = five seconds).- Since:
- 1.0
- See Also:
-
-
Constructor Details
-
Builder
constructor from fixed source set.- Parameters:
sourceSet- fixed source set- Throws:
NullPointerException- if the source set is null- Since:
- 1.0
-
-
Method Details
-
setName
sets the sources name, default is a generated random ID.- Parameters:
name- sources name- Returns:
- this, for chaining calls
- Throws:
IllegalStateException- if the builder had already been used to build an instance- Since:
- 1.0
-
setCompilerFactory
sets the compiler factory for compiling sources, default is a new instance ofDefaultGroovyCompilerFactory.- Parameters:
compilerFactory- compiler factory- Returns:
- this, for chaining calls
- Throws:
IllegalStateException- if the builder had already been used to build an instance- Since:
- 1.0
-
setLatencyMs
sets the latency in milliseconds for checking if script files in the directory have changed, default isDEFAULT_LATENCY_MS.- Parameters:
latencyMs- latency in milliseconds- Returns:
- this, for chaining calls
- Throws:
IllegalStateException- if the builder had already been used to build an instance- Since:
- 1.0
-
getSourceSet
gets the fixed source set.- Returns:
- fixed source set
- Since:
- 1.0
-
getName
gets the sources name.- Returns:
- sources name
- Since:
- 1.0
-
getCompilerFactory
gets the compiler factory.- Returns:
- compiler factory
- Since:
- 1.0
-
getLatencyMs
public long getLatencyMs()gets the latency in milliseconds.- Returns:
- latency in milliseconds
- Since:
- 1.0
-
build
builds a new instance ofFixedSetSources.- Returns:
- new instance
- Since:
- 1.0
-