public class SpringConfigurator extends Object implements Configurator
| Constructor and Description |
|---|
SpringConfigurator(List<String> configFiles)
Constructor.
|
SpringConfigurator(String uri,
String providerSpringConfig)
Constructor.
|
SpringConfigurator(String uri,
String secureUri,
String keystore,
String password,
String keypassword,
String providerSpringConfig)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ApiProvider |
getApiProvider()
Returns the primary API provider described in the configuration.
|
List<ProtocolHandler> |
getProtocolHandlers()
Returns a list of protocol handlers as described in the configuration.
|
public SpringConfigurator(List<String> configFiles)
Creates an instance that load Spring application context and configures the infrastructure based on the specified configuration files.
It is expected that in the provided configuration
id="apiProvider" and
that bean is of type LocalProvider or
ApiAggregatorProtocolHandler
existsConfigurator interface
methods implemented by this class.configFiles - Spring XML configuration files, must be
available on the classpathIllegalArgumentException - if configFiles is
null or emptypublic SpringConfigurator(String uri, String providerSpringConfig)
Creates an instance that uses the specified uri and
optionally providerSpringConfig to configure the
infrastructure.
Instances created with this constructor uses default
configuration for JSON/HTTP Custom Spring XML configuration may be provided with the
ProtocolHandler. HTTP server
uses HTTP listener only (no HTTPS).
The configuration is available from:
providerSpringConfig. If provided it will be loaded and a
bean with id id="apiProvider" will be used by this
configurator.
uri - HTTP URL for server to listen onproviderSpringConfig - Spring XML configuration files
supposed to contain definition for ApiProvider to
be used' must be available on the classpath; must not be
nullSpringConfigurator(List)public SpringConfigurator(String uri, String secureUri, String keystore, String password, String keypassword, String providerSpringConfig)
Creates an instance that uses the specified uri and
optionally providerSpringConfig to configure the
infrastructure.
Instances created with this constructor uses default
configuration for JSON/HTTP ProtocolHandler. HTTP server
uses HTTPS listener optionally HTTP one.
The configuration is available from:
uri - HTTP URL for server to listen onsecureUri - HTTPS URL for server to listen onkeystore - SSL keystorepassword - password for the SSL keystorekeypassword - password for the SSL keyproviderSpringConfig - Spring XML configuration files
supposed to contain definition for ApiProvider to
be used' must be available on the classpath; must not be
nullSpringConfigurator(String, String),
SpringConfigurator(List)public ApiProvider getApiProvider()
ConfiguratorgetApiProvider in interface Configuratorpublic List<ProtocolHandler> getProtocolHandlers()
ConfiguratorgetProtocolHandlers in interface ConfiguratorCopyright © 2022. All rights reserved.