Package io.micronaut.rss.http
Class FeedController
java.lang.Object
io.micronaut.rss.http.FeedController
@Requires(beans={RssFeedProvider.class,RssFeedRenderer.class}) @Requires(property="micronaut.rss.feed.enabled",notEquals="false")
@Controller("${micronaut.rss.feed.path:/feed}")
public class FeedController
extends Object
Micronaut
Controller
which exposes an RSS 2.0 Feed.- Since:
- 1.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionFeedController
(RssFeedProvider rssFeedProvider, RssFeedRenderer rssFeedRenderer) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<io.micronaut.core.io.Writable>>
find
(Serializable id) org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<io.micronaut.core.io.Writable>>
index()
-
Constructor Details
-
FeedController
- Parameters:
rssFeedProvider
- A bean which returns RSS 2.0 feeds.rssFeedRenderer
- Provides a bean to renderRssChannel
-
-
Method Details
-
index
@Produces("application/xml") @Get @SingleResult public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<io.micronaut.core.io.Writable>> index()- Returns:
- Return the default RSS 2.0 provided by
RssFeedProvider
and rendered byRssFeedRenderer
.
-
find
@Produces("application/xml") @Get("/{id}") @SingleResult public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<io.micronaut.core.io.Writable>> find(Serializable id) - Parameters:
id
- RSS guid- Returns:
- Return the RSS 2.0 identified by the path parameter provided by
RssFeedProvider
and rendered byRssFeedRenderer
.
-