|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbiz.hammurapi.util.VisitableBase
biz.hammurapi.config.GenericContainer
public class GenericContainer
| Constructor Summary | |
|---|---|
GenericContainer()
|
|
| Method Summary | |
|---|---|
protected void |
acceptChildren(Visitor visitor)
Override this method to navigate visitor through object constituents. |
void |
addComponent(java.lang.String name,
java.lang.Object component)
Adds component and starts it. |
void |
addMeasurement(java.lang.String name,
double value,
long time)
Adds measurement |
void |
execute(java.lang.Object executionContext)
Invokes execute() of executable components sequentially. |
java.lang.Object |
get(java.lang.String name)
Looks up component in component tree. |
java.lang.Object |
getAttribute(java.lang.Object key)
|
protected java.util.Map |
getComponentMap()
|
java.util.Set |
getComponentNames()
|
protected java.util.Collection |
getComponents()
|
MeasurementConsumer |
getMeasurementConsumer()
|
java.lang.Object |
getOwner(java.lang.Class ownerType)
Finds component owner of particular type. |
java.lang.Object |
removeAttribute(java.lang.Object key)
|
void |
setAttribute(java.lang.Object key,
java.lang.Object value)
|
void |
setMeasurementConsumer(MeasurementConsumer measurementConsumer)
Sets measurement consumer to pass measurements to. |
void |
setOwner(java.lang.Object owner)
Plugs the component into container and naming bus. |
void |
start()
Invoked by container before the first use. |
void |
stop()
Invoked by container when component is not needed anymore. |
| Methods inherited from class biz.hammurapi.util.VisitableBase |
|---|
accept, convert2searchable, find, findAll, object2visitor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericContainer()
| Method Detail |
|---|
protected java.util.Map getComponentMap()
public java.lang.Object get(java.lang.String name)
get in interface Contextname -
public void addComponent(java.lang.String name,
java.lang.Object component)
throws ConfigurationException
name - component -
ConfigurationException
public void start()
throws ConfigurationException
Component
start in interface ComponentConfigurationException
public void stop()
throws ConfigurationException
Component
stop in interface ComponentConfigurationExceptionpublic void setOwner(java.lang.Object owner)
Component
setOwner in interface Componentpublic void execute(java.lang.Object executionContext)
execute in interface Commandprotected void acceptChildren(Visitor visitor)
VisitableBase
acceptChildren in class VisitableBaseprotected java.util.Collection getComponents()
public java.util.Set getComponentNames()
public void setAttribute(java.lang.Object key,
java.lang.Object value)
setAttribute in interface Attributablepublic java.lang.Object getAttribute(java.lang.Object key)
getAttribute in interface Attributablepublic java.lang.Object removeAttribute(java.lang.Object key)
removeAttribute in interface Attributablepublic void setMeasurementConsumer(MeasurementConsumer measurementConsumer)
MeasurementCollector
setMeasurementConsumer in interface MeasurementCollectorpublic MeasurementConsumer getMeasurementConsumer()
public void addMeasurement(java.lang.String name,
double value,
long time)
MeasurementConsumer
addMeasurement in interface MeasurementConsumername - Metric namevalue - Measurement valuetime - Time when metric was collected. If this
parameter is 0 then metric subsystem uses
System.currentTimeMillis() to provide correct value if
needed.public java.lang.Object getOwner(java.lang.Class ownerType)
ownerType -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||