HTTP/2 Frame to HttpObject Adapter

Transferring @Scottmitch's personal pull request to @akamai's fork for https://github.com/netty/netty/pull/2695
Sounds good

> Am 07.08.2014 um 17:16 schrieb Scottmitch <notifications@github.com>:
> 
> In codec-http2/src/main/java/io/netty/handler/codec/http2/InboundHttp2ToHttpAdapter.java:
> 
> > +     * @throws NullPointerException If {@code connection} is null
> > +     * @throws IllegalArgumentException If {@code maxContentLength} is less than or equal to {@code 0}
> > +     */
> > +    public InboundHttp2ToHttpAdapter(Http2Connection connection, long maxContentLength, boolean validateHttpHeaders)
> > +                    throws NullPointerException, IllegalArgumentException {
> > +        if (connection == null) {
> > +            throw new NullPointerException("connection");
> > +        }
> > +        if (maxContentLength <= 0) {
> > +            throw new IllegalArgumentException("maxContentLength must be a positive integer: " + maxContentLength);
> > +        }
> > +        this.maxContentLength = maxContentLength;
> > +        this.validateHttpHeaders = validateHttpHeaders;
> > +        this.connection = connection;
> > +        this.messageMap = new IntObjectHashMap<Http2HttpMessageAccumulator>();
> > +        this.connection.addListener(this);
> RecyclableArrayList.java uses the newInstance and some other cases have factories which have newClassName. I'm not sure this case warrants a factory, and it seems like an in class newInstance or something similar should be sufficient. WDYT?
> 
> —
> Reply to this email directly or view it on GitHub.