Created
May 19, 2014 06:20
-
-
Save mpurbo/1931add043f2deadccf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.logging.Log; | |
import org.apache.commons.logging.LogFactory; | |
import org.springframework.messaging.Message; | |
import org.springframework.messaging.MessageChannel; | |
import org.springframework.messaging.simp.stomp.StompHeaderAccessor; | |
import org.springframework.messaging.support.ChannelInterceptorAdapter; | |
public class StompInboundChannelInterceptor extends ChannelInterceptorAdapter { | |
static final Log LOG = LogFactory.getLog(StompInboundChannelInterceptor.class); | |
@Override | |
public Message<?> preSend(Message<?> message, MessageChannel channel) { | |
StompHeaderAccessor headers = StompHeaderAccessor.wrap(message); | |
LOG.debug("I'm intercepting your message, command = " + headers.getCommand() + ", dest = " + headers.getDestination()); | |
return message; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment