Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
9b551c63
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9b551c63
编写于
12月 23, 2009
作者:
M
Micha Kiener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SPR-6424, conversation annotations
上级
8dd9f1a3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
4 deletion
+28
-4
org.springframework.context/src/main/java/org/springframework/conversation/annotation/BeginConversation.java
...gframework/conversation/annotation/BeginConversation.java
+16
-3
org.springframework.context/src/main/java/org/springframework/conversation/annotation/EndConversation.java
...ingframework/conversation/annotation/EndConversation.java
+12
-1
未找到文件。
org.springframework.context/src/main/java/org/springframework/conversation/annotation/BeginConversation.java
浏览文件 @
9b551c63
...
...
@@ -23,6 +23,7 @@ import java.lang.annotation.RetentionPolicy;
import
java.lang.annotation.Target
;
import
org.springframework.conversation.Conversation
;
import
org.springframework.conversation.ConversationEndingType
;
import
org.springframework.conversation.JoinMode
;
import
org.springframework.conversation.manager.ConversationManager
;
...
...
@@ -34,9 +35,10 @@ import org.springframework.conversation.manager.ConversationManager;
* specified within the annotation or {@link JoinMode#NEW} as the default.<br/>
* The new conversation is always long running (not a temporary one) and is
* ended by either manually invoke
* {@link ConversationManager#endCurrentConversation()}, invoking the
* {@link Conversation#end()} method on the conversation itself or by placing
* the {@link EndConversation} annotation on a method.<br/>
* {@link ConversationManager#endCurrentConversation(ConversationEndingType)},
* invoking the {@link Conversation#end(ConversationEndingType)} method on the
* conversation itself or by placing the {@link EndConversation} annotation on a
* method.<br/>
* The new conversation is created BEFORE the method itself is invoked as a
* before-advice.
*
...
...
@@ -58,4 +60,15 @@ public @interface BeginConversation {
* @return the join mode to use for creating a new conversation
*/
JoinMode
value
()
default
JoinMode
.
NEW
;
/**
* Returns the timeout to be set within the newly created conversation,
* default is <code>-1</code> which means to use the default timeout as
* being configured on the {@link ConversationManager}. A value of
* <code>0</code> means there is no timeout any other positive value is
* interpreted as a timeout in milliseconds.
*
* @return the timeout in milliseconds to be set on the new conversation
*/
long
timeout
()
default
-
1
;
}
org.springframework.context/src/main/java/org/springframework/conversation/annotation/EndConversation.java
浏览文件 @
9b551c63
...
...
@@ -22,12 +22,14 @@ import java.lang.annotation.Retention;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
import
org.springframework.conversation.ConversationEndingType
;
import
org.springframework.conversation.ConversationListener
;
import
org.springframework.conversation.manager.ConversationManager
;
/**
* This annotation can be placed on a method to end the current conversation. It
* has the same effect as a manual invocation of
* {@link ConversationManager#endCurrentConversation()}.<br/>
* {@link ConversationManager#endCurrentConversation(
ConversationEndingType
)}.<br/>
* The conversation is ended AFTER the method was invoked as an after-advice.
*
* @author Micha Kiener
...
...
@@ -38,4 +40,13 @@ import org.springframework.conversation.manager.ConversationManager;
@Documented
public
@interface
EndConversation
{
/**
* Returns the qualifier on how the conversation is about to be ended. This
* value will be passed on to any {@link ConversationListener} registered
* with the conversation being ended.
*
* @return the type of ending, {@link ConversationEndingType#SUCCESS} if not
* explicitly specified
*/
ConversationEndingType
value
()
default
ConversationEndingType
.
SUCCESS
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录