com.xenonsoft.bridgetown.soa.impl
Class AOPAbstractServiceAssembler

java.lang.Object
  extended bycom.xenonsoft.bridgetown.soa.impl.AbstractServiceAssembler
      extended bycom.xenonsoft.bridgetown.soa.impl.AOPAbstractServiceAssembler
All Implemented Interfaces:
IDisposable, IServiceAssembler, IServiceObjectFactory, IStartable, java.io.Serializable
Direct Known Subclasses:
AOPServiceAssemblerImpl

public abstract class AOPAbstractServiceAssembler
extends AbstractServiceAssembler

AOP abstract service assembler

Version:
$Id: AOPAbstractServiceAssembler.java,v 1.5 2005/02/23 01:31:09 peter_pilgrim Exp $
Author:
peterp, 30-Sep-2004
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.xenonsoft.bridgetown.soa.impl.AbstractServiceAssembler
assembly, beanPropertyValueResolver, classLoader, instanceCache, proxyBeanBuilder
 
Constructor Summary
AOPAbstractServiceAssembler()
          Default constructor
 
Method Summary
protected  void configureParameterBeanReferences(PointcutConfig pointcutConfig)
          Given a pointcut configuration, for all properties configure, fix up and verify any associated bean references.
protected  void createBeanBuilder()
          Creates the bean builder for the application assembler.
 IAOPWeaverProxyBeanBuilder getAopWeaver()
          Gets the AOP weaver proxy bean builder DESIGN NOTE: In theory, we could have a AOP proxy bean builder that is different object from the basic proxy bean builder, but I have not coded proxy builders this way, because the reponsibility of creating proxies and instrumenting them usual lies within one module.
 void setAopWeaver(IAOPWeaverProxyBeanBuilder aopWeaver)
          Sets the AOP weaver proxy bean builder This method calls the superclass method setProxyBeanBuilder
 void start()
          Start the services registered with the assembly and additionally weaves behaviours into matching service beans and point cuts
protected  void weavePointcut(ContextConfig contextConfig, PointcutConfig pointcutConfig)
          Weave a local context pointcut definition that registered an assembler factory.
 
Methods inherited from class com.xenonsoft.bridgetown.soa.impl.AbstractServiceAssembler
checkFactory, configureServiceBeanProperties, configureServiceBeanReferences, containsContext, containsService, createRetrieveServiceBean, createServiceBean, createServiceBean, createServiceBean, dispose, fixupServiceBeanReferences, getAssemblyConfig, getBeanPropertyValueResolver, getClassListFromNameList, getClassLoader, getContextConfig, getContextNameList, getProxyBeanBuilder, getServiceConfig, getServiceNameList, getServicesConfig, invokeServiceBeanMethod, invokeServiceBeanMethods, load, merge, recursiveCreateServiceBean, resolveValueReferences, setBeanPropertyValueResolver, setClassLoader, setProxyBeanBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.xenonsoft.bridgetown.soa.IServiceObjectFactory
getName, getName, getService
 

Constructor Detail

AOPAbstractServiceAssembler

public AOPAbstractServiceAssembler()
Default constructor

Method Detail

createBeanBuilder

protected void createBeanBuilder()
Creates the bean builder for the application assembler. Overrides the superclass method to create or retrieve an IAOPWeaverProxyBeanBuilder

Overrides:
createBeanBuilder in class AbstractServiceAssembler
See Also:
IAOPWeaverProxyBeanBuilder

getAopWeaver

public IAOPWeaverProxyBeanBuilder getAopWeaver()
Gets the AOP weaver proxy bean builder

DESIGN NOTE: In theory, we could have a AOP proxy bean builder that is different object from the basic proxy bean builder, but I have not coded proxy builders this way, because the reponsibility of creating proxies and instrumenting them usual lies within one module. In any case IAOPWeaverProxyBeanBuilder is a sub interface to IProxyBeanBuilder.
Peter Pilgrim

This method calls the superclass method getProxyBeanBuilder

Returns:
Returns the aopWeaver.
See Also:
IProxyBeanBuilder, AbstractServiceAssembler.getProxyBeanBuilder(), setAopWeaver(IAOPWeaverProxyBeanBuilder)

setAopWeaver

public void setAopWeaver(IAOPWeaverProxyBeanBuilder aopWeaver)
Sets the AOP weaver proxy bean builder

This method calls the superclass method setProxyBeanBuilder

Parameters:
aopWeaver - The aopWeaver to set.
See Also:
AbstractServiceAssembler.setProxyBeanBuilder(IProxyBeanBuilder), getAopWeaver()

start

public void start()
Start the services registered with the assembly and additionally weaves behaviours into matching service beans and point cuts

Specified by:
start in interface IStartable
Overrides:
start in class AbstractServiceAssembler
See Also:
AbstractServiceAssembler.start()

weavePointcut

protected void weavePointcut(ContextConfig contextConfig,
                             PointcutConfig pointcutConfig)
Weave a local context pointcut definition that registered an assembler factory.

Add a proxy weaving to the assembler start method.

  1. Create a method pointcut
  2. Set up the class finder expression
    1. If a service-finder tag was specifoed set up the class finder from the service bean's implementation class
  3. Set up the method finder expression
  4. Retrieve the method interceptor bean. check that it is not a lazy loaded bean and it must be a singleton.

Register the method pointcut with the IAOPWeaverProxyBeanBuilder implementation.

Parameters:
contextConfig - the context configuration
pointcutConfig - the pointcut configuration

configureParameterBeanReferences

protected void configureParameterBeanReferences(PointcutConfig pointcutConfig)
Given a pointcut configuration, for all properties configure, fix up and verify any associated bean references.

Throws:
AssemblyFactoryException - - if the parameters of the pointcut cannot be configured correctly


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.