@Override
    public void onRequestFinished(@NonNull HttpRequest request) {
        if (request instanceof HttpZygoteRequest) {
            // This means the connection is down, finish all.
            for (Session session : mSessions.values()) {
                if (session.request != null && session.interceptors != null) {
                    for (HttpInterceptor interceptor : session.interceptors) {
                        interceptor.onRequestFinished(session.request);
                    }
                }
            }
            mSessions.clear();
        } else {
            Session session = mSessions.remove(request.id());
            if (session != null && session.interceptors != null) {
                for (HttpInterceptor interceptor : session.interceptors) {
                    interceptor.onRequestFinished(session.request);
                }
            }
        }
    }
One http virtual gateway may have multi http sessions, but we don't want to share interceptors
between them. Use a container to manage different sessions, every session has independent
interceptor instances.

@author Megatron King
@since 2019/1/6 16:13
netbare-core/src/main/java/com/github/megatronking/netbare/http/ContainerHttpInterceptor.java