Spring Integration

org.springframework.integration.http
Class DataBindingInboundRequestMapper

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

public class DataBindingInboundRequestMapper
extends Object
implements InboundRequestMapper, BeanFactoryAware, 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(Class<?> targetType)
           
 
Method Summary
 void afterPropertiesSet()
           
 void setBeanFactory(BeanFactory beanFactory)
          Provides the BeanFactory necessary to look up a 'targetBeanName' if specified.
 void setTargetBeanName(String targetBeanName)
          Specify the name of a bean definition to use when creating the target instance.
 void setTargetType(Class<?> targetType)
           
 void setWebBindingInitializer(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(Class<?> targetType)
Method Detail

setTargetType

public void setTargetType(Class<?> targetType)

setTargetBeanName

public void setTargetBeanName(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(WebBindingInitializer webBindingInitializer)
Specify an optional WebBindingInitializer to be invoked prior to the request binding process.


setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
                    throws 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 BeanFactoryAware
Throws:
BeansException

afterPropertiesSet

public final void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

toMessage

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

Spring Integration

Copyright © 2010. All Rights Reserved.