KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > latka > event > RequestErrorEvent


1 /*
2  * Copyright 1999-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.commons.latka.event;
18
19 import org.apache.commons.latka.http.Request;
20 import org.apache.commons.latka.http.Response;
21
22 /**
23  * An event that represents an error that occurred processing a request
24  *
25  * @author Morgan Delagrange
26  * @author dIon Gillard
27  * @version $Id: RequestErrorEvent.java 155424 2005-02-26 13:09:29Z dirkv $
28  */

29 public class RequestErrorEvent extends BaseRequestEvent {
30     
31     /**
32      * holds the error
33      */

34     private Throwable JavaDoc _t = null; // FIXME: Scope?
35

36     /**
37      * Create an event from the request, response and some Throwable
38      * @param request the request in error
39      * @param response the response generated
40      * @param t Some throwable representing the error, e.g. an Exception
41      */

42     public RequestErrorEvent(Request request, Response response, Throwable JavaDoc t) {
43         super(request, response);
44         _t = t;
45     }
46
47
48     /**
49      * provides access to the Throwable representing the request error
50      * @return the Throwable of the request error
51      */

52     public Throwable JavaDoc getError() {
53         return _t;
54     }
55 }
56
Popular Tags