Each implementation knows how to deal with a specific type (version) of a real feed.
Implementations must be thread safe.
TODO: explain how developers can plugin their own implementations.
@author Alejandro Abdelnur
138139140141142143144145146147148149150151
this(SyndFeed.class, IGNORE_PROPERTIES); if (feed != null) { _feedType = feed.getFeedType(); Converter converter = CONVERTERS.getConverter(_feedType); if (converter == null) { throw new IllegalArgumentException("Invalid feed type [" + _feedType + "]"); } converter.copyInto(feed, this); } }
242243244245246247248249250251252253254
public WireFeed createWireFeed(String feedType) { if (feedType == null) { throw new IllegalArgumentException("Feed type cannot be null"); } Converter converter = CONVERTERS.getConverter(feedType); if (converter == null) { throw new IllegalArgumentException("Invalid feed type [" + feedType + "]"); } return converter.createRealFeed(this); }
47484950515253545556
} catch (Exception ex) { throw new RuntimeException(ex); } for (int i=0;i<converters.length;i++) { Converter converter = (Converter) converters[i]; map.put(converter.getType(),converter); } return map; }