public class MegaBeanBus extends StructuralJob<java.lang.Object> implements ConfigurationOwner, BusServiceProvider
BeanBus
.
A Bean Bus is an assembly of Collection
s.
<oddjob> <job> <bean class="org.oddjob.beanbus.mega.MegaBeanBus" id="bus"> <parts> <bus:iterable-driver xmlns:bus="oddjob:beanbus"> <beans> <list> <values> <value value="Apple"/> <value value="Orange"/> <value value="Pear"/> </values> </list> </beans> </bus:iterable-driver> <bus:bean-capture id="list" xmlns:bus="oddjob:beanbus"/> </parts> </bean> </job> </oddjob>
childHelper, destroy, stop, structuralState
Constructor and Description |
---|
MegaBeanBus()
Only constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addOwnerStateListener(OwnerStateListener listener)
Add a listener.
|
protected void |
execute()
Execute this job.
|
BusConductor |
getBusConductor() |
protected StateOperator |
getInitialStateOp()
Subclasses must provide the
StateOperator that will decide
how to evaluate the children's state. |
BusService |
getServices()
Provider the services.
|
boolean |
isNoAutoLink() |
protected void |
onReset()
Allow sub classes to do something on reset.
|
ConfigurationSession |
provideConfigurationSession()
Provide a
ConfigurationSession . |
void |
removeOwnerStateListener(OwnerStateListener listener)
Remove a listener.
|
SerializableDesignFactory |
rootDesignFactory()
Get the design factory for the configuration.
|
ArooaElement |
rootElement()
Get the root element.
|
void |
setArooaContext(ArooaContext context) |
void |
setBusConductor(BusConductor busConductor) |
void |
setNoAutoLink(boolean noAutoLink) |
void |
setParts(int index,
java.lang.Object child)
Add a child.
|
addStructuralListener, fireDestroyedState, force, getStateChanger, hardReset, iconHelper, isStop, onDestroy, onHardReset, onSoftReset, onStop, postStop, removeStructuralListener, run, softReset, startChildStateReflector, stateHandler, stop, stopChildStateReflector
configure, getName, logger, logger, loggerName, save, setName, toString
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaSession
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addStateListener, lastStateEvent, removeStateListener
public void setArooaContext(ArooaContext context)
setArooaContext
in interface ArooaContextAware
setArooaContext
in class BaseComponent
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 StateOperator getInitialStateOp()
StructuralJob
StateOperator
that will decide
how to evaluate the children's state.getInitialStateOp
in class StructuralJob<java.lang.Object>
public void setParts(int index, java.lang.Object child)
Property: jobs
Description: The child jobs.
Required: No, but pointless if missing.
child
- A childprotected void execute() throws java.lang.Exception
StructuralJob
execute
in class StructuralJob<java.lang.Object>
java.lang.Exception
- If the unexpected occurs.protected void onReset()
StructuralJob
onReset
in class StructuralJob<java.lang.Object>
public BusService getServices()
ServiceProvider
getServices
in interface ServiceProvider
getServices
in interface BusServiceProvider
public BusConductor getBusConductor()
public void setBusConductor(BusConductor busConductor)
public boolean isNoAutoLink()
public void setNoAutoLink(boolean noAutoLink)