
org.webpieces.httpparser.api.HttpParserFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-parser1_1 Show documentation
Show all versions of http-parser1_1 Show documentation
A re-usable asynchronous http 1.1 parser that can be used with any nio client
package org.webpieces.httpparser.api;
import java.nio.charset.Charset;
import org.webpieces.data.api.BufferPool;
import org.webpieces.httpparser.impl.HttpParserImpl;
public class HttpParserFactory {
public static final Charset iso8859_1 = Charset.forName("ISO-8859-1");
/**
*
* @param pool Purely to release ByteBuffers back to the pool and be released
* @return
*/
public static HttpParser createParser(BufferPool pool) {
//to get around verifydesign later AND enforce build breaks on design violations
//like api depending on implementation, we need reflection here to create this
//instance...
return new HttpParserImpl(pool);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy