Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2002-2013 the original author or authors.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.springframework.messaging.simp.annotation;
Annotation for mapping subscription messages onto specific handler methods based on the destination of a subscription. Supported with STOMP over WebSocket only (e.g. STOMP SUBSCRIBE frame).

This is a method-level annotations that can be combined with a type-level @MessageMapping

Supports the same method arguments as org.springframework.messaging.handler.annotation.MessageMapping, however subscription messages typically do not have a body.

The return value also follows the same rules as for org.springframework.messaging.handler.annotation.MessageMapping except if the method is not annotated with org.springframework.messaging.handler.annotation.SendTo or SendToUser, the message is sent directly back to the connected user and does not pass through the message broker. This is useful for implementing a request-reply pattern.

Rossen Stoyanchev
public @interface SubscribeMapping {

Destination-based mapping expressed by this annotation.

For STOMP over WebSocket messages: this is the destination of the STOMP message (e.g. "/positions"). Ant-style path patterns (e.g. "/price.stock.*") are supported and so are path template variables (e.g. "/price.stock.{ticker}"").

	String[] value() default {};
New to GrepCode? Check out our FAQ X