接口的使用
org.springframework.messaging.Message
使用Message的程序包 程序包 说明 org.springframework.jms.core Core package of the JMS support.org.springframework.jms.listener.adapter Message listener adapter mechanism that delegates to target listener methods, converting messages to appropriate message content types (such as String or byte array) that get passed into listener methods.org.springframework.jms.support This package provides generic JMS support classes, to be used by higher-level classes like JmsTemplate.org.springframework.messaging Support for working with messaging APIs and protocols.org.springframework.messaging.converter Provides support for message conversion.org.springframework.messaging.core Defines interfaces and implementation classes for messaging templates.org.springframework.messaging.handler Basic abstractions for working with message handler methods.org.springframework.messaging.handler.annotation.reactive Support classes for working with annotated message-handling methods with non-blocking, reactive contracts.org.springframework.messaging.handler.annotation.support Support classes for working with annotated message-handling methods.org.springframework.messaging.handler.invocation Common infrastructure for invoking message handler methods.org.springframework.messaging.handler.invocation.reactive Common infrastructure for invoking message handler methods with non-blocking, and reactive contracts.org.springframework.messaging.rsocket.annotation.support Support classes for working with annotated RSocket stream handling methods.org.springframework.messaging.simp Generic support for Simple Messaging Protocols including protocols such as STOMP.org.springframework.messaging.simp.annotation.support Support classes for handling messages from simple messaging protocols (like STOMP).org.springframework.messaging.simp.broker Provides a "simple" message broker implementation along with an abstract base class and other supporting types such as a registry for subscriptions.org.springframework.messaging.simp.stomp Generic support for simple messaging protocols (like STOMP).org.springframework.messaging.simp.user Support for handling messages to "user" destinations (i.e. destinations that are unique to a user's sessions), primarily translating the destinations and then forwarding the updated message to the broker.org.springframework.messaging.support Provides implementations ofMessagealong with a MessageBuilder and MessageHeaderAccessor for building and working with messages and message headers, as well as variousMessageChannelimplementations and channel interceptor support.org.springframework.messaging.tcp Contains abstractions and implementation classes for establishing TCP connections viaTcpOperations, handling messages viaTcpConnectionHandler, as well as sending messages viaTcpConnection.org.springframework.messaging.tcp.reactor Contains support for TCP messaging based on Reactor.org.springframework.web.socket.messaging WebSocket integration for Spring's messaging module.org.springframework.jms.core中Message的使用
返回Message的org.springframework.jms.core中的方法 修饰符和类型 方法 说明 protected Message<?>JmsMessagingTemplate. convertJmsMessage(Message message)protected Message<?>JmsMessagingTemplate. doReceive(String destinationName)protected Message<?>JmsMessagingTemplate. doReceive(Destination destination)protected Message<?>JmsMessagingTemplate. doSendAndReceive(String destinationName, Message<?> requestMessage)protected Message<?>JmsMessagingTemplate. doSendAndReceive(Destination destination, Message<?> requestMessage)Message<?>JmsMessageOperations. receive(String destinationName)Receive a message from the given destination.Message<?>JmsMessagingTemplate. receive()Message<?>JmsMessagingTemplate. receive(String destinationName)Message<?>JmsMessageOperations. sendAndReceive(String destinationName, Message<?> requestMessage)Send a request message and receive the reply from the given destination.Message<?>JmsMessagingTemplate. sendAndReceive(String destinationName, Message<?> requestMessage)Message<?>JmsMessagingTemplate. sendAndReceive(Message<?> requestMessage)参数类型为Message的org.springframework.jms.core中的方法 修饰符和类型 方法 说明 protected voidJmsMessagingTemplate. doSend(String destinationName, Message<?> message)protected voidJmsMessagingTemplate. doSend(Destination destination, Message<?> message)protected Message<?>JmsMessagingTemplate. doSendAndReceive(String destinationName, Message<?> requestMessage)protected Message<?>JmsMessagingTemplate. doSendAndReceive(Destination destination, Message<?> requestMessage)voidJmsMessageOperations. send(String destinationName, Message<?> message)Send a message to the given destination.voidJmsMessagingTemplate. send(String destinationName, Message<?> message)voidJmsMessagingTemplate. send(Message<?> message)Message<?>JmsMessageOperations. sendAndReceive(String destinationName, Message<?> requestMessage)Send a request message and receive the reply from the given destination.Message<?>JmsMessagingTemplate. sendAndReceive(String destinationName, Message<?> requestMessage)Message<?>JmsMessagingTemplate. sendAndReceive(Message<?> requestMessage)org.springframework.jms.listener.adapter中Message的使用
返回Message的org.springframework.jms.listener.adapter中的方法 修饰符和类型 方法 说明 protected Message<?>MessagingMessageListenerAdapter. toMessagingMessage(Message jmsMessage)org.springframework.jms.support中Message的使用
参数类型为Message的org.springframework.jms.support中的方法 修饰符和类型 方法 说明 static JmsMessageHeaderAccessorJmsMessageHeaderAccessor. wrap(Message<?> message)Create aJmsMessageHeaderAccessorfrom the headers of an existing message.参数类型为Message的org.springframework.jms.support中的构造器 构造器 说明 JmsMessageHeaderAccessor(Message<?> message)org.springframework.messaging中Message的使用
返回Message的org.springframework.messaging中的方法 修饰符和类型 方法 说明 Message<?>MessagingException. getFailedMessage()Message<?>PollableChannel. receive()Receive a message from this channel, blocking indefinitely if necessary.Message<?>PollableChannel. receive(long timeout)Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.参数类型为Message的org.springframework.messaging中的方法 修饰符和类型 方法 说明 voidMessageHandler. handleMessage(Message<?> message)Handle the given message.reactor.core.publisher.Mono<Void>ReactiveMessageHandler. handleMessage(Message<?> message)Handle the given message.default booleanMessageChannel. send(Message<?> message)Send aMessageto this channel.booleanMessageChannel. send(Message<?> message, long timeout)Send a message, blocking until either the message is accepted or the specified timeout period elapses.参数类型为Message的org.springframework.messaging中的构造器 构造器 说明 MessageDeliveryException(Message<?> undeliveredMessage)MessageDeliveryException(Message<?> undeliveredMessage, String description)MessageDeliveryException(Message<?> undeliveredMessage, String description, Throwable cause)MessageDeliveryException(Message<?> message, Throwable cause)MessageHandlingException(Message<?> failedMessage)MessageHandlingException(Message<?> message, String description)MessageHandlingException(Message<?> message, String description, Throwable cause)MessageHandlingException(Message<?> failedMessage, Throwable cause)MessagingException(Message<?> message)MessagingException(Message<?> message, String description)MessagingException(Message<?> message, String description, Throwable cause)MessagingException(Message<?> message, Throwable cause)org.springframework.messaging.converter中Message的使用
返回Message的org.springframework.messaging.converter中的方法 修饰符和类型 方法 说明 Message<?>AbstractMessageConverter. toMessage(Object payload, MessageHeaders headers)Message<?>AbstractMessageConverter. toMessage(Object payload, MessageHeaders headers, Object conversionHint)Message<?>CompositeMessageConverter. toMessage(Object payload, MessageHeaders headers)Message<?>CompositeMessageConverter. toMessage(Object payload, MessageHeaders headers, Object conversionHint)Message<?>MessageConverter. toMessage(Object payload, MessageHeaders headers)Create aMessagewhose payload is the result of converting the given payload Object to serialized form.Message<?>SimpleMessageConverter. toMessage(Object payload, MessageHeaders headers)Message<?>SmartMessageConverter. toMessage(Object payload, MessageHeaders headers, Object conversionHint)A variant ofMessageConverter.toMessage(Object, MessageHeaders)which takes an extra conversion context as an argument, allowing to take e.g. annotations on a return type into account.参数类型为Message的org.springframework.messaging.converter中的方法 修饰符和类型 方法 说明 protected booleanAbstractMessageConverter. canConvertFrom(Message<?> message, Class<?> targetClass)protected booleanMappingJackson2MessageConverter. canConvertFrom(Message<?> message, Class<?> targetClass)protected booleanMarshallingMessageConverter. canConvertFrom(Message<?> message, Class<?> targetClass)protected ObjectAbstractMessageConverter. convertFromInternal(Message<?> message, Class<?> targetClass, Object conversionHint)Convert the message payload from serialized form to an Object.protected ObjectByteArrayMessageConverter. convertFromInternal(Message<?> message, Class<?> targetClass, Object conversionHint)protected ObjectMappingJackson2MessageConverter. convertFromInternal(Message<?> message, Class<?> targetClass, Object conversionHint)protected ObjectMarshallingMessageConverter. convertFromInternal(Message<?> message, Class<?> targetClass, Object conversionHint)protected ObjectProtobufMessageConverter. convertFromInternal(Message<?> message, Class<?> targetClass, Object conversionHint)protected ObjectStringMessageConverter. convertFromInternal(Message<?> message, Class<?> targetClass, Object conversionHint)ObjectAbstractMessageConverter. fromMessage(Message<?> message, Class<?> targetClass)ObjectAbstractMessageConverter. fromMessage(Message<?> message, Class<?> targetClass, Object conversionHint)ObjectCompositeMessageConverter. fromMessage(Message<?> message, Class<?> targetClass)ObjectCompositeMessageConverter. fromMessage(Message<?> message, Class<?> targetClass, Object conversionHint)ObjectGenericMessageConverter. fromMessage(Message<?> message, Class<?> targetClass)ObjectMessageConverter. fromMessage(Message<?> message, Class<?> targetClass)Convert the payload of aMessagefrom a serialized form to a typed Object of the specified target class.ObjectSimpleMessageConverter. fromMessage(Message<?> message, Class<?> targetClass)ObjectSmartMessageConverter. fromMessage(Message<?> message, Class<?> targetClass, Object conversionHint)A variant ofMessageConverter.fromMessage(Message, Class)which takes an extra conversion context as an argument, allowing to take e.g. annotations on a payload parameter into account.参数类型为Message的org.springframework.messaging.converter中的构造器 构造器 说明 MessageConversionException(Message<?> failedMessage, String description)MessageConversionException(Message<?> failedMessage, String description, Throwable cause)org.springframework.messaging.core中Message的使用
返回Message的org.springframework.messaging.core中的方法 修饰符和类型 方法 说明 protected Message<?>AbstractMessageSendingTemplate. doConvert(Object payload, Map<String,Object> headers, MessagePostProcessor postProcessor)Convert the given Object to serialized form, possibly using aMessageConverter, wrap it as a message with the given headers and apply the given post processor.protected abstract Message<?>AbstractMessageReceivingTemplate. doReceive(D destination)Actually receive a message from the given destination.protected Message<?>GenericMessagingTemplate. doReceive(MessageChannel channel)protected Message<?>GenericMessagingTemplate. doReceive(MessageChannel channel, long timeout)protected abstract Message<?>AbstractMessagingTemplate. doSendAndReceive(D destination, Message<?> requestMessage)protected Message<?>GenericMessagingTemplate. doSendAndReceive(MessageChannel channel, Message<?> requestMessage)Message<?>MessagePostProcessor. postProcessMessage(Message<?> message)Process the given message.Message<?>AbstractDestinationResolvingMessagingTemplate. receive(String destinationName)Message<?>AbstractMessageReceivingTemplate. receive()Message<?>AbstractMessageReceivingTemplate. receive(D destination)Message<?>DestinationResolvingMessageReceivingOperations. receive(String destinationName)Resolve the given destination name and receive a message from it.Message<?>MessageReceivingOperations. receive()Receive a message from a default destination.Message<?>MessageReceivingOperations. receive(D destination)Receive a message from the given destination.Message<?>AbstractDestinationResolvingMessagingTemplate. sendAndReceive(String destinationName, Message<?> requestMessage)Message<?>AbstractMessagingTemplate. sendAndReceive(D destination, Message<?> requestMessage)Message<?>AbstractMessagingTemplate. sendAndReceive(Message<?> requestMessage)Message<?>DestinationResolvingMessageRequestReplyOperations. sendAndReceive(String destinationName, Message<?> requestMessage)Resolve the given destination name to a destination and send the given message, receive a reply and return it.Message<?>MessageRequestReplyOperations. sendAndReceive(D destination, Message<?> requestMessage)Send a request message and receive the reply from the given destination.Message<?>MessageRequestReplyOperations. sendAndReceive(Message<?> requestMessage)Send a request message and receive the reply from a default destination.参数类型为Message的org.springframework.messaging.core中的方法 修饰符和类型 方法 说明 protected <T> TAbstractMessageReceivingTemplate. doConvert(Message<?> message, Class<T> targetClass)Convert from the given message to the given target class.protected abstract voidAbstractMessageSendingTemplate. doSend(D destination, Message<?> message)protected voidGenericMessagingTemplate. doSend(MessageChannel channel, Message<?> message)protected voidGenericMessagingTemplate. doSend(MessageChannel channel, Message<?> message, long timeout)protected abstract Message<?>AbstractMessagingTemplate. doSendAndReceive(D destination, Message<?> requestMessage)protected Message<?>GenericMessagingTemplate. doSendAndReceive(MessageChannel channel, Message<?> requestMessage)Message<?>MessagePostProcessor. postProcessMessage(Message<?> message)Process the given message.voidAbstractDestinationResolvingMessagingTemplate. send(String destinationName, Message<?> message)voidAbstractMessageSendingTemplate. send(D destination, Message<?> message)voidAbstractMessageSendingTemplate. send(Message<?> message)voidDestinationResolvingMessageSendingOperations. send(String destinationName, Message<?> message)Resolve the given destination name to a destination and send a message to it.voidMessageSendingOperations. send(D destination, Message<?> message)Send a message to the given destination.voidMessageSendingOperations. send(Message<?> message)Send a message to a default destination.Message<?>AbstractDestinationResolvingMessagingTemplate. sendAndReceive(String destinationName, Message<?> requestMessage)Message<?>AbstractMessagingTemplate. sendAndReceive(D destination, Message<?> requestMessage)Message<?>AbstractMessagingTemplate. sendAndReceive(Message<?> requestMessage)Message<?>DestinationResolvingMessageRequestReplyOperations. sendAndReceive(String destinationName, Message<?> requestMessage)Resolve the given destination name to a destination and send the given message, receive a reply and return it.Message<?>MessageRequestReplyOperations. sendAndReceive(D destination, Message<?> requestMessage)Send a request message and receive the reply from the given destination.Message<?>MessageRequestReplyOperations. sendAndReceive(Message<?> requestMessage)Send a request message and receive the reply from a default destination.org.springframework.messaging.handler中Message的使用
参数类型为Message的org.springframework.messaging.handler中的方法 修饰符和类型 方法 说明 intCompositeMessageCondition. compareTo(CompositeMessageCondition other, Message<?> message)intDestinationPatternsMessageCondition. compareTo(DestinationPatternsMessageCondition other, Message<?> message)Compare the two conditions based on the destination patterns they contain.intMessageCondition. compareTo(T other, Message<?> message)Compare this condition to another in the context of a specific message.CompositeMessageConditionCompositeMessageCondition. getMatchingCondition(Message<?> message)DestinationPatternsMessageConditionDestinationPatternsMessageCondition. getMatchingCondition(Message<?> message)Check if any of the patterns match the given Message destination and return an instance that is guaranteed to contain matching patterns, sorted viaPathMatcher.getPatternComparator(String).TMessageCondition. getMatchingCondition(Message<?> message)Check if this condition matches the given Message and returns a potentially new condition with content tailored to the current message.org.springframework.messaging.handler.annotation.reactive中Message的使用
参数类型为Message的org.springframework.messaging.handler.annotation.reactive中的方法 修饰符和类型 方法 说明 protected RouteMatcher.RouteMessageMappingMessageHandler. getDestination(Message<?> message)protected Comparator<CompositeMessageCondition>MessageMappingMessageHandler. getMappingComparator(Message<?> message)protected CompositeMessageConditionMessageMappingMessageHandler. getMatchingMapping(CompositeMessageCondition mapping, Message<?> message)protected MimeTypePayloadMethodArgumentResolver. getMimeType(Message<?> message)Return the mime type for the content.protected reactor.core.publisher.Mono<Void>MessageMappingMessageHandler. handleMatch(CompositeMessageCondition mapping, HandlerMethod handlerMethod, Message<?> message)protected abstract voidAbstractNamedValueMethodArgumentResolver. handleMissingValue(String name, MethodParameter parameter, Message<?> message)Invoked when a value is required, butAbstractNamedValueMethodArgumentResolver.resolveArgumentInternal(org.springframework.core.MethodParameter, org.springframework.messaging.Message<?>, java.lang.String)returnednulland there is no default value.protected voidDestinationVariableMethodArgumentResolver. handleMissingValue(String name, MethodParameter parameter, Message<?> message)protected voidHeaderMethodArgumentResolver. handleMissingValue(String headerName, MethodParameter parameter, Message<?> message)reactor.core.publisher.Mono<Object>ContinuationHandlerMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)reactor.core.publisher.Mono<Object>PayloadMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)Decode the content of the given message payload through a compatibleDecoder.protected abstract ObjectAbstractNamedValueMethodArgumentResolver. resolveArgumentInternal(MethodParameter parameter, Message<?> message, String name)Resolves the given parameter type and value name into an argument value.protected ObjectDestinationVariableMethodArgumentResolver. resolveArgumentInternal(MethodParameter parameter, Message<?> message, String name)protected ObjectHeaderMethodArgumentResolver. resolveArgumentInternal(MethodParameter parameter, Message<?> message, String name)ObjectAbstractNamedValueMethodArgumentResolver. resolveArgumentValue(MethodParameter parameter, Message<?> message)ObjectHeadersMethodArgumentResolver. resolveArgumentValue(MethodParameter parameter, Message<?> message)org.springframework.messaging.handler.annotation.support中Message的使用
参数类型为Message的org.springframework.messaging.handler.annotation.support中的方法 修饰符和类型 方法 说明 protected Class<?>MessageMethodArgumentResolver. getPayloadType(MethodParameter parameter, Message<?> message)Resolve the target class to convert the payload to.protected abstract voidAbstractNamedValueMethodArgumentResolver. handleMissingValue(String name, MethodParameter parameter, Message<?> message)Invoked when a value is required, butAbstractNamedValueMethodArgumentResolver.resolveArgumentInternal(org.springframework.core.MethodParameter, org.springframework.messaging.Message<?>, java.lang.String)returnednulland there is no default value.protected voidDestinationVariableMethodArgumentResolver. handleMissingValue(String name, MethodParameter parameter, Message<?> message)protected voidHeaderMethodArgumentResolver. handleMissingValue(String headerName, MethodParameter parameter, Message<?> message)protected voidAbstractNamedValueMethodArgumentResolver. handleResolvedValue(Object arg, String name, MethodParameter parameter, Message<?> message)Invoked after a value is resolved.ObjectAbstractNamedValueMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)ObjectHeadersMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)ObjectMessageMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)ObjectPayloadMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)protected abstract ObjectAbstractNamedValueMethodArgumentResolver. resolveArgumentInternal(MethodParameter parameter, Message<?> message, String name)Resolves the given parameter type and value name into an argument value.protected ObjectDestinationVariableMethodArgumentResolver. resolveArgumentInternal(MethodParameter parameter, Message<?> message, String name)protected ObjectHeaderMethodArgumentResolver. resolveArgumentInternal(MethodParameter parameter, Message<?> message, String name)protected Class<?>PayloadMethodArgumentResolver. resolveTargetClass(MethodParameter parameter, Message<?> message)Resolve the target class to convert the payload to.protected voidPayloadMethodArgumentResolver. validate(Message<?> message, MethodParameter parameter, Object target)Validate the payload if applicable.参数类型为Message的org.springframework.messaging.handler.annotation.support中的构造器 构造器 说明 MethodArgumentNotValidException(Message<?> message, MethodParameter parameter)Create a new instance with the invalidMethodParameter.MethodArgumentNotValidException(Message<?> message, MethodParameter parameter, BindingResult bindingResult)Create a new instance with the invalidMethodParameterand aBindingResult.MethodArgumentTypeMismatchException(Message<?> message, MethodParameter parameter, String description)org.springframework.messaging.handler.invocation中Message的使用
参数类型为Message的org.springframework.messaging.handler.invocation中的方法 修饰符和类型 方法 说明 protected abstract StringAbstractMethodMessageHandler. getDestination(Message<?> message)protected abstract Comparator<T>AbstractMethodMessageHandler. getMappingComparator(Message<?> message)Return a comparator for sorting matching mappings.protected abstract TAbstractMethodMessageHandler. getMatchingMapping(T mapping, Message<?> message)Check if a mapping matches the current message and return a possibly new mapping with conditions relevant to the current request.protected Object[]InvocableHandlerMethod. getMethodArgumentValues(Message<?> message, Object... providedArgs)Get the method argument values for the current message, checking the provided argument values and falling back to the configured argument resolvers.protected voidAbstractMethodMessageHandler. handleMatch(T mapping, HandlerMethod handlerMethod, String lookupDestination, Message<?> message)voidAbstractMethodMessageHandler. handleMessage(Message<?> message)protected voidAbstractMethodMessageHandler. handleMessageInternal(Message<?> message, String lookupDestination)protected voidAbstractMethodMessageHandler. handleNoMatch(Set<T> ts, String lookupDestination, Message<?> message)voidAbstractAsyncReturnValueHandler. handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)voidHandlerMethodReturnValueHandler. handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)Handle the given return value.voidHandlerMethodReturnValueHandlerComposite. handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)ObjectInvocableHandlerMethod. invoke(Message<?> message, Object... providedArgs)Invoke the method after resolving its argument values in the context of the given message.protected voidAbstractMethodMessageHandler. processHandlerMethodException(HandlerMethod handlerMethod, Exception exception, Message<?> message)ObjectHandlerMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)Resolves a method parameter into an argument value from a given message.ObjectHandlerMethodArgumentResolverComposite. resolveArgument(MethodParameter parameter, Message<?> message)Iterate over registeredHandlerMethodArgumentResolversand invoke the one that supports it.参数类型为Message的org.springframework.messaging.handler.invocation中的构造器 构造器 说明 MethodArgumentResolutionException(Message<?> message, MethodParameter parameter)Create a new instance providing the invalidMethodParameter.MethodArgumentResolutionException(Message<?> message, MethodParameter parameter, String description)Create a new instance providing the invalidMethodParameterand a prepared description.MethodArgumentResolutionException(Message<?> message, MethodParameter parameter, String description, Throwable cause)Create a new instance providing the invalidMethodParameter, prepared description, and a cause.org.springframework.messaging.handler.invocation.reactive中Message的使用
参数类型为Message的org.springframework.messaging.handler.invocation.reactive中的方法 修饰符和类型 方法 说明 protected abstract RouteMatcher.RouteAbstractMethodMessageHandler. getDestination(Message<?> message)Extract the destination from the given message.protected abstract Comparator<T>AbstractMethodMessageHandler. getMappingComparator(Message<?> message)Return a comparator for sorting matching mappings.protected abstract TAbstractMethodMessageHandler. getMatchingMapping(T mapping, Message<?> message)Check if a mapping matches the current message and return a possibly new mapping with conditions relevant to the current request.protected abstract reactor.core.publisher.Mono<Void>AbstractEncoderMethodReturnValueHandler. handleEncodedContent(reactor.core.publisher.Flux<DataBuffer> encodedContent, MethodParameter returnType, Message<?> message)Subclasses implement this method to handle encoded values in some way such as creating and sending messages.protected reactor.core.publisher.Mono<Void>AbstractMethodMessageHandler. handleMatch(T mapping, HandlerMethod handlerMethod, Message<?> message)reactor.core.publisher.Mono<Void>AbstractMethodMessageHandler. handleMessage(Message<?> message)protected abstract reactor.core.publisher.Mono<Void>AbstractEncoderMethodReturnValueHandler. handleNoContent(MethodParameter returnType, Message<?> message)Invoked for anullreturn value, which could mean a void method or method returning an async type parameterized by void.protected voidAbstractMethodMessageHandler. handleNoMatch(RouteMatcher.Route destination, Message<?> message)Invoked when no matching handler is found.reactor.core.publisher.Mono<Void>AbstractEncoderMethodReturnValueHandler. handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)reactor.core.publisher.Mono<Void>HandlerMethodReturnValueHandler. handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)Handle the given return value.reactor.core.publisher.Mono<Void>HandlerMethodReturnValueHandlerComposite. handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)reactor.core.publisher.Mono<Object>InvocableHandlerMethod. invoke(Message<?> message, Object... providedArgs)Invoke the method for the given exchange.reactor.core.publisher.Mono<Object>HandlerMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)Resolves a method parameter into an argument value from a given message.reactor.core.publisher.Mono<Object>HandlerMethodArgumentResolverComposite. resolveArgument(MethodParameter parameter, Message<?> message)Iterate over registeredHandlerMethodArgumentResolversand invoke the one that supports it.default reactor.core.publisher.Mono<Object>SyncHandlerMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)Resolves a method parameter into an argument value from a given message.ObjectSyncHandlerMethodArgumentResolver. resolveArgumentValue(MethodParameter parameter, Message<?> message)Resolve the value for the method parameter synchronously.org.springframework.messaging.rsocket.annotation.support中Message的使用
参数类型为Message的org.springframework.messaging.rsocket.annotation.support中的方法 修饰符和类型 方法 说明 intRSocketFrameTypeMessageCondition. compareTo(RSocketFrameTypeMessageCondition other, Message<?> message)static io.rsocket.frame.FrameTypeRSocketFrameTypeMessageCondition. getFrameType(Message<?> message)Find the RSocket frame type in the message headers.RSocketFrameTypeMessageConditionRSocketFrameTypeMessageCondition. getMatchingCondition(Message<?> message)protected reactor.core.publisher.Mono<Void>RSocketPayloadReturnValueHandler. handleEncodedContent(reactor.core.publisher.Flux<DataBuffer> encodedContent, MethodParameter returnType, Message<?> message)protected reactor.core.publisher.Mono<Void>RSocketPayloadReturnValueHandler. handleNoContent(MethodParameter returnType, Message<?> message)protected voidRSocketMessageHandler. handleNoMatch(RouteMatcher.Route destination, Message<?> message)reactor.core.publisher.Mono<Object>RSocketRequesterMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)org.springframework.messaging.simp中Message的使用
参数类型为Message的org.springframework.messaging.simp中的方法 修饰符和类型 方法 说明 intSimpMessageMappingInfo. compareTo(SimpMessageMappingInfo other, Message<?> message)intSimpMessageTypeMessageCondition. compareTo(SimpMessageTypeMessageCondition other, Message<?> message)protected MessageHeaderAccessorSimpMessageHeaderAccessor. createAccessor(Message<?> message)protected voidSimpMessagingTemplate. doSend(String destination, Message<?> message)static SimpAttributesSimpAttributes. fromMessage(Message<?> message)Extract the SiMP session attributes from the given message and wrap them in aSimpAttributesinstance.SimpMessageMappingInfoSimpMessageMappingInfo. getMatchingCondition(Message<?> message)SimpMessageTypeMessageConditionSimpMessageTypeMessageCondition. getMatchingCondition(Message<?> message)voidSimpMessagingTemplate. send(Message<?> message)If the headers of the given message already contain aSimpMessageHeaderAccessor#DESTINATION_HEADERthen the message is sent without further changes.static voidSimpAttributesContextHolder. setAttributesFromMessage(Message<?> message)Extract the SiMP session attributes from the given message, wrap them in aSimpAttributesinstance and bind it to the current thread.static SimpMessageHeaderAccessorSimpMessageHeaderAccessor. wrap(Message<?> message)Create an instance from the payload and headers of the given Message.参数类型为Message的org.springframework.messaging.simp中的构造器 构造器 说明 SimpMessageHeaderAccessor(Message<?> message)A constructor for accessing and modifying existing message headers.org.springframework.messaging.simp.annotation.support中Message的使用
参数类型为Message的org.springframework.messaging.simp.annotation.support中的方法 修饰符和类型 方法 说明 protected StringSimpAnnotationMethodMessageHandler. getDestination(Message<?> message)protected Comparator<SimpMessageMappingInfo>SimpAnnotationMethodMessageHandler. getMappingComparator(Message<?> message)protected SimpMessageMappingInfoSimpAnnotationMethodMessageHandler. getMatchingMapping(SimpMessageMappingInfo mapping, Message<?> message)protected String[]SendToMethodReturnValueHandler. getTargetDestinations(Annotation annotation, Message<?> message, String defaultPrefix)protected StringSendToMethodReturnValueHandler. getUserName(Message<?> message, MessageHeaders headers)protected voidSimpAnnotationMethodMessageHandler. handleMatch(SimpMessageMappingInfo mapping, HandlerMethod handlerMethod, String lookupDestination, Message<?> message)voidSendToMethodReturnValueHandler. handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)voidSubscriptionMethodReturnValueHandler. handleReturnValue(Object returnValue, MethodParameter returnType, Message<?> message)ObjectPrincipalMethodArgumentResolver. resolveArgument(MethodParameter parameter, Message<?> message)参数类型为Message的org.springframework.messaging.simp.annotation.support中的构造器 构造器 说明 MissingSessionUserException(Message<?> message)org.springframework.messaging.simp.broker中Message的使用
参数类型为Message的org.springframework.messaging.simp.broker中的方法 修饰符和类型 方法 说明 protected abstract voidAbstractSubscriptionRegistry. addSubscriptionInternal(String sessionId, String subscriptionId, String destination, Message<?> message)protected voidDefaultSubscriptionRegistry. addSubscriptionInternal(String sessionId, String subsId, String destination, Message<?> message)MultiValueMap<String,String>AbstractSubscriptionRegistry. findSubscriptions(Message<?> message)MultiValueMap<String,String>SubscriptionRegistry. findSubscriptions(Message<?> message)Find all subscriptions that should receive the given message.protected abstract MultiValueMap<String,String>AbstractSubscriptionRegistry. findSubscriptionsInternal(String destination, Message<?> message)protected MultiValueMap<String,String>DefaultSubscriptionRegistry. findSubscriptionsInternal(String destination, Message<?> message)voidAbstractBrokerMessageHandler. handleMessage(Message<?> message)protected abstract voidAbstractBrokerMessageHandler. handleMessageInternal(Message<?> message)protected voidSimpleBrokerMessageHandler. handleMessageInternal(Message<?> message)voidAbstractSubscriptionRegistry. registerSubscription(Message<?> message)voidSubscriptionRegistry. registerSubscription(Message<?> subscribeMessage)Register a subscription represented by the given message.protected abstract voidAbstractSubscriptionRegistry. removeSubscriptionInternal(String sessionId, String subscriptionId, Message<?> message)protected voidDefaultSubscriptionRegistry. removeSubscriptionInternal(String sessionId, String subsId, Message<?> message)protected voidSimpleBrokerMessageHandler. sendMessageToSubscribers(String destination, Message<?> message)voidAbstractSubscriptionRegistry. unregisterSubscription(Message<?> message)voidSubscriptionRegistry. unregisterSubscription(Message<?> unsubscribeMessage)Unregister a subscription.org.springframework.messaging.simp.stomp中Message的使用
返回变量类型为Message的类型的org.springframework.messaging.simp.stomp中的方法 修饰符和类型 方法 说明 List<Message<byte[]>>BufferingStompDecoder. decode(ByteBuffer newBuffer)Decodes one or more STOMP frames from the givenByteBufferinto a list ofMessages.List<Message<byte[]>>StompDecoder. decode(ByteBuffer byteBuffer)Decodes one or more STOMP frames from the givenByteBufferinto a list ofMessages.List<Message<byte[]>>StompDecoder. decode(ByteBuffer byteBuffer, MultiValueMap<String,String> partialMessageHeaders)Decodes one or more STOMP frames from the givenbufferand returns a list ofMessages.protected List<Message<byte[]>>StompReactorNettyCodec. decodeInternal(ByteBuffer nioBuffer)参数类型为Message的org.springframework.messaging.simp.stomp中的方法 修饰符和类型 方法 说明 protected MessageHeaderAccessorStompHeaderAccessor. createAccessor(Message<?> message)byte[]StompEncoder. encode(Message<byte[]> message)Encodes the given STOMPmessageinto abyte[].protected ByteBufferStompReactorNettyCodec. encodeInternal(Message<byte[]> message)voidDefaultStompSession. handleMessage(Message<byte[]> message)protected voidStompBrokerRelayMessageHandler. handleMessageInternal(Message<?> message)static StompHeaderAccessorStompHeaderAccessor. wrap(Message<?> message)Create an instance from the payload and headers of the given Message.org.springframework.messaging.simp.user中Message的使用
参数类型为Message的org.springframework.messaging.simp.user中的方法 修饰符和类型 方法 说明 voidUserDestinationMessageHandler. handleMessage(Message<?> message)voidUserRegistryMessageHandler. handleMessage(Message<?> message)UserDestinationResultDefaultUserDestinationResolver. resolveDestination(Message<?> message)UserDestinationResultUserDestinationResolver. resolveDestination(Message<?> message)Resolve the given message with a user destination to one or more messages with actual destinations, one for each active user session.org.springframework.messaging.support中Message的使用
实现Message的org.springframework.messaging.support中的类 修饰符和类型 类 说明 classErrorMessageAGenericMessagewith aThrowablepayload.classGenericMessage<T>An implementation ofMessagewith a generic payload.返回Message的org.springframework.messaging.support中的方法 修饰符和类型 方法 说明 Message<?>AbstractMessageChannel.ChannelInterceptorChain. applyPostReceive(Message<?> message, MessageChannel channel)Message<?>AbstractMessageChannel.ChannelInterceptorChain. applyPreSend(Message<?> message, MessageChannel channel)default Message<?>ExecutorChannelInterceptor. beforeHandle(Message<?> message, MessageChannel channel, MessageHandler handler)Invoked inside theRunnablesubmitted to the Executor just before calling the target MessageHandler to handle the message.Message<T>MessageBuilder. build()static <T> Message<T>MessageBuilder. createMessage(T payload, MessageHeaders messageHeaders)A shortcut factory method for creating a message with the given payload andMessageHeaders.Message<?>MessageHandlingRunnable. getMessage()Return the Message that will be handled.Message<?>ErrorMessage. getOriginalMessage()Return the original message (if available) at the point in the stack where the ErrorMessage was created.default Message<?>ChannelInterceptor. postReceive(Message<?> message, MessageChannel channel)Invoked immediately after a Message has been retrieved but before it is returned to the caller.Message<?>ChannelInterceptorAdapter. postReceive(Message<?> message, MessageChannel channel)已过时。default Message<?>ChannelInterceptor. preSend(Message<?> message, MessageChannel channel)Invoked before the Message is actually sent to the channel.Message<?>ChannelInterceptorAdapter. preSend(Message<?> message, MessageChannel channel)已过时。Message<?>ImmutableMessageChannelInterceptor. preSend(Message<?> message, MessageChannel channel)参数类型为Message的org.springframework.messaging.support中的方法 修饰符和类型 方法 说明 default voidExecutorChannelInterceptor. afterMessageHandled(Message<?> message, MessageChannel channel, MessageHandler handler, Exception ex)Invoked inside theRunnablesubmitted to the Executor after calling the target MessageHandler regardless of the outcome (i.e.default voidChannelInterceptor. afterReceiveCompletion(Message<?> message, MessageChannel channel, Exception ex)Invoked after the completion of a receive regardless of any exception that have been raised thus allowing for proper resource cleanup.voidChannelInterceptorAdapter. afterReceiveCompletion(Message<?> message, MessageChannel channel, Exception ex)已过时。default voidChannelInterceptor. afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, Exception ex)Invoked after the completion of a send regardless of any exception that have been raised thus allowing for proper resource cleanup.voidChannelInterceptorAdapter. afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, Exception ex)已过时。Message<?>AbstractMessageChannel.ChannelInterceptorChain. applyPostReceive(Message<?> message, MessageChannel channel)voidAbstractMessageChannel.ChannelInterceptorChain. applyPostSend(Message<?> message, MessageChannel channel, boolean sent)Message<?>AbstractMessageChannel.ChannelInterceptorChain. applyPreSend(Message<?> message, MessageChannel channel)default Message<?>ExecutorChannelInterceptor. beforeHandle(Message<?> message, MessageChannel channel, MessageHandler handler)Invoked inside theRunnablesubmitted to the Executor just before calling the target MessageHandler to handle the message.protected MessageHeaderAccessorMessageHeaderAccessor. createAccessor(Message<?> message)Build a 'nested' accessor for the given message.static <T> MessageBuilder<T>MessageBuilder. fromMessage(Message<T> message)Create a builder for a newMessageinstance pre-populated with all of the headers copied from the provided message.static MessageHeaderAccessorMessageHeaderAccessor. getAccessor(Message<?> message)Return the originalMessageHeaderAccessorused to create the headers of the givenMessage, ornullif that's not available or if its type does not match the required type.static <T extends MessageHeaderAccessor>
TMessageHeaderAccessor. getAccessor(Message<?> message, Class<T> requiredType)Return the originalMessageHeaderAccessorused to create the headers of the givenMessage, ornullif that's not available or if its type does not match the required type.static MessageHeaderAccessorMessageHeaderAccessor. getMutableAccessor(Message<?> message)Return a mutableMessageHeaderAccessorfor the given message attempting to match the type of accessor used to create the message headers, or otherwise wrapping the message with aMessageHeaderAccessorinstance.default Message<?>ChannelInterceptor. postReceive(Message<?> message, MessageChannel channel)Invoked immediately after a Message has been retrieved but before it is returned to the caller.Message<?>ChannelInterceptorAdapter. postReceive(Message<?> message, MessageChannel channel)已过时。default voidChannelInterceptor. postSend(Message<?> message, MessageChannel channel, boolean sent)Invoked immediately after the send invocation.voidChannelInterceptorAdapter. postSend(Message<?> message, MessageChannel channel, boolean sent)已过时。default Message<?>ChannelInterceptor. preSend(Message<?> message, MessageChannel channel)Invoked before the Message is actually sent to the channel.Message<?>ChannelInterceptorAdapter. preSend(Message<?> message, MessageChannel channel)已过时。Message<?>ImmutableMessageChannelInterceptor. preSend(Message<?> message, MessageChannel channel)booleanAbstractMessageChannel. send(Message<?> message)booleanAbstractMessageChannel. send(Message<?> message, long timeout)protected abstract booleanAbstractMessageChannel. sendInternal(Message<?> message, long timeout)booleanExecutorSubscribableChannel. sendInternal(Message<?> message, long timeout)voidAbstractMessageChannel.ChannelInterceptorChain. triggerAfterReceiveCompletion(Message<?> message, MessageChannel channel, Exception ex)voidAbstractMessageChannel.ChannelInterceptorChain. triggerAfterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, Exception ex)参数类型为Message的org.springframework.messaging.support中的构造器 构造器 说明 ErrorMessage(Throwable payload, Map<String,Object> headers, Message<?> originalMessage)Create a new message with the given payload, headers and original message.ErrorMessage(Throwable payload, Message<?> originalMessage)Create a new message with the given payload and original message.ErrorMessage(Throwable payload, MessageHeaders headers, Message<?> originalMessage)Create a new message with the payload,MessageHeadersand original message.MessageHeaderAccessor(Message<?> message)A constructor accepting the headers of an existing message to copy.NativeMessageHeaderAccessor(Message<?> message)Protected constructor that copies headers from another message.org.springframework.messaging.tcp中Message的使用
参数类型为Message的org.springframework.messaging.tcp中的方法 修饰符和类型 方法 说明 voidTcpConnectionHandler. handleMessage(Message<P> message)Handle a message received from the remote host.ListenableFuture<Void>TcpConnection. send(Message<P> message)Send the given message.org.springframework.messaging.tcp.reactor中Message的使用
返回变量类型为Message的类型的org.springframework.messaging.tcp.reactor中的方法 修饰符和类型 方法 说明 Collection<Message<P>>AbstractNioBufferReactorNettyCodec. decode(io.netty.buffer.ByteBuf inputBuffer)Collection<Message<P>>ReactorNettyCodec. decode(io.netty.buffer.ByteBuf inputBuffer)Decode the inputByteBufinto one or moreMessages.protected abstract List<Message<P>>AbstractNioBufferReactorNettyCodec. decodeInternal(ByteBuffer nioBuffer)参数类型为Message的org.springframework.messaging.tcp.reactor中的方法 修饰符和类型 方法 说明 voidAbstractNioBufferReactorNettyCodec. encode(Message<P> message, io.netty.buffer.ByteBuf outputBuffer)voidReactorNettyCodec. encode(Message<P> message, io.netty.buffer.ByteBuf outputBuffer)Encode the givenMessageto the outputByteBuf.protected abstract ByteBufferAbstractNioBufferReactorNettyCodec. encodeInternal(Message<P> message)ListenableFuture<Void>ReactorNettyTcpConnection. send(Message<P> message)org.springframework.web.socket.messaging中Message的使用
返回Message的org.springframework.web.socket.messaging中的方法 修饰符和类型 方法 说明 Message<byte[]>AbstractSubProtocolEvent. getMessage()Return the Message associated with the event.Message<byte[]>StompSubProtocolErrorHandler. handleClientMessageProcessingError(Message<byte[]> clientMessage, Throwable ex)Message<P>SubProtocolErrorHandler. handleClientMessageProcessingError(Message<P> clientMessage, Throwable ex)Handle errors thrown while processing client messages providing an opportunity to prepare the error message or to prevent one from being sent.Message<byte[]>StompSubProtocolErrorHandler. handleErrorMessageToClient(Message<byte[]> errorMessage)Message<P>SubProtocolErrorHandler. handleErrorMessageToClient(Message<P> errorMessage)Handle errors sent from the server side to clients, e.g. errors from the"broke relay"because connectivity failed or the external broker sent an error message, etc.protected Message<byte[]>StompSubProtocolErrorHandler. handleInternal(StompHeaderAccessor errorHeaderAccessor, byte[] errorPayload, Throwable cause, StompHeaderAccessor clientHeaderAccessor)参数类型为Message的org.springframework.web.socket.messaging中的方法 修饰符和类型 方法 说明 Message<byte[]>StompSubProtocolErrorHandler. handleClientMessageProcessingError(Message<byte[]> clientMessage, Throwable ex)Message<P>SubProtocolErrorHandler. handleClientMessageProcessingError(Message<P> clientMessage, Throwable ex)Handle errors thrown while processing client messages providing an opportunity to prepare the error message or to prevent one from being sent.Message<byte[]>StompSubProtocolErrorHandler. handleErrorMessageToClient(Message<byte[]> errorMessage)Message<P>SubProtocolErrorHandler. handleErrorMessageToClient(Message<P> errorMessage)Handle errors sent from the server side to clients, e.g. errors from the"broke relay"because connectivity failed or the external broker sent an error message, etc.voidSubProtocolWebSocketHandler. handleMessage(Message<?> message)Handle an outbound Spring Message to a WebSocket client.voidStompSubProtocolHandler. handleMessageToClient(WebSocketSession session, Message<?> message)Handle STOMP messages going back out to WebSocket clients.voidSubProtocolHandler. handleMessageToClient(WebSocketSession session, Message<?> message)Handle the givenMessageto the client associated with the given WebSocket session.StringStompSubProtocolHandler. resolveSessionId(Message<?> message)StringSubProtocolHandler. resolveSessionId(Message<?> message)Resolve the session id from the given message or returnnull.protected StompHeaderAccessorStompSubProtocolHandler. toMutableAccessor(StompHeaderAccessor headerAccessor, Message<?> message)参数类型为Message的org.springframework.web.socket.messaging中的构造器 构造器 说明 AbstractSubProtocolEvent(Object source, Message<byte[]> message)Create a new AbstractSubProtocolEvent.AbstractSubProtocolEvent(Object source, Message<byte[]> message, Principal user)Create a new AbstractSubProtocolEvent.SessionConnectedEvent(Object source, Message<byte[]> message)Create a new SessionConnectedEvent.SessionConnectedEvent(Object source, Message<byte[]> message, Principal user)SessionConnectEvent(Object source, Message<byte[]> message)Create a new SessionConnectEvent.SessionConnectEvent(Object source, Message<byte[]> message, Principal user)SessionDisconnectEvent(Object source, Message<byte[]> message, String sessionId, CloseStatus closeStatus)Create a new SessionDisconnectEvent.SessionDisconnectEvent(Object source, Message<byte[]> message, String sessionId, CloseStatus closeStatus, Principal user)Create a new SessionDisconnectEvent.SessionSubscribeEvent(Object source, Message<byte[]> message)SessionSubscribeEvent(Object source, Message<byte[]> message, Principal user)SessionUnsubscribeEvent(Object source, Message<byte[]> message)SessionUnsubscribeEvent(Object source, Message<byte[]> message, Principal user)