1 /*
2 * $Header: /cvsroot/sinon/sinon/src/java/eteg/sinon/listener/ErrorListener.java,v 1.2 2005/06/21 14:25:08 thiagohp Exp $
3 * $Revision: 1.2 $
4 * $Date: 2005/06/21 14:25:08 $
5 * $Author: thiagohp $
6 *
7 * =============================================================================
8 *
9 * Copyright 2004-2005 Eteg Internet Ltda. (http://www.eteg.com.br)
10 *
11 * Licensed under the Apache License, Version 2.0 (the "License");
12 * you may not use this file except in compliance with the License.
13 * You may obtain a copy of the License at
14 *
15 * http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
22 */
23 package eteg.sinon.listener;
24
25 import eteg.sinon.exception.SinonException;
26 import eteg.sinon.executor.ErrorResponse;
27
28 /***
29 * Interface implemented by classes that handle error during the execution
30 * of a collector.
31 * Implementations of this interface must have a public, static method
32 * named <code>getInstance</code> that returns an instance of the class.
33 *
34 * @author <a href="mailto:thiagohp at users.sourceforge.net">Thiago H. de Paula Figueiredo</a>
35 * @author Last modified by $Author: thiagohp $
36 * @version $Revision: 1.2 $
37 */
38 public interface ErrorListener {
39
40 /***
41 * Handles an error ocurred during the execution of a collector and
42 * returns what action to take.
43 *
44 * @param exception a {@link SinonException} describing the error.
45 * @return a {@link ErrorResponse} instance.
46 */
47 public ErrorResponse onError(SinonException exception);
48
49 }