org.spicefactory.cinnamon.config.shared
Class AbstractServiceConfigParser

java.lang.Object
  extended by org.spicefactory.cinnamon.config.shared.AbstractServiceConfigParser

public abstract class AbstractServiceConfigParser
extends Object

Abstract base class containing parsing logic for service configuration. Will be used in the default XML configuration parser and the Spring NamespaceHandler.

Author:
Jens Halm

Constructor Summary
AbstractServiceConfigParser()
           
 
Method Summary
protected abstract  void addServiceConfig(String name, String scope, Class<?> serviceInterface, Class<?> serviceImplementation, String factoryRef, List<OperationConfig> operations, boolean processAnnotations)
          Adds a service to the configuration.
 void process(ElementWrapper element)
          Processes the given XML element representing a single service configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractServiceConfigParser

public AbstractServiceConfigParser()
Method Detail

process

public void process(ElementWrapper element)
Processes the given XML element representing a single service configuration.

Parameters:
element - the wrapper for the XML element

addServiceConfig

protected abstract void addServiceConfig(String name,
                                         String scope,
                                         Class<?> serviceInterface,
                                         Class<?> serviceImplementation,
                                         String factoryRef,
                                         List<OperationConfig> operations,
                                         boolean processAnnotations)
Adds a service to the configuration. Subclasses implementing this method should create a ServiceConfig instance and add it to the CinnamonConfig instance under construction. The exact mechanism depends on the configuration method in use (i.e. XML vs. Spring).

Parameters:
name - the name of the service
scope - the (optional) scope
serviceInterface - the service interface
serviceImplementation - the (optional) service implementation
factoryRef - the name of the ServiceFactory to use for this service
operations - a list of operations that can be invoked by clients
processAnnotations - whether annotations should be processed on the service interface