@Publisher and @Gateway JavaDocs
PR Comments Additional info Polishing
This commit is contained in:
committed by
Gary Russell
parent
f7e04918c5
commit
1bd955bef0
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,9 +24,9 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Indicates that a method is capable of mapping its parameters to a message
|
||||
* or message payload. These method-level annotations are detected by the
|
||||
* {@link org.springframework.integration.gateway.GatewayProxyFactoryBean}
|
||||
* Indicates that an interface method is capable of mapping its parameters
|
||||
* to a message or message payload. These method-level annotations are detected
|
||||
* by the {@link org.springframework.integration.gateway.GatewayProxyFactoryBean}
|
||||
* where the annotation attributes can override the default channel settings.
|
||||
*
|
||||
* <p>A method annotated with @Gateway may accept a single non-annotated
|
||||
@@ -44,9 +44,18 @@ import java.lang.annotation.Target;
|
||||
* {@link org.springframework.beans.SimpleTypeConverter} will be applied to
|
||||
* the return value if necessary.
|
||||
*
|
||||
* <p>Note: unlike @Publisher, this annotation is for exposing a
|
||||
* Messaging Endpoint based on a Proxy for the marked interface method.
|
||||
* The method invocation causes messaging interaction using an
|
||||
* AOP Advice. Method parameters become the part of sent message (payload, headers).
|
||||
* The method return value is the result (payload) of the messaging flow invoked by the
|
||||
* Proxy.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @see MessagingGateway
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,10 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* The stereotype annotation to provide the Integration Messaging Gateway Proxy ({@code <gateway/>}).
|
||||
* A stereotype annotation to provide an Integration Messaging Gateway Proxy
|
||||
* ({@code <gateway/>}) as an abstraction over the messaging API. The target
|
||||
* application’s business logic may be completely unaware of the Spring Integration
|
||||
* API, with the code interacting only via the interface.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @since 4.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,11 +23,26 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotation to indicate that a method, or all public methods if applied at
|
||||
* class-level, should publish Messages. The @Payload and @Header annotations
|
||||
* can be used in conjunction with this to determine the content of the Message.
|
||||
* class-level, should publish Messages.
|
||||
* <p>
|
||||
* By default, the Message will be constructed from the return value of the method
|
||||
* invocation
|
||||
* and sent to a channel specified by the {@link #channel()} attribute.
|
||||
* However, a combination of both @Payload and @Header annotations
|
||||
* can be used to further manage the message structure. See the reference manual for
|
||||
* examples.
|
||||
* <p>
|
||||
* Note: unlike @Gateway, this annotation is used to generate an AOP Advice for an
|
||||
* existing service and its method implementation. The message sending is a side effect
|
||||
* of the real method invocation and is invoked after the method returns.
|
||||
* The advised method(s) are not aware of the messaging interaction.
|
||||
* <p>
|
||||
* The XML equivalent is {@code <int:publishing-interceptor>}
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*
|
||||
* @since 2.0
|
||||
* @see org.springframework.integration.aop.MessagePublishingInterceptor
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
Reference in New Issue
Block a user