|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oranjestad.commons.beanutils.messaging.dispatching.MappedMethodAndArgumentsDispatcher oranjestad.spring.beanutils.messaging.dispatching.SpringMappedMethodAndArgumentsDispatcher
public class SpringMappedMethodAndArgumentsDispatcher
Extension to the standard MappedMethodAndArgumentsDispatcher
that
integrates with Spring. It's main function is to expose the BeanFactory
at the object message level so that nested properties can refer to the bean
factory and beans within the factory.
The bean factory is exposed as a Map
which allows
the usage of map syntax with nested properties.
beanFactory(beanName)
The above would pull out a bean named beanName from the bean factory.
This is similar to how arguments are refereneced arguments[n]
using nested properties.
The object that is being referenced when using nested properties is an
instanceof
BeanFactoryAwareGenericMessage
. This gives
use access to most every aspect of the original method invocation. The
following is a list of properties you could reference.
Property | type | Description |
---|---|---|
beanFactory | java.util.Map |
A Map representation of the BeanFactory used to create the
SpringMappedMethodAndArgumentsDispatcher . This object is presented
as a Map so that the standard nested property syntax
can be used. (e.g. beanFactory(someBean) ). |
arguments | java.lang.Object[] |
The arguments passed into the original method. Using the nested
property syntax you can access any of the arguments in the array (e.g.
arguments[2] ). |
method | java.lang.reflect.Method |
The method getting executed. (e.g. method.name ) |
channel | oranjestad.commons.beanutils.messaging.Channel |
The channel that this listener was registered to. |
originalArguments originalMethod originalChannel |
Same as corresponding properties | Original properties are not intended to be changed after creation of the
message. In theory, a In practice these fields are not used very often. |
Constructor Summary | |
---|---|
SpringMappedMethodAndArgumentsDispatcher()
|
Method Summary | |
---|---|
protected oranjestad.commons.beanutils.messaging.GenericMessage |
massageMessage(oranjestad.commons.beanutils.messaging.GenericMessage message)
Overrides the standard method to return a BeanFactoryAwareGenericMessage
that adds the beanFactory property to the generic message. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory bf)
|
Methods inherited from class oranjestad.commons.beanutils.messaging.dispatching.MappedMethodAndArgumentsDispatcher |
---|
onGenericMessage, setGenericMessageDispatchingOptions, setMappings, setTarget |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpringMappedMethodAndArgumentsDispatcher()
Method Detail |
---|
public void setBeanFactory(org.springframework.beans.factory.BeanFactory bf) throws org.springframework.beans.BeansException
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
protected oranjestad.commons.beanutils.messaging.GenericMessage massageMessage(oranjestad.commons.beanutils.messaging.GenericMessage message)
BeanFactoryAwareGenericMessage
that adds the beanFactory property to the generic message.
massageMessage
in class oranjestad.commons.beanutils.messaging.dispatching.MappedMethodAndArgumentsDispatcher
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |