use of io.apiman.gateway.engine.IRegistry in project apiman by apiman.
the class ConfigDrivenEngineFactory method createRegistry.
/**
* @see io.apiman.gateway.engine.impl.AbstractEngineFactory#createRegistry(io.apiman.gateway.engine.IPluginRegistry, io.apiman.common.util.crypt.IDataEncrypter)
*/
@Override
protected IRegistry createRegistry(IPluginRegistry pluginRegistry, IDataEncrypter encrypter) {
Class<? extends IRegistry> c = engineConfig.getRegistryClass(pluginRegistry);
Map<String, String> config = engineConfig.getRegistryConfig();
IRegistry registry = create(c, config);
return new SecureRegistryWrapper(registry, encrypter);
}
use of io.apiman.gateway.engine.IRegistry in project apiman by apiman.
the class AbstractEngineFactory method createEngine.
/**
* Call this to create a new engine. This method uses the engine
* config singleton to create the engine.
*/
@Override
public final IEngine createEngine() {
IPluginRegistry pluginRegistry = createPluginRegistry();
IDataEncrypter encrypter = createDataEncrypter(pluginRegistry);
CurrentDataEncrypter.instance = encrypter;
IRegistry registry = createRegistry(pluginRegistry, encrypter);
IComponentRegistry componentRegistry = createComponentRegistry(pluginRegistry);
IConnectorFactory cfactory = createConnectorFactory(pluginRegistry);
IPolicyFactory pfactory = createPolicyFactory(pluginRegistry);
IMetrics metrics = createMetrics(pluginRegistry);
IApiRequestPathParser pathParser = createRequestPathParser(pluginRegistry);
List<IGatewayInitializer> initializers = createInitializers(pluginRegistry);
for (IGatewayInitializer initializer : initializers) {
initializer.initialize();
}
complete();
return new EngineImpl(registry, pluginRegistry, componentRegistry, cfactory, pfactory, metrics, pathParser);
}
Aggregations