HttpUrlRequestListener.java revision 5c02ac1a9c1b504631c0a3d2b6e737b5d738bae1
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package org.chromium.net;
6
7/**
8 * Callback interface.
9 */
10public interface HttpUrlRequestListener {
11    /**
12     * A callback invoked when the first chunk of the response has arrived.
13     * The listener can only call request getContentType and getContentLength.
14     */
15    void onResponseStarted(HttpUrlRequest request);
16
17    /**
18     * The listener should completely process the response in the callback
19     * method. Immediately after the callback, the request object will be
20     * recycled.
21     */
22    void onRequestComplete(HttpUrlRequest request);
23}
24