Top Description Fields Methods
org.springframework.messaging.handler

public Interface MessagingAdviceBean

extends Ordered
Imports
org.springframework.core.Ordered, org.springframework.lang.Nullable

Represents a Spring-managed bean with cross-cutting functionality to be applied to one or more Spring beans with annotation-based message handling methods.

Component stereotypes such as @Controller with annotation handler methods often need cross-cutting functionality across all or a subset of such annotated components. A primary example of this is the need for "global" annotated exception handler methods but the concept applies more generally.

Author
Rossen Stoyanchev
Since
4.2

Field Summary

Inherited from org.springframework.core.Ordered:
HIGHEST_PRECEDENCELOWEST_PRECEDENCE

Method Summary

Modifier and TypeMethod and Description
public Class<?>
getBeanType()

Return the type of the contained advice bean.

public boolean
isApplicableToBeanType(Class<?>
the type of the bean to check
beanType
)

Whether this MessagingAdviceBean applies to the given bean type.

public Object
resolveBean()

Return the advice bean instance, if necessary resolving a bean specified by name through the BeanFactory.

Inherited from org.springframework.core.Ordered:
getOrder

Method Detail

getBeanTypeback to summary
public Class<?> getBeanType()

Return the type of the contained advice bean.

If the bean type is a CGLIB-generated class, the original user-defined class is returned.

Annotations
@Nullable
isApplicableToBeanTypeback to summary
public boolean isApplicableToBeanType(Class<?> beanType)

Whether this MessagingAdviceBean applies to the given bean type.

Parameters
beanType:Class<?>

the type of the bean to check

resolveBeanback to summary
public Object resolveBean()

Return the advice bean instance, if necessary resolving a bean specified by name through the BeanFactory.