01: /*
02: * GWT-Ext Widget Library
03: * Copyright(c) 2007-2008, GWT-Ext.
04: * licensing@gwt-ext.com
05: *
06: * http://www.gwt-ext.com/license
07: */
08:
09: package com.gwtext.client.core.event;
10:
11: import com.gwtext.client.core.Connection;
12:
13: /**
14: * The ConnectionListener interface.
15: *
16: * @see Connection
17: */
18: public interface ConnectionListener {
19:
20: /**
21: * Fires before a network request is made to retrieve a data object.
22: *
23: * @param conn the Collection
24: * @return false to abort the request
25: */
26: boolean doBeforeRequest(Connection conn);
27:
28: /**
29: * Fires if the request was successfully completed.
30: *
31: * @param conn the Connection
32: * @param responseText the response text
33: */
34: void onRequestComplete(Connection conn, String responseText);
35:
36: /**
37: * Fires if an error HTTP status was returned from the server.
38: *
39: * @param conn the Connection
40: * @param httpStatus the http status code
41: * @param responseText the response text
42: */
43: void onRequestException(Connection conn, int httpStatus,
44: String responseText);
45: }
|