parent
bca104798b
commit
82ca27e46f
|
|
@ -39,7 +39,7 @@ public interface MessageChannel {
|
||||||
* <p>This method may block indefinitely, depending on the implementation.
|
* <p>This method may block indefinitely, depending on the implementation.
|
||||||
* To provide a maximum wait time, use {@link #send(Message, long)}.
|
* To provide a maximum wait time, use {@link #send(Message, long)}.
|
||||||
* @param message the message to send
|
* @param message the message to send
|
||||||
* @return whether or not the message was sent
|
* @return whether the message was sent
|
||||||
*/
|
*/
|
||||||
default boolean send(Message<?> message) {
|
default boolean send(Message<?> message) {
|
||||||
return send(message, INDEFINITE_TIMEOUT);
|
return send(message, INDEFINITE_TIMEOUT);
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ public abstract class AbstractMessageConverter implements SmartMessageConverter
|
||||||
* Whether this converter should convert messages for which no content type
|
* Whether this converter should convert messages for which no content type
|
||||||
* could be resolved through the configured
|
* could be resolved through the configured
|
||||||
* {@link org.springframework.messaging.converter.ContentTypeResolver}.
|
* {@link org.springframework.messaging.converter.ContentTypeResolver}.
|
||||||
* <p>A converter can configured to be strict only when a
|
* <p>A converter can be configured to be strict only when a
|
||||||
* {@link #setContentTypeResolver contentTypeResolver} is configured and the
|
* {@link #setContentTypeResolver contentTypeResolver} is configured and the
|
||||||
* list of {@link #getSupportedMimeTypes() supportedMimeTypes} is not be empty.
|
* list of {@link #getSupportedMimeTypes() supportedMimeTypes} is not be empty.
|
||||||
* <p>When this flag is set to {@code true}, {@link #supportsMimeType(MessageHeaders)}
|
* <p>When this flag is set to {@code true}, {@link #supportsMimeType(MessageHeaders)}
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ public abstract class AbstractNamedValueMethodArgumentResolver implements SyncHa
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked when a value is required, but {@link #resolveArgumentInternal}
|
* Invoked when a value is required, but {@link #resolveArgumentInternal}
|
||||||
* returned {@code null} and there is no default value. Sub-classes can
|
* returned {@code null} and there is no default value. Subclasses can
|
||||||
* throw an appropriate exception for this case.
|
* throw an appropriate exception for this case.
|
||||||
* @param name the name for the value
|
* @param name the name for the value
|
||||||
* @param parameter the target method parameter
|
* @param parameter the target method parameter
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ import org.springframework.validation.Validator;
|
||||||
/**
|
/**
|
||||||
* Extension of {@link AbstractMethodMessageHandler} for reactive, non-blocking
|
* Extension of {@link AbstractMethodMessageHandler} for reactive, non-blocking
|
||||||
* handling of messages via {@link MessageMapping @MessageMapping} methods.
|
* handling of messages via {@link MessageMapping @MessageMapping} methods.
|
||||||
* By default such methods are detected in {@code @Controller} Spring beans but
|
* By default, such methods are detected in {@code @Controller} Spring beans but
|
||||||
* that can be changed via {@link #setHandlerPredicate(Predicate)}.
|
* that can be changed via {@link #setHandlerPredicate(Predicate)}.
|
||||||
*
|
*
|
||||||
* <p>Payloads for incoming messages are decoded through the configured
|
* <p>Payloads for incoming messages are decoded through the configured
|
||||||
|
|
@ -74,7 +74,7 @@ import org.springframework.validation.Validator;
|
||||||
*
|
*
|
||||||
* <p>There is no default handling for return values but
|
* <p>There is no default handling for return values but
|
||||||
* {@link #setReturnValueHandlerConfigurer} can be used to configure custom
|
* {@link #setReturnValueHandlerConfigurer} can be used to configure custom
|
||||||
* return value handlers. Sub-classes may also override
|
* return value handlers. Subclasses may also override
|
||||||
* {@link #initReturnValueHandlers()} to set up default return value handlers.
|
* {@link #initReturnValueHandlers()} to set up default return value handlers.
|
||||||
*
|
*
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ public abstract class AbstractNamedValueMethodArgumentResolver implements Handle
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked when a value is required, but {@link #resolveArgumentInternal}
|
* Invoked when a value is required, but {@link #resolveArgumentInternal}
|
||||||
* returned {@code null} and there is no default value. Sub-classes can
|
* returned {@code null} and there is no default value. Subclasses can
|
||||||
* throw an appropriate exception for this case.
|
* throw an appropriate exception for this case.
|
||||||
* @param name the name for the value
|
* @param name the name for the value
|
||||||
* @param parameter the target method parameter
|
* @param parameter the target method parameter
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import org.springframework.messaging.handler.annotation.MessageExceptionHandler;
|
||||||
import org.springframework.messaging.handler.invocation.AbstractExceptionHandlerMethodResolver;
|
import org.springframework.messaging.handler.invocation.AbstractExceptionHandlerMethodResolver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A sub-class of {@link AbstractExceptionHandlerMethodResolver} that looks for
|
* A subclass of {@link AbstractExceptionHandlerMethodResolver} that looks for
|
||||||
* {@link MessageExceptionHandler}-annotated methods in a given class. The actual
|
* {@link MessageExceptionHandler}-annotated methods in a given class. The actual
|
||||||
* exception types handled are extracted either from the annotation, if present,
|
* exception types handled are extracted either from the annotation, if present,
|
||||||
* or from the method signature as a fallback option.
|
* or from the method signature as a fallback option.
|
||||||
|
|
|
||||||
|
|
@ -67,8 +67,8 @@ public abstract class AbstractExceptionHandlerMethodResolver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract the exceptions this method handles. This implementation looks for
|
* Extract the exceptions this method handles. This implementation looks for
|
||||||
* sub-classes of Throwable in the method signature.
|
* subclasses of Throwable in the method signature.
|
||||||
* <p>The method is static to ensure safe use from sub-class constructors.
|
* <p>The method is static to ensure safe use from subclass constructors.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected static List<Class<? extends Throwable>> getExceptionsFromMethodSignature(Method method) {
|
protected static List<Class<? extends Throwable>> getExceptionsFromMethodSignature(Method method) {
|
||||||
|
|
|
||||||
|
|
@ -340,7 +340,7 @@ public abstract class AbstractMethodMessageHandler<T>
|
||||||
/**
|
/**
|
||||||
* Provide the mapping for a handler method.
|
* Provide the mapping for a handler method.
|
||||||
* @param method the method to provide a mapping for
|
* @param method the method to provide a mapping for
|
||||||
* @param handlerType the handler type, possibly a sub-type of the method's declaring class
|
* @param handlerType the handler type, possibly a subtype of the method's declaring class
|
||||||
* @return the mapping, or {@code null} if the method is not mapped
|
* @return the mapping, or {@code null} if the method is not mapped
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} to use to use for resolving method argument values.
|
* Set {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} to use for resolving method argument values.
|
||||||
*/
|
*/
|
||||||
public void setMessageMethodArgumentResolvers(HandlerMethodArgumentResolverComposite argumentResolvers) {
|
public void setMessageMethodArgumentResolvers(HandlerMethodArgumentResolverComposite argumentResolvers) {
|
||||||
this.resolvers = argumentResolvers;
|
this.resolvers = argumentResolvers;
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ public abstract class AbstractMethodMessageHandler<T>
|
||||||
/**
|
/**
|
||||||
* Configure a predicate for selecting which Spring beans to check for the
|
* Configure a predicate for selecting which Spring beans to check for the
|
||||||
* presence of message handler methods.
|
* presence of message handler methods.
|
||||||
* <p>This is not set by default. However sub-classes may initialize it to
|
* <p>This is not set by default. However, subclasses may initialize it to
|
||||||
* some default strategy (e.g. {@code @Controller} classes).
|
* some default strategy (e.g. {@code @Controller} classes).
|
||||||
* @see #setHandlers(List)
|
* @see #setHandlers(List)
|
||||||
*/
|
*/
|
||||||
|
|
@ -235,7 +235,7 @@ public abstract class AbstractMethodMessageHandler<T>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the argument resolvers initialized during {@link #afterPropertiesSet()}.
|
* Return the argument resolvers initialized during {@link #afterPropertiesSet()}.
|
||||||
* Primarily for internal use in sub-classes.
|
* Primarily for internal use in subclasses.
|
||||||
* @since 5.2.2
|
* @since 5.2.2
|
||||||
*/
|
*/
|
||||||
protected HandlerMethodArgumentResolverComposite getArgumentResolvers() {
|
protected HandlerMethodArgumentResolverComposite getArgumentResolvers() {
|
||||||
|
|
@ -362,7 +362,7 @@ public abstract class AbstractMethodMessageHandler<T>
|
||||||
/**
|
/**
|
||||||
* Obtain the mapping for the given method, if any.
|
* Obtain the mapping for the given method, if any.
|
||||||
* @param method the method to check
|
* @param method the method to check
|
||||||
* @param handlerType the handler type, possibly a sub-type of the method's declaring class
|
* @param handlerType the handler type, possibly a subtype of the method's declaring class
|
||||||
* @return the mapping, or {@code null} if the method is not mapped
|
* @return the mapping, or {@code null} if the method is not mapped
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
@ -418,7 +418,7 @@ public abstract class AbstractMethodMessageHandler<T>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is invoked just before mappings are added. It allows
|
* This method is invoked just before mappings are added. It allows
|
||||||
* sub-classes to update the mapping with the {@link HandlerMethod} in mind.
|
* subclasses to update the mapping with the {@link HandlerMethod} in mind.
|
||||||
* This can be useful when the method signature is used to refine the
|
* This can be useful when the method signature is used to refine the
|
||||||
* mapping, e.g. based on the cardinality of input and output.
|
* mapping, e.g. based on the cardinality of input and output.
|
||||||
* <p>By default this method returns the mapping that is passed in.
|
* <p>By default this method returns the mapping that is passed in.
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure the argument resolvers to use to use for resolving method
|
* Configure the argument resolvers to use for resolving method
|
||||||
* argument values against a {@code ServerWebExchange}.
|
* argument values against a {@code ServerWebExchange}.
|
||||||
*/
|
*/
|
||||||
public void setArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
|
public void setArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ public interface RSocketRequester extends Disposable {
|
||||||
* If a formatted variable contains a "." it is replaced with the escape
|
* If a formatted variable contains a "." it is replaced with the escape
|
||||||
* sequence "%2E" to avoid treating it as separator by the responder .
|
* sequence "%2E" to avoid treating it as separator by the responder .
|
||||||
* <p>If the connection is set to use composite metadata, the route is
|
* <p>If the connection is set to use composite metadata, the route is
|
||||||
* encoded as {@code "message/x.rsocket.routing.v0"}. Otherwise the route
|
* encoded as {@code "message/x.rsocket.routing.v0"}. Otherwise, the route
|
||||||
* is encoded according to the mime type for the connection.
|
* is encoded according to the mime type for the connection.
|
||||||
* @param route the route expressing a remote handler mapping
|
* @param route the route expressing a remote handler mapping
|
||||||
* @param routeVars variables to be expanded into the route template
|
* @param routeVars variables to be expanded into the route template
|
||||||
|
|
@ -105,7 +105,7 @@ public interface RSocketRequester extends Disposable {
|
||||||
* to a {@link Publisher} via {@link ReactiveAdapterRegistry}.
|
* to a {@link Publisher} via {@link ReactiveAdapterRegistry}.
|
||||||
* @param metadata the metadata value to encode
|
* @param metadata the metadata value to encode
|
||||||
* @param mimeType the mime type that describes the metadata;
|
* @param mimeType the mime type that describes the metadata;
|
||||||
* This is required for connection using composite metadata. Otherwise the
|
* This is required for connection using composite metadata. Otherwise, the
|
||||||
* value is encoded according to the mime type for the connection and this
|
* value is encoded according to the mime type for the connection and this
|
||||||
* argument may be left as {@code null}.
|
* argument may be left as {@code null}.
|
||||||
*/
|
*/
|
||||||
|
|
@ -434,7 +434,7 @@ public interface RSocketRequester extends Disposable {
|
||||||
* <p>If the return type is {@code Mono<Void>}, the {@code Mono} will
|
* <p>If the return type is {@code Mono<Void>}, the {@code Mono} will
|
||||||
* complete after all data is consumed.
|
* complete after all data is consumed.
|
||||||
* <p><strong>Note:</strong> This method will raise an error if
|
* <p><strong>Note:</strong> This method will raise an error if
|
||||||
* the request payload is a multi-valued {@link Publisher} as there is
|
* the request payload is a multivalued {@link Publisher} as there is
|
||||||
* no many-to-one RSocket interaction.
|
* no many-to-one RSocket interaction.
|
||||||
* @param dataType the expected data type for the response
|
* @param dataType the expected data type for the response
|
||||||
* @param <T> parameter for the expected data type
|
* @param <T> parameter for the expected data type
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ public interface RSocketStrategies {
|
||||||
Builder routeMatcher(@Nullable RouteMatcher routeMatcher);
|
Builder routeMatcher(@Nullable RouteMatcher routeMatcher);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure the registry for reactive type support. This can be used to
|
* Configure the registry for reactive type support. This can be used
|
||||||
* to adapt to, and/or determine the semantics of a given
|
* to adapt to, and/or determine the semantics of a given
|
||||||
* {@link org.reactivestreams.Publisher Publisher}.
|
* {@link org.reactivestreams.Publisher Publisher}.
|
||||||
* <p>By default this {@link ReactiveAdapterRegistry#getSharedInstance()}.
|
* <p>By default this {@link ReactiveAdapterRegistry#getSharedInstance()}.
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ class MessagingRSocket implements RSocket {
|
||||||
*/
|
*/
|
||||||
public Mono<Void> handleConnectionSetupPayload(ConnectionSetupPayload payload) {
|
public Mono<Void> handleConnectionSetupPayload(ConnectionSetupPayload payload) {
|
||||||
// frameDecoder does not apply to connectionSetupPayload
|
// frameDecoder does not apply to connectionSetupPayload
|
||||||
// so retain here since handle expects it..
|
// so retain here since handle expects it.
|
||||||
payload.retain();
|
payload.retain();
|
||||||
return handle(payload, FrameType.SETUP);
|
return handle(payload, FrameType.SETUP);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ public class RSocketFrameTypeMessageCondition extends AbstractMessageCondition<R
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a condition for matching the RSocket request interaction type with
|
* Return a condition for matching the RSocket request interaction type with
|
||||||
* that is selected based on the delcared request and response cardinality
|
* that is selected based on the declared request and response cardinality
|
||||||
* of some handler method.
|
* of some handler method.
|
||||||
* <p>The table below shows the selections made:
|
* <p>The table below shows the selections made:
|
||||||
* <table>
|
* <table>
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ public class RSocketMessageHandler extends MessageMappingMessageHandler {
|
||||||
* likewise when this property is set the {@code RSocketStrategies} are
|
* likewise when this property is set the {@code RSocketStrategies} are
|
||||||
* mutated to change the extractor in it.
|
* mutated to change the extractor in it.
|
||||||
* <p>By default this is set to the
|
* <p>By default this is set to the
|
||||||
* {@link org.springframework.messaging.rsocket.RSocketStrategies.Builder#metadataExtractor(MetadataExtractor)} defaults}
|
* {@link org.springframework.messaging.rsocket.RSocketStrategies.Builder#metadataExtractor(MetadataExtractor) defaults}
|
||||||
* from {@code RSocketStrategies}.
|
* from {@code RSocketStrategies}.
|
||||||
* @param extractor the extractor to use
|
* @param extractor the extractor to use
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ public class SimpMessageHeaderAccessor extends NativeMessageHeaderAccessor {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constructor for creating new message headers.
|
* A constructor for creating new message headers.
|
||||||
* This constructor is protected. See factory methods in this and sub-classes.
|
* This constructor is protected. See factory methods in this and subclasses.
|
||||||
*/
|
*/
|
||||||
protected SimpMessageHeaderAccessor(SimpMessageType messageType,
|
protected SimpMessageHeaderAccessor(SimpMessageType messageType,
|
||||||
@Nullable Map<String, List<String>> externalSourceHeaders) {
|
@Nullable Map<String, List<String>> externalSourceHeaders) {
|
||||||
|
|
@ -104,7 +104,7 @@ public class SimpMessageHeaderAccessor extends NativeMessageHeaderAccessor {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A constructor for accessing and modifying existing message headers. This
|
* A constructor for accessing and modifying existing message headers. This
|
||||||
* constructor is protected. See factory methods in this and sub-classes.
|
* constructor is protected. See factory methods in this and subclasses.
|
||||||
*/
|
*/
|
||||||
protected SimpMessageHeaderAccessor(Message<?> message) {
|
protected SimpMessageHeaderAccessor(Message<?> message) {
|
||||||
super(message);
|
super(message);
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ public abstract class AbstractBrokerMessageHandler
|
||||||
* Check whether this message handler is currently running.
|
* Check whether this message handler is currently running.
|
||||||
* <p>Note that even when this message handler is running the
|
* <p>Note that even when this message handler is running the
|
||||||
* {@link #isBrokerAvailable()} flag may still independently alternate between
|
* {@link #isBrokerAvailable()} flag may still independently alternate between
|
||||||
* being on and off depending on the concrete sub-class implementation.
|
* being on and off depending on the concrete subclass implementation.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final boolean isRunning() {
|
public final boolean isRunning() {
|
||||||
|
|
@ -260,7 +260,7 @@ public abstract class AbstractBrokerMessageHandler
|
||||||
* indicates whether this message handler is running. In other words the message
|
* indicates whether this message handler is running. In other words the message
|
||||||
* handler must first be running and then the {@code #isBrokerAvailable()} flag
|
* handler must first be running and then the {@code #isBrokerAvailable()} flag
|
||||||
* may still independently alternate between being on and off depending on the
|
* may still independently alternate between being on and off depending on the
|
||||||
* concrete sub-class implementation.
|
* concrete subclass implementation.
|
||||||
* <p>Application components may implement
|
* <p>Application components may implement
|
||||||
* {@code org.springframework.context.ApplicationListener<BrokerAvailabilityEvent>}
|
* {@code org.springframework.context.ApplicationListener<BrokerAvailabilityEvent>}
|
||||||
* to receive notifications when broker becomes available and unavailable.
|
* to receive notifications when broker becomes available and unavailable.
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import org.springframework.util.Assert;
|
||||||
/**
|
/**
|
||||||
* Decorator for an {@link ExecutorSubscribableChannel} that ensures messages
|
* Decorator for an {@link ExecutorSubscribableChannel} that ensures messages
|
||||||
* are processed in the order they were published to the channel. Messages are
|
* are processed in the order they were published to the channel. Messages are
|
||||||
* sent one at a time with the next one released when the prevoius has been
|
* sent one at a time with the next one released when the previous has been
|
||||||
* processed. This decorator is intended to be applied per session.
|
* processed. This decorator is intended to be applied per session.
|
||||||
*
|
*
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
|
|
|
||||||
|
|
@ -923,7 +923,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* After a DISCONNECT there should be no more client frames so we can
|
* After a DISCONNECT there should be no more client frames so we can
|
||||||
* close the connection pro-actively. However, if the DISCONNECT has a
|
* close the connection proactively. However, if the DISCONNECT has a
|
||||||
* receipt header we leave the connection open and expect the server will
|
* receipt header we leave the connection open and expect the server will
|
||||||
* respond with a RECEIPT and then close the connection.
|
* respond with a RECEIPT and then close the connection.
|
||||||
* @see <a href="https://stomp.github.io/stomp-specification-1.2.html#DISCONNECT">
|
* @see <a href="https://stomp.github.io/stomp-specification-1.2.html#DISCONNECT">
|
||||||
|
|
|
||||||
|
|
@ -92,9 +92,9 @@ public class StompDecoder {
|
||||||
* Decodes one or more STOMP frames from the given {@code buffer} and returns
|
* Decodes one or more STOMP frames from the given {@code buffer} and returns
|
||||||
* a list of {@link Message Messages}.
|
* a list of {@link Message Messages}.
|
||||||
* <p>If the given ByteBuffer contains only partial STOMP frame content and no
|
* <p>If the given ByteBuffer contains only partial STOMP frame content and no
|
||||||
* complete STOMP frames, an empty list is returned, and the buffer is reset to
|
* complete STOMP frames, an empty list is returned, and the buffer is reset
|
||||||
* to where it was.
|
* to where it was.
|
||||||
* <p>If the buffer contains one ore more STOMP frames, those are returned and
|
* <p>If the buffer contains one or more STOMP frames, those are returned and
|
||||||
* the buffer reset to point to the beginning of the unused partial content.
|
* the buffer reset to point to the beginning of the unused partial content.
|
||||||
* <p>The output partialMessageHeaders map is used to store successfully parsed
|
* <p>The output partialMessageHeaders map is used to store successfully parsed
|
||||||
* headers in case of partial content. The caller can then check if a
|
* headers in case of partial content. The caller can then check if a
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ public interface StompSession {
|
||||||
/**
|
/**
|
||||||
* An overloaded version of {@link #subscribe(String, StompFrameHandler)}
|
* An overloaded version of {@link #subscribe(String, StompFrameHandler)}
|
||||||
* with full {@link StompHeaders} instead of just a destination.
|
* with full {@link StompHeaders} instead of just a destination.
|
||||||
* @param headers the headers for the subscribe message frame
|
* @param headers the headers for the subscribed message frame
|
||||||
* @param handler the handler for received messages
|
* @param handler the handler for received messages
|
||||||
* @return a handle to use to unsubscribe and/or track receipts
|
* @return a handle to use to unsubscribe and/or track receipts
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public interface ExecutorChannelInterceptor extends ChannelInterceptor {
|
||||||
* @param message the message handled
|
* @param message the message handled
|
||||||
* @param channel the channel on which the message was sent to
|
* @param channel the channel on which the message was sent to
|
||||||
* @param handler the target handler that handled the message
|
* @param handler the target handler that handled the message
|
||||||
* @param ex any exception that may been raised by the handler
|
* @param ex any exception that may have been raised by the handler
|
||||||
*/
|
*/
|
||||||
default void afterMessageHandled(Message<?> message, MessageChannel channel, MessageHandler handler,
|
default void afterMessageHandled(Message<?> message, MessageChannel channel, MessageHandler handler,
|
||||||
@Nullable Exception ex) {
|
@Nullable Exception ex) {
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ public final class MessageBuilder<T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy the name-value pairs from the provided Map. This operation will overwrite any
|
* Copy the name-value pairs from the provided Map. This operation will overwrite any
|
||||||
* existing values. Use { {@link #copyHeadersIfAbsent(Map)} to avoid overwriting
|
* existing values. Use {@link #copyHeadersIfAbsent(Map)} to avoid overwriting
|
||||||
* values. Note that the 'id' and 'timestamp' header values will never be overwritten.
|
* values. Note that the 'id' and 'timestamp' header values will never be overwritten.
|
||||||
*/
|
*/
|
||||||
public MessageBuilder<T> copyHeaders(@Nullable Map<String, ?> headersToCopy) {
|
public MessageBuilder<T> copyHeaders(@Nullable Map<String, ?> headersToCopy) {
|
||||||
|
|
@ -169,7 +169,7 @@ public final class MessageBuilder<T> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a builder for a new {@link Message} instance pre-populated with all of the
|
* Create a builder for a new {@link Message} instance pre-populated with all the
|
||||||
* headers copied from the provided message. The payload of the provided Message will
|
* headers copied from the provided message. The payload of the provided Message will
|
||||||
* also be used as the payload for the new message.
|
* also be used as the payload for the new message.
|
||||||
* <p>If the provided message is an {@link ErrorMessage}, the
|
* <p>If the provided message is an {@link ErrorMessage}, the
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,12 @@ import org.springframework.util.StringUtils;
|
||||||
* strongly typed accessors for specific headers, the ability to leave headers
|
* strongly typed accessors for specific headers, the ability to leave headers
|
||||||
* in a {@link Message} mutable, and the option to suppress automatic generation
|
* in a {@link Message} mutable, and the option to suppress automatic generation
|
||||||
* of {@link MessageHeaders#ID id} and {@link MessageHeaders#TIMESTAMP
|
* of {@link MessageHeaders#ID id} and {@link MessageHeaders#TIMESTAMP
|
||||||
* timesteamp} headers. Sub-classes such as {@link NativeMessageHeaderAccessor}
|
* timesteamp} headers. Subclasses such as {@link NativeMessageHeaderAccessor}
|
||||||
* and others provide support for managing processing vs external source headers
|
* and others provide support for managing processing vs external source headers
|
||||||
* as well as protocol specific headers.
|
* as well as protocol specific headers.
|
||||||
*
|
*
|
||||||
* <p>Below is a workflow to initialize headers via {@code MessageHeaderAccessor},
|
* <p>Below is a workflow to initialize headers via {@code MessageHeaderAccessor},
|
||||||
* or one of its sub-classes, then create a {@link Message}, and then re-obtain
|
* or one of its subclasses, then create a {@link Message}, and then re-obtain
|
||||||
* the accessor possibly from a different component:
|
* the accessor possibly from a different component:
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
* // Create a message with headers
|
* // Create a message with headers
|
||||||
|
|
@ -153,7 +153,7 @@ public class MessageHeaderAccessor {
|
||||||
// Configuration properties
|
// Configuration properties
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default when {@link #getMessageHeaders()} is called, {@code "this"}
|
* By default, when {@link #getMessageHeaders()} is called, {@code "this"}
|
||||||
* {@code MessageHeaderAccessor} instance can no longer be used to modify the
|
* {@code MessageHeaderAccessor} instance can no longer be used to modify the
|
||||||
* underlying message headers and the returned {@code MessageHeaders} is immutable.
|
* underlying message headers and the returned {@code MessageHeaders} is immutable.
|
||||||
* <p>However when this is set to {@code true}, the returned (underlying)
|
* <p>However when this is set to {@code true}, the returned (underlying)
|
||||||
|
|
@ -173,7 +173,7 @@ public class MessageHeaderAccessor {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default when {@link #getMessageHeaders()} is called, {@code "this"}
|
* By default, when {@link #getMessageHeaders()} is called, {@code "this"}
|
||||||
* {@code MessageHeaderAccessor} instance can no longer be used to modify the
|
* {@code MessageHeaderAccessor} instance can no longer be used to modify the
|
||||||
* underlying message headers. However if {@link #setLeaveMutable(boolean)}
|
* underlying message headers. However if {@link #setLeaveMutable(boolean)}
|
||||||
* is used, this method is necessary to indicate explicitly when the
|
* is used, this method is necessary to indicate explicitly when the
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,9 @@ import org.springframework.util.ObjectUtils;
|
||||||
* key {@link #NATIVE_HEADERS}. This allows separating processing headers from
|
* key {@link #NATIVE_HEADERS}. This allows separating processing headers from
|
||||||
* headers that need to be sent to or received from the external source.
|
* headers that need to be sent to or received from the external source.
|
||||||
*
|
*
|
||||||
* <p>This class is likely to be used through indirectly through a protocol
|
* <p>This class is likely to be used indirectly through a protocol-specific
|
||||||
* specific sub-class that also provide factory methods to translate
|
* subclass that also provide factory methods to translate
|
||||||
* message headers to an from an external messaging source.
|
* message headers to and from an external messaging source.
|
||||||
*
|
*
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import org.springframework.core.MethodIntrospector;
|
||||||
import org.springframework.util.ReflectionUtils;
|
import org.springframework.util.ReflectionUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sub-class for {@link AbstractExceptionHandlerMethodResolver} for testing.
|
* Subclass for {@link AbstractExceptionHandlerMethodResolver} for testing.
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
*/
|
*/
|
||||||
public class TestExceptionResolver extends AbstractExceptionHandlerMethodResolver {
|
public class TestExceptionResolver extends AbstractExceptionHandlerMethodResolver {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue