|
65 | 65 | import org.springframework.messaging.simp.SimpMessageType; |
66 | 66 | import org.springframework.messaging.simp.SimpMessagingTemplate; |
67 | 67 | import org.springframework.messaging.simp.annotation.SubscribeEvent; |
68 | | -import org.springframework.messaging.simp.annotation.UnsubscribeEvent; |
69 | 68 | import org.springframework.messaging.simp.annotation.support.PrincipalMethodArgumentResolver; |
70 | 69 | import org.springframework.messaging.simp.annotation.support.SendToMethodReturnValueHandler; |
71 | 70 | import org.springframework.messaging.simp.annotation.support.SubscriptionMethodReturnValueHandler; |
@@ -120,8 +119,6 @@ public class AnnotationMethodMessageHandler implements MessageHandler, Applicati |
120 | 119 |
|
121 | 120 | private Map<MappingInfo, HandlerMethod> subscribeMethods = new HashMap<MappingInfo, HandlerMethod>(); |
122 | 121 |
|
123 | | - private Map<MappingInfo, HandlerMethod> unsubscribeMethods = new HashMap<MappingInfo, HandlerMethod>(); |
124 | | - |
125 | 122 | private final Map<Class<?>, ExceptionHandlerMethodResolver> exceptionHandlerCache = |
126 | 123 | new ConcurrentHashMap<Class<?>, ExceptionHandlerMethodResolver>(64); |
127 | 124 |
|
@@ -308,7 +305,6 @@ protected final void detectHandlerMethods(Object handler) { |
308 | 305 |
|
309 | 306 | initHandlerMethods(handler, handlerType, MessageMapping.class, this.messageMethods); |
310 | 307 | initHandlerMethods(handler, handlerType, SubscribeEvent.class, this.subscribeMethods); |
311 | | - initHandlerMethods(handler, handlerType, UnsubscribeEvent.class, this.unsubscribeMethods); |
312 | 308 | } |
313 | 309 |
|
314 | 310 | private <A extends Annotation> void initHandlerMethods(Object handler, Class<?> handlerType, |
@@ -365,9 +361,6 @@ public void handleMessage(Message<?> message) throws MessagingException { |
365 | 361 | else if (SimpMessageType.SUBSCRIBE.equals(messageType)) { |
366 | 362 | handleMessageInternal(message, this.subscribeMethods); |
367 | 363 | } |
368 | | - else if (SimpMessageType.UNSUBSCRIBE.equals(messageType)) { |
369 | | - handleMessageInternal(message, this.unsubscribeMethods); |
370 | | - } |
371 | 364 | } |
372 | 365 |
|
373 | 366 | private void handleMessageInternal(Message<?> message, Map<MappingInfo, HandlerMethod> handlerMethods) { |
|
0 commit comments