Top Description Inners Constructors Methods
org.springframework.web.socket.messaging

public Class WebSocketAnnotationMethodMessageHandler

extends SimpAnnotationMethodMessageHandler
Class Inheritance
Imports
java.util.ArrayList, .List, org.springframework.context.ApplicationContext, org.springframework.lang.Nullable, org.springframework.messaging.MessageChannel, .SubscribableChannel, org.springframework.messaging.handler.MessagingAdviceBean, org.springframework.messaging.handler.annotation.support.AnnotationExceptionHandlerMethodResolver, org.springframework.messaging.simp.SimpMessageSendingOperations, org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler, org.springframework.web.method.ControllerAdviceBean

A subclass of SimpAnnotationMethodMessageHandler to provide support for ControllerAdvice with global @MessageExceptionHandler methods.
Author
Rossen Stoyanchev
Since
4.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
WebSocketAnnotationMethodMessageHandler.MessagingControllerAdviceBean

Adapt ControllerAdviceBean to MessagingAdviceBean.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
afterPropertiesSet()

Overrides org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.afterPropertiesSet.

Implements org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

private void
private void
Inherited from org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler:
createExceptionHandlerMethodResolverForgetConversionServicegetDestinationgetDirectLookupDestinationsgetHandlerMethodLoggergetHeaderInitializergetLookupDestinationgetMappingComparatorgetMappingForMethodgetMatchingMappinggetMessageConvertergetPathMatchergetPhasegetReturnValueHandlerLoggergetValidatorhandleMatchinitArgumentResolversinitReturnValueHandlersisHandlerisRunningresolveEmbeddedValuesInDestinationssetConversionServicesetDestinationPrefixessetEmbeddedValueResolversetHeaderInitializersetMessageConvertersetPathMatchersetPhasesetValidatorstartstopstop

Constructor Detail

WebSocketAnnotationMethodMessageHandlerback to summary
public WebSocketAnnotationMethodMessageHandler(SubscribableChannel clientInChannel, MessageChannel clientOutChannel, SimpMessageSendingOperations brokerTemplate)

Method Detail

afterPropertiesSetback to summary
public void afterPropertiesSet()

Overrides org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.afterPropertiesSet.

Implements org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Doc from org.springframework.beans.factory.InitializingBean.afterPropertiesSet.

Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

Annotations
@Override
initControllerAdviceCacheback to summary
private void initControllerAdviceCache()
initMessagingAdviceCacheback to summary
private void initMessagingAdviceCache(List<MessagingAdviceBean> beans)
org.springframework.web.socket.messaging back to summary

private final Class WebSocketAnnotationMethodMessageHandler.MessagingControllerAdviceBean

extends Object
implements MessagingAdviceBean
Class Inheritance
  • java.lang.Object
  • org.springframework.web.socket.messaging.WebSocketAnnotationMethodMessageHandler.MessagingControllerAdviceBean
All Implemented Interfaces
org.springframework.messaging.handler.MessagingAdviceBean, org.springframework.core.Ordered

Adapt ControllerAdviceBean to MessagingAdviceBean.

Field Summary

Modifier and TypeField and Description
private final ControllerAdviceBean

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Implements org.springframework.messaging.handler.MessagingAdviceBean.getBeanType.

Return the type of the contained advice bean.

public int
getOrder()

Implements org.springframework.core.Ordered.getOrder.

Get the order value of this object.

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

Implements org.springframework.messaging.handler.MessagingAdviceBean.isApplicableToBeanType.

Whether this MessagingAdviceBean applies to the given bean type.

public Object
resolveBean()

Implements org.springframework.messaging.handler.MessagingAdviceBean.resolveBean.

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

adviceBeanback to summary
private final ControllerAdviceBean adviceBean

Constructor Detail

MessagingControllerAdviceBeanback to summary
private MessagingControllerAdviceBean(ControllerAdviceBean adviceBean)

Method Detail

createFromListback to summary
public static List<MessagingAdviceBean> createFromList(List<ControllerAdviceBean> beans)
getBeanTypeback to summary
public Class<?> getBeanType()

Implements org.springframework.messaging.handler.MessagingAdviceBean.getBeanType.

Doc from org.springframework.messaging.handler.MessagingAdviceBean.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
@Override
@Nullable
getOrderback to summary
public int getOrder()

Implements org.springframework.core.Ordered.getOrder.

Doc from org.springframework.core.Ordered.getOrder.

Get the order value of this object.

Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

Same order values will result in arbitrary sort positions for the affected objects.

Returns:int

the order value

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

Implements org.springframework.messaging.handler.MessagingAdviceBean.isApplicableToBeanType.

Doc from org.springframework.messaging.handler.MessagingAdviceBean.isApplicableToBeanType.

Whether this MessagingAdviceBean applies to the given bean type.

Parameters
beanType:Class<?>

the type of the bean to check

Annotations
@Override
resolveBeanback to summary
public Object resolveBean()

Implements org.springframework.messaging.handler.MessagingAdviceBean.resolveBean.

Doc from org.springframework.messaging.handler.MessagingAdviceBean.resolveBean.

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

Annotations
@Override