org.apache.hivemind.impl
Class ConfigurationPointImpl

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.hivemind.impl.AbstractExtensionPoint
          extended by org.apache.hivemind.impl.ConfigurationPointImpl
All Implemented Interfaces:
ConfigurationPoint, ExtensionPoint, Locatable, LocationHolder

public final class ConfigurationPointImpl
extends AbstractExtensionPoint
implements ConfigurationPoint

Implementation of the ConfigurationPoint interface; a container for Contributions.

Author:
Howard Lewis Ship

Constructor Summary
ConfigurationPointImpl(Module module, ConfigurationPointDefinition definition)
           
 
Method Summary
 java.lang.Object constructConfiguration()
          Called by the proxy responsible for lazy construction of the configuration when the first time a method of the container proxy is called.
protected  void extendDescription(ToStringBuilder builder)
          Implemented in subclasses to provide details about subclass properties.
 java.lang.Object getConfiguration()
          Returns the container that holds the configuration data.
 ConfigurationPointDefinition getConfigurationPointDefinition()
           
 java.lang.Class getConfigurationType()
           
 java.lang.String getConfigurationTypeName()
           
 int getContributionCount()
          Returns the number of contributions; it is expected that each top-level org.apache.hivemind.Element in each Contribution will convert to one element instance; the value returned is the total number of top-level elements in all contributed Extensions.
 java.util.Collection getContributions()
           
 Occurances getExpectedCount()
           
 boolean isLazy()
           
 void setShutdownCoordinator(ShutdownCoordinator coordinator)
           
 
Methods inherited from class org.apache.hivemind.impl.AbstractExtensionPoint
getDefinition, getErrorLog, getExtensionPointId, getLocation, getLog, getModule, getVisibility, toString, visibleToModule
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.hivemind.internal.ExtensionPoint
getErrorLog, getExtensionPointId, getLog, getModule, visibleToModule
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

ConfigurationPointImpl

public ConfigurationPointImpl(Module module,
                              ConfigurationPointDefinition definition)
Method Detail

getConfigurationPointDefinition

public ConfigurationPointDefinition getConfigurationPointDefinition()
Specified by:
getConfigurationPointDefinition in interface ConfigurationPoint

extendDescription

protected void extendDescription(ToStringBuilder builder)
Description copied from class: AbstractExtensionPoint
Implemented in subclasses to provide details about subclass properties.

Specified by:
extendDescription in class AbstractExtensionPoint

getContributions

public java.util.Collection getContributions()

getContributionCount

public int getContributionCount()
Returns the number of contributions; it is expected that each top-level org.apache.hivemind.Element in each Contribution will convert to one element instance; the value returned is the total number of top-level elements in all contributed Extensions.


getExpectedCount

public Occurances getExpectedCount()

isLazy

public boolean isLazy()
Returns:
true if configuration should be created lazy, that means a proxy must be created.

getConfiguration

public java.lang.Object getConfiguration()
Description copied from interface: ConfigurationPoint
Returns the container that holds the configuration data. May return a proxy to the actual data (which is constructed only as needed), but user code shouldn't care about that.

Specified by:
getConfiguration in interface ConfigurationPoint
See Also:
ConfigurationPoint.getConfiguration()

constructConfiguration

public java.lang.Object constructConfiguration()
Called by the proxy responsible for lazy construction of the configuration when the first time a method of the container proxy is called. Generates the real configuration object and stores it in a field. Must be public so the proxy can access it.


setShutdownCoordinator

public void setShutdownCoordinator(ShutdownCoordinator coordinator)

getConfigurationTypeName

public java.lang.String getConfigurationTypeName()

getConfigurationType

public java.lang.Class getConfigurationType()
Specified by:
getConfigurationType in interface ConfigurationPoint
Returns:
the type of the container that holds the configuration data
See Also:
ConfigurationPoint.getConfigurationType()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.