Package com.semagia.atomico.server.feed

Examples of com.semagia.atomico.server.feed.IFeedHandlerFactory


     *            The media type.
     * @return A {@link IOutputAwareFeedHandler} instance or <tt>null</tt> if no
     *         handler is available for the provided media type.
     */
    public static IOutputAwareFeedHandler createFeedHandler(MediaType mediaType) {
        IFeedHandlerFactory factory = _INSTANCE._mediaType2Factory.get(mediaType);
        return factory == null ? null : factory.createFeedHandler();
    }
View Full Code Here


* @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a>
*/
public class TestAtomFeedHandlerFactory extends TestCase {

    public void testMediaType() {
        final IFeedHandlerFactory factory = new AtomFeedHandlerFactory();
        assertEquals(MediaType.ATOM_XML, factory.getMediaType());
    }
View Full Code Here

        final IFeedHandlerFactory factory = new AtomFeedHandlerFactory();
        assertEquals(MediaType.ATOM_XML, factory.getMediaType());
    }

    public void testCreation() {
        final IFeedHandlerFactory factory = new AtomFeedHandlerFactory();
        final IOutputAwareFeedHandler handler = factory.createFeedHandler();
        assertNotNull(handler);
        assertTrue(handler instanceof AtomFeedHandler);
    }
View Full Code Here

* @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a>
*/
public class TestJSONHandlerFactory extends TestCase {

    public void testMediaType() {
        final IFeedHandlerFactory factory = new JSONFeedHandlerFactory();
        assertEquals(MediaType.JSON, factory.getMediaType());
    }
View Full Code Here

        final IFeedHandlerFactory factory = new JSONFeedHandlerFactory();
        assertEquals(MediaType.JSON, factory.getMediaType());
    }

    public void testCreation() {
        final IFeedHandlerFactory factory = new JSONFeedHandlerFactory();
        final IOutputAwareFeedHandler handler = factory.createFeedHandler();
        assertNotNull(handler);
        assertTrue(handler instanceof JSONFeedHandler);
    }
View Full Code Here

TOP

Related Classes of com.semagia.atomico.server.feed.IFeedHandlerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.