org.milyn.javabean
Class BeanInstanceCreator

java.lang.Object
  extended by org.milyn.javabean.BeanInstanceCreator
All Implemented Interfaces:
org.milyn.delivery.ContentDeliveryConfigBuilderLifecycleListener, org.milyn.delivery.ContentHandler, org.milyn.delivery.dom.DOMElementVisitor, org.milyn.delivery.dom.DOMVisitAfter, org.milyn.delivery.dom.DOMVisitBefore, org.milyn.delivery.dom.DOMVisitor, org.milyn.delivery.ordering.Producer, org.milyn.delivery.sax.SAXVisitAfter, org.milyn.delivery.sax.SAXVisitBefore, org.milyn.delivery.sax.SAXVisitor, org.milyn.delivery.VisitLifecycleCleanable, org.milyn.delivery.Visitor

public class BeanInstanceCreator
extends Object
implements org.milyn.delivery.dom.DOMElementVisitor, org.milyn.delivery.sax.SAXVisitBefore, org.milyn.delivery.sax.SAXVisitAfter, org.milyn.delivery.ContentDeliveryConfigBuilderLifecycleListener, org.milyn.delivery.ordering.Producer, org.milyn.delivery.VisitLifecycleCleanable

Bean instance creator visitor class.

Author:
tom.fennelly@gmail.com

Field Summary
static String INIT_VAL_EXPRESSION
           
 
Constructor Summary
BeanInstanceCreator()
          Public default constructor.
BeanInstanceCreator(String beanId, Class<?> beanClass)
          Public default constructor.
BeanInstanceCreator(String beanId, Class<T> beanClass, Factory<? extends T> factory)
          Public default constructor.
 
Method Summary
 void executeVisitLifecycleCleanup(org.milyn.delivery.Fragment fragment, org.milyn.container.ExecutionContext executionContext)
           
 String getBeanId()
          Get the beanId of this Bean configuration.
 BeanRuntimeInfo getBeanRuntimeInfo()
          Get the bean runtime information.
 org.milyn.cdr.SmooksResourceConfiguration getConfig()
           
 Set<? extends Object> getProducts()
           
 void handle(org.milyn.delivery.ContentDeliveryConfigBuilderLifecycleEvent event)
           
 void initialize()
          Set the resource configuration on the bean populator.
 String toString()
           
 void visitAfter(Element element, org.milyn.container.ExecutionContext executionContext)
           
 void visitAfter(org.milyn.container.ExecutionContext executionContext, org.milyn.delivery.Fragment source)
           
 void visitAfter(org.milyn.delivery.sax.SAXElement element, org.milyn.container.ExecutionContext executionContext)
           
 void visitBefore(Element element, org.milyn.container.ExecutionContext executionContext)
           
 void visitBefore(org.milyn.delivery.sax.SAXElement element, org.milyn.container.ExecutionContext executionContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INIT_VAL_EXPRESSION

public static final String INIT_VAL_EXPRESSION
See Also:
Constant Field Values
Constructor Detail

BeanInstanceCreator

public BeanInstanceCreator()
Public default constructor.


BeanInstanceCreator

public BeanInstanceCreator(String beanId,
                           Class<?> beanClass)
Public default constructor.

Parameters:
beanId - The beanId under which the bean instance is registered in the bean context.
beanClass - The bean runtime class.

BeanInstanceCreator

public BeanInstanceCreator(String beanId,
                           Class<T> beanClass,
                           Factory<? extends T> factory)
Public default constructor.

Parameters:
beanId - The beanId under which the bean instance is registered in the bean context.
beanClass - The bean runtime class.
Method Detail

getBeanId

public String getBeanId()
Get the beanId of this Bean configuration.

Returns:
The beanId of this Bean configuration.

getConfig

public org.milyn.cdr.SmooksResourceConfiguration getConfig()

initialize

@Initialize
public void initialize()
                throws org.milyn.cdr.SmooksConfigurationException
Set the resource configuration on the bean populator.

Throws:
org.milyn.cdr.SmooksConfigurationException - Incorrectly configured resource.

handle

public void handle(org.milyn.delivery.ContentDeliveryConfigBuilderLifecycleEvent event)
            throws org.milyn.cdr.SmooksConfigurationException
Specified by:
handle in interface org.milyn.delivery.ContentDeliveryConfigBuilderLifecycleListener
Throws:
org.milyn.cdr.SmooksConfigurationException

getBeanRuntimeInfo

public BeanRuntimeInfo getBeanRuntimeInfo()
Get the bean runtime information.

Returns:
The bean runtime information.

visitBefore

public void visitBefore(Element element,
                        org.milyn.container.ExecutionContext executionContext)
                 throws org.milyn.SmooksException
Specified by:
visitBefore in interface org.milyn.delivery.dom.DOMVisitBefore
Throws:
org.milyn.SmooksException

visitBefore

public void visitBefore(org.milyn.delivery.sax.SAXElement element,
                        org.milyn.container.ExecutionContext executionContext)
                 throws org.milyn.SmooksException,
                        IOException
Specified by:
visitBefore in interface org.milyn.delivery.sax.SAXVisitBefore
Throws:
org.milyn.SmooksException
IOException

visitAfter

public void visitAfter(Element element,
                       org.milyn.container.ExecutionContext executionContext)
                throws org.milyn.SmooksException
Specified by:
visitAfter in interface org.milyn.delivery.dom.DOMVisitAfter
Throws:
org.milyn.SmooksException

visitAfter

public void visitAfter(org.milyn.delivery.sax.SAXElement element,
                       org.milyn.container.ExecutionContext executionContext)
                throws org.milyn.SmooksException,
                       IOException
Specified by:
visitAfter in interface org.milyn.delivery.sax.SAXVisitAfter
Throws:
org.milyn.SmooksException
IOException

visitAfter

public void visitAfter(org.milyn.container.ExecutionContext executionContext,
                       org.milyn.delivery.Fragment source)

getProducts

public Set<? extends Object> getProducts()
Specified by:
getProducts in interface org.milyn.delivery.ordering.Producer

toString

public String toString()
Overrides:
toString in class Object

executeVisitLifecycleCleanup

public void executeVisitLifecycleCleanup(org.milyn.delivery.Fragment fragment,
                                         org.milyn.container.ExecutionContext executionContext)
Specified by:
executeVisitLifecycleCleanup in interface org.milyn.delivery.VisitLifecycleCleanable


Copyright © 2018. All rights reserved.