@@ -83,6 +83,8 @@ public abstract class AbstractMethodMessageHandler<T>
83
83
84
84
protected final Log logger = LogFactory .getLog (getClass ());
85
85
86
+ private Collection <String > destinationPrefixes = new ArrayList <String >();
87
+
86
88
private final List <HandlerMethodArgumentResolver > customArgumentResolvers =
87
89
new ArrayList <HandlerMethodArgumentResolver >(4 );
88
90
@@ -95,26 +97,18 @@ public abstract class AbstractMethodMessageHandler<T>
95
97
private final HandlerMethodReturnValueHandlerComposite returnValueHandlers =
96
98
new HandlerMethodReturnValueHandlerComposite ();
97
99
98
- private final Map <T , HandlerMethod > handlerMethods = new LinkedHashMap <T , HandlerMethod >();
100
+ private ApplicationContext applicationContext ;
101
+
102
+ private final Map <T , HandlerMethod > handlerMethods = new LinkedHashMap <T , HandlerMethod >(64 );
99
103
100
- private final MultiValueMap <String , T > destinationLookup = new LinkedMultiValueMap <String , T >();
104
+ private final MultiValueMap <String , T > destinationLookup = new LinkedMultiValueMap <String , T >(64 );
101
105
102
106
private final Map <Class <?>, AbstractExceptionHandlerMethodResolver > exceptionHandlerCache =
103
107
new ConcurrentHashMap <Class <?>, AbstractExceptionHandlerMethodResolver >(64 );
104
108
105
109
private final Map <MessagingAdviceBean , AbstractExceptionHandlerMethodResolver > exceptionHandlerAdviceCache =
106
110
new LinkedHashMap <MessagingAdviceBean , AbstractExceptionHandlerMethodResolver >(64 );
107
111
108
- private Collection <String > destinationPrefixes = new ArrayList <String >();
109
-
110
- private ApplicationContext applicationContext ;
111
-
112
- /**
113
- * Return the configured destination prefixes.
114
- */
115
- public Collection <String > getDestinationPrefixes () {
116
- return this .destinationPrefixes ;
117
- }
118
112
119
113
/**
120
114
* When this property is configured only messages to destinations matching
@@ -135,10 +129,10 @@ public void setDestinationPrefixes(Collection<String> prefixes) {
135
129
}
136
130
137
131
/**
138
- * Return the configured custom argument resolvers , if any.
132
+ * Return the configured destination prefixes , if any.
139
133
*/
140
- public List < HandlerMethodArgumentResolver > getCustomArgumentResolvers () {
141
- return this .customArgumentResolvers ;
134
+ public Collection < String > getDestinationPrefixes () {
135
+ return this .destinationPrefixes ;
142
136
}
143
137
144
138
/**
@@ -153,10 +147,10 @@ public void setCustomArgumentResolvers(List<HandlerMethodArgumentResolver> custo
153
147
}
154
148
155
149
/**
156
- * Return the configured custom return value handlers , if any.
150
+ * Return the configured custom argument resolvers , if any.
157
151
*/
158
- public List <HandlerMethodReturnValueHandler > getCustomReturnValueHandlers () {
159
- return this .customReturnValueHandlers ;
152
+ public List <HandlerMethodArgumentResolver > getCustomArgumentResolvers () {
153
+ return this .customArgumentResolvers ;
160
154
}
161
155
162
156
/**
@@ -171,10 +165,10 @@ public void setCustomReturnValueHandlers(List<HandlerMethodReturnValueHandler> c
171
165
}
172
166
173
167
/**
174
- * Return the complete list of argument resolvers .
168
+ * Return the configured custom return value handlers, if any .
175
169
*/
176
- public List <HandlerMethodArgumentResolver > getArgumentResolvers () {
177
- return this .argumentResolvers . getResolvers () ;
170
+ public List <HandlerMethodReturnValueHandler > getCustomReturnValueHandlers () {
171
+ return this .customReturnValueHandlers ;
178
172
}
179
173
180
174
/**
@@ -191,10 +185,10 @@ public void setArgumentResolvers(List<HandlerMethodArgumentResolver> argumentRes
191
185
}
192
186
193
187
/**
194
- * Return the complete list of return value handlers .
188
+ * Return the complete list of argument resolvers .
195
189
*/
196
- public List <HandlerMethodReturnValueHandler > getReturnValueHandlers () {
197
- return this .returnValueHandlers . getReturnValueHandlers ();
190
+ public List <HandlerMethodArgumentResolver > getArgumentResolvers () {
191
+ return this .argumentResolvers . getResolvers ();
198
192
}
199
193
200
194
/**
@@ -210,15 +204,23 @@ public void setReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnV
210
204
this .returnValueHandlers .addHandlers (returnValueHandlers );
211
205
}
212
206
213
- public ApplicationContext getApplicationContext () {
214
- return this .applicationContext ;
207
+ /**
208
+ * Return the complete list of return value handlers.
209
+ */
210
+ public List <HandlerMethodReturnValueHandler > getReturnValueHandlers () {
211
+ return this .returnValueHandlers .getReturnValueHandlers ();
215
212
}
216
213
217
214
@ Override
218
215
public void setApplicationContext (ApplicationContext applicationContext ) {
219
216
this .applicationContext = applicationContext ;
220
217
}
221
218
219
+ public ApplicationContext getApplicationContext () {
220
+ return this .applicationContext ;
221
+ }
222
+
223
+
222
224
@ Override
223
225
public void afterPropertiesSet () {
224
226
if (this .argumentResolvers .getResolvers ().isEmpty ()) {
0 commit comments