Skip to content

Commit 61d1354

Browse files
committed
Remove @UnsubscribeEvent
The STOMP UNSUBSCRIBE message does not have a destination header so there is no obvious simple way to do a mapping and the need for it is not clear yet.
1 parent 715a11c commit 61d1354

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/UnsubscribeEvent.java

Lines changed: 0 additions & 43 deletions
This file was deleted.

spring-messaging/src/main/java/org/springframework/messaging/simp/handler/AnnotationMethodMessageHandler.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
import org.springframework.messaging.simp.SimpMessageType;
6666
import org.springframework.messaging.simp.SimpMessagingTemplate;
6767
import org.springframework.messaging.simp.annotation.SubscribeEvent;
68-
import org.springframework.messaging.simp.annotation.UnsubscribeEvent;
6968
import org.springframework.messaging.simp.annotation.support.PrincipalMethodArgumentResolver;
7069
import org.springframework.messaging.simp.annotation.support.SendToMethodReturnValueHandler;
7170
import org.springframework.messaging.simp.annotation.support.SubscriptionMethodReturnValueHandler;
@@ -120,8 +119,6 @@ public class AnnotationMethodMessageHandler implements MessageHandler, Applicati
120119

121120
private Map<MappingInfo, HandlerMethod> subscribeMethods = new HashMap<MappingInfo, HandlerMethod>();
122121

123-
private Map<MappingInfo, HandlerMethod> unsubscribeMethods = new HashMap<MappingInfo, HandlerMethod>();
124-
125122
private final Map<Class<?>, ExceptionHandlerMethodResolver> exceptionHandlerCache =
126123
new ConcurrentHashMap<Class<?>, ExceptionHandlerMethodResolver>(64);
127124

@@ -308,7 +305,6 @@ protected final void detectHandlerMethods(Object handler) {
308305

309306
initHandlerMethods(handler, handlerType, MessageMapping.class, this.messageMethods);
310307
initHandlerMethods(handler, handlerType, SubscribeEvent.class, this.subscribeMethods);
311-
initHandlerMethods(handler, handlerType, UnsubscribeEvent.class, this.unsubscribeMethods);
312308
}
313309

314310
private <A extends Annotation> void initHandlerMethods(Object handler, Class<?> handlerType,
@@ -365,9 +361,6 @@ public void handleMessage(Message<?> message) throws MessagingException {
365361
else if (SimpMessageType.SUBSCRIBE.equals(messageType)) {
366362
handleMessageInternal(message, this.subscribeMethods);
367363
}
368-
else if (SimpMessageType.UNSUBSCRIBE.equals(messageType)) {
369-
handleMessageInternal(message, this.unsubscribeMethods);
370-
}
371364
}
372365

373366
private void handleMessageInternal(Message<?> message, Map<MappingInfo, HandlerMethod> handlerMethods) {

0 commit comments

Comments
 (0)