org.apache.ignite.internal.processors.spring

## Interface IgniteSpringProcessor

    public interface IgniteSpringProcessor

Spring processor which can parse Spring configuration files, interface was introduced to avoid mandatory runtime dependency on Spring framework.

### Method Summary

Methods
`Map<Class<?>,Object>` `loadBeans(URL cfgUrl, Class<?>... beanClasses)` Loads bean instances that match the given types from given configuration file.
`IgniteBiTuple<Collection<IgniteConfiguration>,? extends GridSpringResourceContext>` `loadConfigurations(URL cfgUrl, String... excludedProps)` Loads all grid configurations specified within given configuration file.
`String` `userVersion(ClassLoader ldr, IgniteLogger log)` Gets user version for given class loader by checking `META-INF/ignite.xml` file for `userVersion` attribute.

### Method Detail

#### loadConfigurations

    IgniteBiTuple<Collection<IgniteConfiguration>,? extends GridSpringResourceContext> loadConfigurations(URL cfgUrl,
                                                                                                        String... excludedProps)
                                                                                                          throws IgniteCheckedException

Loads all grid configurations specified within given configuration file.

Usually Spring XML configuration file will contain only one Grid definition. Note that Grid configuration bean(s) is retrieved form configuration file by type, so the name of the Grid configuration bean is ignored.

Parameters:
  `cfgUrl` - Configuration file path or URL. This cannot be `null`.
  `excludedProps` - Properties to exclude.
Returns:
  Tuple containing all loaded configurations and Spring context used to load them.
Throws:
  `IgniteCheckedException` - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid.

#### loadBeans

    Map<Class<?>,Object> loadBeans(URL cfgUrl,
                                 Class<?>... beanClasses)
                                   throws IgniteCheckedException

Loads bean instances that match the given types from given configuration file.

Parameters:
  `cfgUrl` - Configuration file path or URL. This cannot be `null`.
  `beanClasses` - Beans classes.
Returns:
  Bean class -> loaded bean instance map, if configuration does not contain bean with required type the map value is `null`.
Throws:
  `IgniteCheckedException` - If failed to load configuration.

#### userVersion

    String userVersion(ClassLoader ldr,
                     IgniteLogger log)

Gets user version for given class loader by checking `META-INF/ignite.xml` file for `userVersion` attribute. If `ignite.xml` file is not found, or user version is not specified there, then default version (empty string) is returned.

Parameters:
  `ldr` - Class loader.
  `log` - Logger.
Returns:
  User version for given class loader or empty string if no version was explicitly specified.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015