public class RSocketMessageHandler extends MessageMappingMessageHandler
MessageMappingMessageHandler.
The configured encoders are used to encode the
return values from handler methods, with the help of
RSocketPayloadReturnValueHandler.
logger| Constructor and Description |
|---|
RSocketMessageHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Invoked by the containing
BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc. |
List<? extends Encoder<?>> |
getEncoders()
Return the configured
encoders. |
RSocketStrategies |
getRSocketStrategies()
Return the
RSocketStrategies instance provided via
rsocketStrategies, or
otherwise initialize it with the configured encoders, decoders, and others. |
protected void |
handleNoMatch(String destination,
Message<?> message)
Invoked when no matching handler is found.
|
protected List<? extends HandlerMethodReturnValueHandler> |
initReturnValueHandlers()
Return the list of return value handlers to use.
|
void |
setEncoders(List<? extends Encoder<?>> encoders)
Configure the encoders to use for encoding handler method return values.
|
void |
setRSocketStrategies(RSocketStrategies rsocketStrategies)
Provide configuration in the form of
RSocketStrategies. |
createExceptionMethodResolverFor, getConversionService, getDecoders, getDestination, getDirectLookupMappings, getHandlerPredicate, getMappingComparator, getMappingForMethod, getMatchingMapping, getPathMatcher, getValidator, handleMatch, initArgumentResolvers, initHandlerPredicate, setAutoDetectDisabled, setConversionService, setDecoders, setEmbeddedValueResolver, setHandlerPredicate, setHandlers, setPathMatcher, setValidatordetectHandlerMethods, getApplicationContext, getArgumentResolverConfigurer, getBeanName, getDestinationLookup, getHandlerMethods, getReactiveAdapterRegistry, getReturnValueHandlerConfigurer, handleMessage, registerExceptionHandlerAdvice, registerHandlerMethod, setApplicationContext, setArgumentResolverConfigurer, setBeanName, setReactiveAdapterRegistry, setReturnValueHandlerConfigurerpublic void setEncoders(List<? extends Encoder<?>> encoders)
public void setRSocketStrategies(RSocketStrategies rsocketStrategies)
RSocketStrategies. This is
an alternative to using setEncoders(List),
MessageMappingMessageHandler.setDecoders(List), and others directly. It is convenient when
you also configuring an RSocketRequester in which case the
RSocketStrategies encapsulates required configuration for re-use.rsocketStrategies - the strategies to usepublic RSocketStrategies getRSocketStrategies()
RSocketStrategies instance provided via
rsocketStrategies, or
otherwise initialize it with the configured encoders, decoders, and others.public void afterPropertiesSet()
InitializingBeanBeanFactory 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.
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class AbstractMethodMessageHandler<CompositeMessageCondition>protected List<? extends HandlerMethodReturnValueHandler> initReturnValueHandlers()
AbstractMethodMessageHandlerSubclasses should also take into account custom return value types configured
via AbstractMethodMessageHandler.setReturnValueHandlerConfigurer(org.springframework.messaging.handler.invocation.reactive.ReturnValueHandlerConfigurer).
initReturnValueHandlers in class MessageMappingMessageHandlerprotected void handleNoMatch(@Nullable String destination, Message<?> message)
AbstractMethodMessageHandlerhandleNoMatch in class AbstractMethodMessageHandler<CompositeMessageCondition>destination - the destinationmessage - the message