org.springframework.integration.http
Class DataBindingInboundRequestMapper

java.lang.Object
  extended by org.springframework.integration.http.DataBindingInboundRequestMapper
All Implemented Interfaces:
org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, InboundRequestMapper, InboundMessageMapper<javax.servlet.http.HttpServletRequest>

public class DataBindingInboundRequestMapper
extends java.lang.Object
implements InboundRequestMapper, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

InboundRequestMapper implementation that binds the request parameter map to a target instance. The target instance may be a non-singleton bean as specified by the 'targetBeanName' property. Otherwise, this mapper's target type must provide a default, no-arg constructor.

Since:
1.0.2
Author:
Mark Fisher

Constructor Summary
DataBindingInboundRequestMapper()
           
DataBindingInboundRequestMapper(java.lang.Class<?> targetType)
           
 
Method Summary
 void afterPropertiesSet()
           
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
          Provides the BeanFactory necessary to look up a 'targetBeanName' if specified.
 void setTargetBeanName(java.lang.String targetBeanName)
          Specify the name of a bean definition to use when creating the target instance.
 void setTargetType(java.lang.Class<?> targetType)
           
 void setWebBindingInitializer(org.springframework.web.bind.support.WebBindingInitializer webBindingInitializer)
          Specify an optional WebBindingInitializer to be invoked prior to the request binding process.
 Message<?> toMessage(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBindingInboundRequestMapper

public DataBindingInboundRequestMapper()

DataBindingInboundRequestMapper

public DataBindingInboundRequestMapper(java.lang.Class<?> targetType)
Method Detail

setTargetType

public void setTargetType(java.lang.Class<?> targetType)

setTargetBeanName

public void setTargetBeanName(java.lang.String targetBeanName)
Specify the name of a bean definition to use when creating the target instance. The bean must not be a singleton, and it must be compatible with the targetType.

If no 'targetBeanName' value is provided, the target type must provide a default, no-arg constructor.


setWebBindingInitializer

public void setWebBindingInitializer(org.springframework.web.bind.support.WebBindingInitializer webBindingInitializer)
Specify an optional WebBindingInitializer to be invoked prior to the request binding process.


setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
                    throws org.springframework.beans.BeansException
Provides the BeanFactory necessary to look up a 'targetBeanName' if specified. This method is typically invoked automatically by the container.

Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
Throws:
org.springframework.beans.BeansException

afterPropertiesSet

public final void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

toMessage

public Message<?> toMessage(javax.servlet.http.HttpServletRequest request)
                     throws java.lang.Exception
Specified by:
toMessage in interface InboundMessageMapper<javax.servlet.http.HttpServletRequest>
Throws:
java.lang.Exception