Update of /cvsroot/springnet/Spring.Net/doc/reference/src
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11010
Modified Files:
objects.xml
Log Message:
complete docs for IInstantiationAwareObjectPostProcessor
fix xml snippit for abstract/child definitions - thanks James
Index: objects.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/objects.xml,v
retrieving revision 1.106
retrieving revision 1.107
diff -C2 -d -r1.106 -r1.107
*** objects.xml 21 Aug 2007 19:28:27 -0000 1.106
--- objects.xml 9 Sep 2007 22:53:12 -0000 1.107
***************
*** 1,5 ****
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="objects">
! <title>Objects, Object Factories, and Application Contexts</title>
<sect1 id="objects-introduction">
--- 1,6 ----
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="objects">
! <title>abstractObjectObjects, Object Factories, and Application
! Contexts</title>
<sect1 id="objects-introduction">
***************
*** 3162,3166 ****
</object>
<object id="inheritsFromAbstract" type="Spring.Objects.DerivedTestObject, Spring.Core.Tests"
! parent="inheritedTestObjectWithoutClass" init-method="Initialize">
<property name="name" value="override"/>
<!-- age will inherit value of 1 from parent -->
--- 3163,3167 ----
</object>
<object id="inheritsFromAbstract" type="Spring.Objects.DerivedTestObject, Spring.Core.Tests"
! parent="abstractObject" init-method="Initialize">
<property name="name" value="override"/>
<!-- age will inherit value of 1 from parent -->
***************
*** 3389,3406 ****
{
object PostProcessBeforeInstantiation(Type objectType, string objectName);
! }
public interface IDestructionAwareObjectPostProcessor : IObjectPostProcessor
{
void PostProcessBeforeDestruction (object instance, string name);
! }</programlisting> The "BeforeInstantiation" callback method is called right
! before the container creates the object. If the object returned by this
! method is not null then the default instantiation behavor of the
! container is short circuited. The returned object is the one registered
! with the container and no other <literal>IObjectPostProcessor</literal>
! callbacks will be invoked on it. This mechanism is useful if you would
! like to expose a proxy to the object instead of the actual target
! object. The "BeforeDestruction" callack is called before a singletons
! destroy method is invoked.</para>
<para>It is important to know that the
--- 3390,3428 ----
{
object PostProcessBeforeInstantiation(Type objectType, string objectName);
!
! bool PostProcessAfterInstantiation(object objectInstance, string objectName);
!
! IPropertyValues PostProcessPropertyValues(IPropertyValues pvs, PropertyInfo[] pis, object objectInstance, string objectName);
! }
public interface IDestructionAwareObjectPostProcessor : IObjectPostProcessor
{
void PostProcessBeforeDestruction (object instance, string name);
! }</programlisting> The <classname>PostProcessBeforeInstantiation</classname>
! callback method is called right before the container creates the object.
! If the object returned by this method is not null then the default
! instantiation behavor of the container is short circuited. The returned
! object is the one registered with the container and no other
! <literal>IObjectPostProcessor</literal> callbacks will be invoked on it.
! This mechanism is useful if you would like to expose a proxy to the
! object instead of the actual target object. The
! <classname>PostProcessAfterInstantiation</classname> callback method is
! called after the object has been instantiated but before Spring performs
! property population based on explicit properties or autowiring. A return
! value of false would short circuit the standard Spring based property
! population. The callback method
! <classname>PostProcessPropertyValues</classname> is called after Spring
! collects all the property values to apply to the object, but before they
! are applied. This gives you the opportunity to perform additional
! processing such as making sure that a property is set to a value if it
! contains the a <classname>[Required] </classname>attribute or to perform
! attribute based wiring, i.e. adding the attribute
! <classname>[Inject("objectName")]</classname> on a property. Both of
! these features are scheduled to be included in Spring .12.</para>
!
! <para>The <classname>IDestructionAwareObjectPostProcessor</classname>
! callback contains a single method,
! <classname>PostProcessBeforeDestruction</classname>, which is called
! before a singletons destroy method is invoked.</para>
<para>It is important to know that the
|