001/* 002 * Copyright 2002-2018 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 * @deprecated as of 5.0 in favor of simply using {@link WebSocketMessageBrokerConfigurer} 034 * which has default methods, made possible by a Java 8 baseline. 035 */ 036@Deprecated 037public abstract class AbstractWebSocketMessageBrokerConfigurer implements WebSocketMessageBrokerConfigurer { 038 039 @Override 040 public void configureWebSocketTransport(WebSocketTransportRegistration registration) { 041 } 042 043 @Override 044 public void configureClientInboundChannel(ChannelRegistration registration) { 045 } 046 047 @Override 048 public void configureClientOutboundChannel(ChannelRegistration registration) { 049 } 050 051 @Override 052 public boolean configureMessageConverters(List<MessageConverter> messageConverters) { 053 return true; 054 } 055 056 @Override 057 public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { 058 } 059 060 @Override 061 public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) { 062 } 063 064 @Override 065 public void configureMessageBroker(MessageBrokerRegistry registry) { 066 } 067 068}