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

com.hannesdorfmann.httpkit.parser.ParserWriterPool Maven / Gradle / Ivy

package com.hannesdorfmann.httpkit.parser;

/**
 *
 * Used to handle a pool of {@link com.hannesdorfmann.httpkit.parser.ParserWriter}s.
 * You can add or remove one and you have to provide a method to get a
 * {@link com.hannesdorfmann.httpkit.parser.ParserWriter} by the given mime type.
 *
 *
 *
 * @author Hannes Dorfmann
 */
public interface ParserWriterPool {

    /**
     * Adds one for the given mime type
     * @param mimeType
     * @param parser
     */
    public void add(String mimeType, ParserWriter parser);

    /**
     * Get the {@link com.hannesdorfmann.httpkit.parser.ParserWriter} for the given mime type
     * @param mimeType
     * @return
     */
    public ParserWriter get(String mimeType);

    /**
     * Remove a the {@link com.hannesdorfmann.httpkit.parser.ParserWriter} for the given mime type.
     * Will do nothing if no {@link com.hannesdorfmann.httpkit.parser.ParserWriter} is registered
     * for the given mimeType
     * @param mimeType
     */
    public void remove(String mimeType);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy