All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.http.converter.feed.RssChannelHttpMessageConverter Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2002-2011 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
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.http.converter.feed;

import org.springframework.http.MediaType;

import com.google.code.rome.android.repackaged.com.sun.syndication.feed.rss.Channel;

/**
 * Implementation of {@link org.springframework.http.converter.HttpMessageConverter} 
 * that can read and write RSS feeds. Specifically, this converter can handle 
 * {@link Channel} objects, from the 
 * Android ROME Feed Reader,
 * which is a repackaging of java.net's ROME.
 *
 * 

By default, this converter reads and writes the media type ({@code application/rss+xml}). This can * be overridden by setting the {@link #setSupportedMediaTypes(java.util.List) supportedMediaTypes} property. * * @author Arjen Poutsma * @author Roy Clarkson * @see Channel * @since 1.0 */ public class RssChannelHttpMessageConverter extends AbstractWireFeedHttpMessageConverter { public RssChannelHttpMessageConverter() { super(MediaType.APPLICATION_RSS_XML); } @Override protected boolean supports(Class clazz) { return Channel.class.isAssignableFrom(clazz); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy