public class ConfigDrivenComponentRegistry extends Object implements IComponentRegistry
| Constructor and Description |
|---|
ConfigDrivenComponentRegistry(IEngineConfig engineConfig)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addComponentMapping(Class<? extends IComponent> klazz,
IComponent component)
Add a component that may have been instantiated elsewhere.
|
<T extends IComponent> |
createAndRegisterComponent(Class<T> componentType)
Creates the component and registers it in the registry.
|
<T extends IComponent> |
getComponent(Class<T> componentType)
Gets a specific type of component from the registry.
|
public ConfigDrivenComponentRegistry(IEngineConfig engineConfig)
engineConfig - the engine configpublic <T extends IComponent> T getComponent(Class<T> componentType) throws io.apiman.gateway.engine.beans.exceptions.ComponentNotFoundException
IComponentRegistrygetComponent in interface IComponentRegistrycomponentType - the component typeio.apiman.gateway.engine.beans.exceptions.ComponentNotFoundException - when component not foundIComponentRegistry.getComponent(java.lang.Class)public <T extends IComponent> T createAndRegisterComponent(Class<T> componentType) throws io.apiman.gateway.engine.beans.exceptions.ComponentNotFoundException
componentType - the component typeio.apiman.gateway.engine.beans.exceptions.ComponentNotFoundException - when a policy tries to get a component from
the context but the component doesn't exist or is otherwise not available.protected void addComponentMapping(Class<? extends IComponent> klazz, IComponent component)
klazz - component classcomponent - instantiated component of same classCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.