public class ForEvents<T> extends EventSourceBase<T> implements Structural, ConfigurationOwner
Modifier and Type | Class and Description |
---|---|
class |
ForEvents.LocalBean
This provides a bean for current properties.
|
Modifier and Type | Field and Description |
---|---|
protected ChildHelper<java.lang.Object> |
childHelper
Track changes to children an notify listeners.
|
static ArooaElement |
FOREACH_ELEMENT
Root element for configuration.
|
Constructor and Description |
---|
ForEvents()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addOwnerStateListener(OwnerStateListener listener)
Add a listener.
|
void |
addStructuralListener(StructuralListener listener)
Add a listener.
|
Restore |
doStart(java.util.function.Consumer<? super EventOf<T>> consumer) |
ArooaConfiguration |
getConfiguration() |
EventOperator<T> |
getEventOperator() |
java.io.File |
getFile() |
int |
getIndex() |
CompositeEvent<T> |
getLast() |
int |
getPurgeAfter() |
protected java.lang.Object |
loadConfigFor(java.lang.Object value)
Load a configuration for a single value.
|
protected void |
onDestroy()
Subclasses override this method to clear up resources.
|
protected void |
onReset()
Allow sub classes to do something on reset.
|
protected void |
preLoad()
Setup and load the first jobs.
|
ConfigurationSession |
provideConfigurationSession()
Provide a
ConfigurationSession . |
void |
removeOwnerStateListener(OwnerStateListener listener)
Remove a listener.
|
void |
removeStructuralListener(StructuralListener listener)
Remove a listener.
|
SerializableDesignFactory |
rootDesignFactory()
Get the design factory for the configuration.
|
ArooaElement |
rootElement()
Get the root element.
|
void |
setConfiguration(ArooaConfiguration configuration) |
void |
setEventOperator(EventOperator<T> eventOperator) |
void |
setFile(java.io.File file) |
void |
setPurgeAfter(int purgeAfter) |
void |
setValues(java.util.stream.Stream<?> values)
Add a type.
|
fireDestroyedState, getStateChanger, hardReset, iconHelper, onHardReset, onSoftReset, setStateException, softReset, start, stateHandler
configure, getName, logger, logger, loggerName, save, setName, toString
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSession
public static final ArooaElement FOREACH_ELEMENT
protected transient volatile ChildHelper<java.lang.Object> childHelper
public void setValues(java.util.stream.Stream<?> values)
values
- The type.public void addStructuralListener(StructuralListener listener)
addStructuralListener
in interface Structural
listener
- The listener.public void removeStructuralListener(StructuralListener listener)
removeStructuralListener
in interface Structural
listener
- The listener.public ConfigurationSession provideConfigurationSession()
ConfigurationOwner
ConfigurationSession
.provideConfigurationSession
in interface ConfigurationOwner
ConfigurationSession
. May be null if no session is available.public void addOwnerStateListener(OwnerStateListener listener)
ConfigurationOwner
addOwnerStateListener
in interface ConfigurationOwner
public void removeOwnerStateListener(OwnerStateListener listener)
ConfigurationOwner
removeOwnerStateListener
in interface ConfigurationOwner
public SerializableDesignFactory rootDesignFactory()
ConfigurationOwner
Note that this is a SerializableDesignFactory
so that
this interface can be represented remotely.
rootDesignFactory
in interface ConfigurationOwner
ConfigurationSession
is available.public ArooaElement rootElement()
ConfigurationOwner
rootElement
in interface ConfigurationOwner
ConfigurationSession
is available.protected java.lang.Object loadConfigFor(java.lang.Object value) throws ArooaParseException
value
- ArooaParseException
protected void preLoad() throws ArooaParseException
if preLoad()
is 0 all will be loaded otherwise up to
that number will be loaded.
ArooaParseException
public Restore doStart(java.util.function.Consumer<? super EventOf<T>> consumer) throws java.lang.Exception
doStart
in class EventSourceBase<T>
java.lang.Exception
public int getIndex()
public EventOperator<T> getEventOperator()
public void setEventOperator(EventOperator<T> eventOperator)
public CompositeEvent<T> getLast()
protected void onReset()
EventSourceBase
onReset
in class EventSourceBase<T>
protected void onDestroy()
BaseComponent
onDestroy
in class BaseComponent
public void setFile(java.io.File file)
Property: file
Description: The name of the configuration file. to use for configuration.
Required: No.
public java.io.File getFile()
public ArooaConfiguration getConfiguration()
public void setConfiguration(ArooaConfiguration configuration)
public int getPurgeAfter()
public void setPurgeAfter(int purgeAfter)