All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface uhr.core.dk.ParamDriven

public interface ParamDriven
This interface indicates a part is parameter driven and needs its DK provided automatically. After that, the part can get happily to work. Also after that, tools can get the part's DK, edit it, and reset it and the part will instantly reconfigure itself for the new mission expressed in its DK.

The term "Parameter Driven" expresses the relationship between reusable parts and Declarative Knowledge. The relationship is "DK varies the behavior of reusable parts". Thus this interface is fundamental to all of UHR. P. The ParamDriven part has a aide-de-camp that handles all the work related to providing the part's DK. The part provided this aide on demand. If custom aide behavior is required a custom ParamDrivenAide implementation may be used. Otherwise the UHR framework standard aide, ParamDrivenAideStd, should be used.

Since most parts are ParamDriven, a noticable delay would occur when a container is started due to providing DK to all the container's parts. Therefore all DK is provided on a deferred basis unless the ParamDriven class, in its constructor, sets the aide's immediate property to true, which should rarely be done.

There are two ways to get deferred (immediate = false) DK. One is to always call paramAide.getDK() when the part needs the DK reference, instead of using a reference in the part. The other way is to call paramAide.provideDK() at an opportune time, such as in a part init or when a service is first called.

The role of the core is to transport DK and make providing it automatically to parts easy. Accordingly, the actual type of DK is Object. What type DK is is a domain issue, though such a fundamental one that standards will emerge immdiately. The default DK mechanisms use a Flexitron to carry DK.


Method Index

 o getParamDrivenAide()
Returns the aide-de-camp for the ParamDriven.
 o setDK(Object)
Sets the DK describing the part's mission.

Methods

 o getParamDrivenAide
 public abstract ParamDrivenAide getParamDrivenAide()
Returns the aide-de-camp for the ParamDriven. Any aide configuration must be done before this is called, so such configuration must be done in the part's constructor.

Returns:
the ParamDriven aide.
 o setDK
 public abstract void setDK(Object dk)
Sets the DK describing the part's mission. The DK is used to initialize the part for this particular reuse case.

Do not call this method directly. Use the aide instead.

If the part's present DK is null this method is being called the first time. If not null then the part should reconfigure itself in the least disruptive manner possible.

Often a part merely uses its DK for reference everytime it needs to refer to its policies. In this case the method implementation can be as simple as this.dk = dk;.

Parameters:
dk - the data structure containing the DK.
Throws: IllegalStateException
if cannot apply the new DK and the old dk was not null.

All Packages  Class Hierarchy  This Package  Previous  Next  Index