public interface ComponentPool
ArooaConfiguration.| Modifier and Type | Method and Description |
|---|---|
java.lang.Iterable<ComponentTrinity> |
allTrinities()
Provide a way of iterating over all trinities.
|
void |
configure(java.lang.Object component)
Configure the component.
|
ArooaContext |
contextFor(java.lang.Object either)
Get the components
ArooaContext. |
java.lang.String |
getIdFor(java.lang.Object either)
Provide the Id for either a component or it's proxy.
|
java.lang.String |
registerComponent(ComponentTrinity trinity,
java.lang.String id)
Register a
ComponentTrinity. |
boolean |
remove(java.lang.Object either)
Remove a component.
|
void |
save(java.lang.Object either)
Possibly save the component to a persistent store, if everything
is in place for this to happen.
|
ComponentTrinity |
trinityFor(java.lang.Object either)
Get the
ComponentTrinity for either the component or
proxy. |
ComponentTrinity |
trinityForContext(ArooaContext context)
Get the
ComponentTrinity for the given ArooaContext. |
ComponentTrinity |
trinityForId(java.lang.String id)
Provide the
ComponentTrinity for a given id, if possible. |
void configure(java.lang.Object component)
throws ArooaConfigurationException
contextFor(component).getRuntime().configure().component - The component or it's proxy.ArooaConfigurationExceptionvoid save(java.lang.Object either) throws ComponentPersistException
If a ComponentPersister is in operation and the component
was registered with an id then the ComponentPersister is
invoked with the component.
either - A component or it's proxy.ComponentPersistExceptionboolean remove(java.lang.Object either)
throws ComponentPersistException
either - A component or it's proxy.ComponentPersistExceptionArooaContext contextFor(java.lang.Object either)
ArooaContext.either - The component or the proxy.ComponentTrinity trinityForContext(ArooaContext context)
ComponentTrinity for the given ArooaContext.
This is required for ContextHierarchyServiceFinder.
context - A context;ComponentTrinity trinityFor(java.lang.Object either)
ComponentTrinity for either the component or
proxy.
either - Either the component or the proxy.java.lang.String registerComponent(ComponentTrinity trinity, java.lang.String id)
ComponentTrinity.trinity - The trinity.id - The id. May be null.java.lang.String getIdFor(java.lang.Object either)
either - Either a component or it's proxy.ComponentTrinity trinityForId(java.lang.String id)
ComponentTrinity for a given id, if possible.id - The id.java.lang.Iterable<ComponentTrinity> allTrinities()