|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.hk2.internal.DynamicConfigurationImpl
public class DynamicConfigurationImpl
Constructor Summary | |
---|---|
DynamicConfigurationImpl(ServiceLocatorImpl locator)
Created by the generator, and hence must be public |
Method Summary | ||
---|---|---|
|
addActiveDescriptor(ActiveDescriptor<T> activeDescriptor)
This allows third party systems to add reified active descriptors to the system. |
|
|
addActiveDescriptor(Class<T> rawClass)
This adds an active descriptor to the system based completely on the analysis of the given class. |
|
void |
addUnbindFilter(Filter unbindFilter)
This filter will added to the list of filters in this Configuration that will determine which Descriptors will be removed from the system. |
|
ActiveDescriptor<?> |
bind(Descriptor key)
This method will bind the given descriptor to this Module. |
|
FactoryDescriptors |
bind(FactoryDescriptors factoryDescriptors)
This method will bind the descriptors found in the FactoryDescriptors . |
|
void |
commit()
This causes the configuration to get committed. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DynamicConfigurationImpl(ServiceLocatorImpl locator)
locator
- The locator for which this will be the configuration serviceMethod Detail |
---|
public ActiveDescriptor<?> bind(Descriptor key)
DynamicConfiguration
bind
in interface DynamicConfiguration
key
- May not be null. Will be used to derive the various
key fields associated with the given provider
public FactoryDescriptors bind(FactoryDescriptors factoryDescriptors)
DynamicConfiguration
FactoryDescriptors
. This method will first
validate the descriptors from the FactoryDescriptors
and then simply bind them into this configuration as
two independent descriptors.
bind
in interface DynamicConfiguration
factoryDescriptors
- A description of a factory service
and the type the factory service provides. May not be null
public <T> ActiveDescriptor<T> addActiveDescriptor(ActiveDescriptor<T> activeDescriptor) throws IllegalArgumentException
DynamicConfiguration
addActiveDescriptor
in interface DynamicConfiguration
activeDescriptor
- The reified active descriptor to be added to the system. The
system will not attempt to reify this descriptor itself
IllegalArgumentException
- if the descriptor is not reifiedpublic <T> ActiveDescriptor<T> addActiveDescriptor(Class<T> rawClass) throws IllegalArgumentException
DynamicConfiguration
addActiveDescriptor
in interface DynamicConfiguration
rawClass
- The class to analyze, must not be null
IllegalArgumentException
- if rawClass is nullpublic void addUnbindFilter(Filter unbindFilter) throws IllegalArgumentException
DynamicConfiguration
ActiveDescriptor
. The descriptors passed into this
filter may or may not have been reified. This filter should not reify passed in descriptors.
And descriptor for which this filter returns true will be removed from the
ServiceLocator
prior to any additions that are performed with this
Configuration object. Hence a Configuration can remove and add a descriptor of the
same type in one commit.
In order to unbind a filter the caller of commit must pass the LOOKUP validators and the UNBIND validators.
addUnbindFilter
in interface DynamicConfiguration
unbindFilter
- This filter will be added to the list of filters that this
configuration object will use to determine which descriptors to unbind from the system.
May not be null
IllegalArgumentException
- if unbindFilter is nullpublic void commit() throws MultiException
DynamicConfiguration
commit
in interface DynamicConfiguration
MultiException
- If errors were found in the commit processpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |