001/* 002 * Copyright 2002-2014 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.web.socket.config.annotation; 018 019import java.util.List; 020 021import org.springframework.messaging.converter.MessageConverter; 022import org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver; 023import org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler; 024import org.springframework.messaging.simp.config.ChannelRegistration; 025import org.springframework.messaging.simp.config.MessageBrokerRegistry; 026 027/** 028 * A convenient abstract base class for {@link WebSocketMessageBrokerConfigurer} 029 * implementations providing empty method implementations for optional methods. 030 * 031 * @author Rossen Stoyanchev 032 * @since 4.0.1 033 */ 034public abstract class AbstractWebSocketMessageBrokerConfigurer implements WebSocketMessageBrokerConfigurer { 035 036 037 @Override 038 public void configureWebSocketTransport(WebSocketTransportRegistration registration) { 039 } 040 041 @Override 042 public void configureClientInboundChannel(ChannelRegistration registration) { 043 } 044 045 @Override 046 public void configureClientOutboundChannel(ChannelRegistration registration) { 047 } 048 049 @Override 050 public boolean configureMessageConverters(List<MessageConverter> messageConverters) { 051 return true; 052 } 053 054 @Override 055 public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { 056 } 057 058 @Override 059 public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) { 060 } 061 062 @Override 063 public void configureMessageBroker(MessageBrokerRegistry registry) { 064 } 065 066}