// Copyright 2014, Kevin Ko <kevin@faveset.com>

package com.faveset.khttp;

import java.nio.ByteBuffer;

/**
 * Note that all implementations may be initialized statically and thus
 * should be stateless.
 */
interface StateHandler {
    /**
     * Performs a step of the state machine.
     *
     * @return true if the state is complete.  False if more data is needed
     * in buf to proceed.
     */
    boolean handleState(NonBlockingConnection conn, ByteBuffer buf, HandlerState state) throws InvalidRequestException;
}

@@ -288,16 +288,80 @@
 %0A     *%0A
+     * @param buf holds unread data from the connection.%0A     *%0A
      * @

Clarify parameters.