Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
f6334fc6
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,发现更多精彩内容 >>
提交
f6334fc6
编写于
7月 02, 2016
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Aligned default Map capacity
上级
c6752e60
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
26 deletion
+28
-26
spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AbstractMethodMessageHandler.java
...ging/handler/invocation/AbstractMethodMessageHandler.java
+28
-26
未找到文件。
spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AbstractMethodMessageHandler.java
浏览文件 @
f6334fc6
...
...
@@ -83,6 +83,8 @@ public abstract class AbstractMethodMessageHandler<T>
protected
final
Log
logger
=
LogFactory
.
getLog
(
getClass
());
private
Collection
<
String
>
destinationPrefixes
=
new
ArrayList
<
String
>();
private
final
List
<
HandlerMethodArgumentResolver
>
customArgumentResolvers
=
new
ArrayList
<
HandlerMethodArgumentResolver
>(
4
);
...
...
@@ -95,9 +97,11 @@ public abstract class AbstractMethodMessageHandler<T>
private
final
HandlerMethodReturnValueHandlerComposite
returnValueHandlers
=
new
HandlerMethodReturnValueHandlerComposite
();
private
final
Map
<
T
,
HandlerMethod
>
handlerMethods
=
new
LinkedHashMap
<
T
,
HandlerMethod
>();
private
ApplicationContext
applicationContext
;
private
final
Map
<
T
,
HandlerMethod
>
handlerMethods
=
new
LinkedHashMap
<
T
,
HandlerMethod
>(
64
);
private
final
MultiValueMap
<
String
,
T
>
destinationLookup
=
new
LinkedMultiValueMap
<
String
,
T
>();
private
final
MultiValueMap
<
String
,
T
>
destinationLookup
=
new
LinkedMultiValueMap
<
String
,
T
>(
64
);
private
final
Map
<
Class
<?>,
AbstractExceptionHandlerMethodResolver
>
exceptionHandlerCache
=
new
ConcurrentHashMap
<
Class
<?>,
AbstractExceptionHandlerMethodResolver
>(
64
);
...
...
@@ -105,16 +109,6 @@ public abstract class AbstractMethodMessageHandler<T>
private
final
Map
<
MessagingAdviceBean
,
AbstractExceptionHandlerMethodResolver
>
exceptionHandlerAdviceCache
=
new
LinkedHashMap
<
MessagingAdviceBean
,
AbstractExceptionHandlerMethodResolver
>(
64
);
private
Collection
<
String
>
destinationPrefixes
=
new
ArrayList
<
String
>();
private
ApplicationContext
applicationContext
;
/**
* Return the configured destination prefixes.
*/
public
Collection
<
String
>
getDestinationPrefixes
()
{
return
this
.
destinationPrefixes
;
}
/**
* When this property is configured only messages to destinations matching
...
...
@@ -135,10 +129,10 @@ public abstract class AbstractMethodMessageHandler<T>
}
/**
* Return the configured
custom argument resolver
s, if any.
* Return the configured
destination prefixe
s, if any.
*/
public
List
<
HandlerMethodArgumentResolver
>
getCustomArgumentResolver
s
()
{
return
this
.
customArgumentResolver
s
;
public
Collection
<
String
>
getDestinationPrefixe
s
()
{
return
this
.
destinationPrefixe
s
;
}
/**
...
...
@@ -153,10 +147,10 @@ public abstract class AbstractMethodMessageHandler<T>
}
/**
* Return the configured custom
return value handl
ers, if any.
* Return the configured custom
argument resolv
ers, if any.
*/
public
List
<
HandlerMethod
ReturnValueHandler
>
getCustomReturnValueHandl
ers
()
{
return
this
.
custom
ReturnValueHandl
ers
;
public
List
<
HandlerMethod
ArgumentResolver
>
getCustomArgumentResolv
ers
()
{
return
this
.
custom
ArgumentResolv
ers
;
}
/**
...
...
@@ -171,10 +165,10 @@ public abstract class AbstractMethodMessageHandler<T>
}
/**
* Return the co
mplete list of argument resolvers
.
* Return the co
nfigured custom return value handlers, if any
.
*/
public
List
<
HandlerMethod
ArgumentResolver
>
getArgumentResolv
ers
()
{
return
this
.
argumentResolvers
.
getResolvers
()
;
public
List
<
HandlerMethod
ReturnValueHandler
>
getCustomReturnValueHandl
ers
()
{
return
this
.
customReturnValueHandlers
;
}
/**
...
...
@@ -191,10 +185,10 @@ public abstract class AbstractMethodMessageHandler<T>
}
/**
* Return the complete list of
return value handl
ers.
* Return the complete list of
argument resolv
ers.
*/
public
List
<
HandlerMethod
ReturnValueHandler
>
getReturnValueHandl
ers
()
{
return
this
.
returnValueHandlers
.
getReturnValueHandl
ers
();
public
List
<
HandlerMethod
ArgumentResolver
>
getArgumentResolv
ers
()
{
return
this
.
argumentResolvers
.
getResolv
ers
();
}
/**
...
...
@@ -210,8 +204,11 @@ public abstract class AbstractMethodMessageHandler<T>
this
.
returnValueHandlers
.
addHandlers
(
returnValueHandlers
);
}
public
ApplicationContext
getApplicationContext
()
{
return
this
.
applicationContext
;
/**
* Return the complete list of return value handlers.
*/
public
List
<
HandlerMethodReturnValueHandler
>
getReturnValueHandlers
()
{
return
this
.
returnValueHandlers
.
getReturnValueHandlers
();
}
@Override
...
...
@@ -219,6 +216,11 @@ public abstract class AbstractMethodMessageHandler<T>
this
.
applicationContext
=
applicationContext
;
}
public
ApplicationContext
getApplicationContext
()
{
return
this
.
applicationContext
;
}
@Override
public
void
afterPropertiesSet
()
{
if
(
this
.
argumentResolvers
.
getResolvers
().
isEmpty
())
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录