@Override
    public void end() {
        if (headPolicyHandler != null) {
            headPolicyHandler.end();
        } else {
            handleEnd();
        }
    }
@see io.apiman.gateway.engine.io.AbstractStream#end()
gateway/engine/core/src/main/java/io/apiman/gateway/engine/policy/Chain.java