public static class CompositeSources.Builder extends Object
CompositeSources
.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_LATENCY_MS
the default latency (5000ms = five seconds).
|
Constructor and Description |
---|
Builder(Collection<Sources> sourcesCollection)
constructor from a collection of sources.
|
Modifier and Type | Method and Description |
---|---|
CompositeSources |
build()
builds a new instance of
CompositeSources . |
CompilerFactory |
getCompilerFactory()
gets the compiler factory.
|
long |
getLatencyMs()
gets the latency in milliseconds.
|
String |
getName()
gets the sources name.
|
Collection<Sources> |
getSourcesCollection()
gets the collection of sources.
|
CompositeSources.Builder |
setCompilerFactory(CompilerFactory compilerFactory)
sets the compiler factory for compiling sources, default
is a new instance of
DefaultGroovyCompilerFactory . |
CompositeSources.Builder |
setLatencyMs(long latencyMs)
sets the latency in milliseconds for checking if script files
in the directory have changed, default is
DEFAULT_LATENCY_MS . |
CompositeSources.Builder |
setName(String name)
sets the sources name, default is a generated random ID.
|
public static final long DEFAULT_LATENCY_MS
public Builder(Collection<Sources> sourcesCollection)
sourcesCollection
- collection of sourcesNullPointerException
- if the sources collection is nullpublic CompositeSources.Builder setName(String name)
name
- sources nameIllegalStateException
- if the builder had already been used to build an instancepublic CompositeSources.Builder setCompilerFactory(CompilerFactory compilerFactory)
DefaultGroovyCompilerFactory
.compilerFactory
- compiler factoryIllegalStateException
- if the builder had already been used to build an instancepublic CompositeSources.Builder setLatencyMs(long latencyMs)
DEFAULT_LATENCY_MS
.latencyMs
- latency in millisecondsIllegalStateException
- if the builder had already been used to build an instancepublic Collection<Sources> getSourcesCollection()
public String getName()
public CompilerFactory getCompilerFactory()
public long getLatencyMs()
public CompositeSources build()
CompositeSources
.