public Generator(ByteBufferPool byteBufferPool, int headerTableSize)
{
this.byteBufferPool = byteBufferPool;
headerGenerator = new HeaderGenerator();
hpackEncoder = new HpackEncoder(headerTableSize);
this.generators = new FrameGenerator[FrameType.values().length];
this.generators[FrameType.HEADERS.getType()] = new HeadersGenerator(headerGenerator, hpackEncoder);
this.generators[FrameType.PRIORITY.getType()] = new PriorityGenerator(headerGenerator);
this.generators[FrameType.RST_STREAM.getType()] = new ResetGenerator(headerGenerator);