KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.List JavaDoc;
20
21 import org.apache.commons.latka.http.Request;
22 import org.apache.commons.latka.http.Session;
23
24 /**
25  * An extension to LatkaEventListener that stores the success or
26  * failure of all requests.
27  * All of these events should report true by default. They
28  * should only report false once an unsuccessful request
29  * is reported to the listener.
30  *
31  * @author Morgan Delagrange
32  * @version $Id: LatkaEventInfo.java 155424 2005-02-26 13:09:29Z dirkv $
33  */

34 public interface LatkaEventInfo extends LatkaEventListener {
35
36   /**
37    * Check to see if a particular Request succeeded or failed.
38    *
39    * @param request the request to check for success or
40    * failure
41    * @return true if request succeeded
42    */

43   boolean didRequestSucceed(Request request);
44
45   /**
46    * Check to see if a particular Session succeeded or failed.
47    * Once a request inside a session fails, the session itself
48    * is marked as a failure.
49    *
50    * @param session the session to check for success or
51    * failure
52    * @return true if all requests in the session succeeded
53    */

54   boolean didSessionSucceed(Session session);
55
56   /**
57    * Returns true if all Requests in the suite succeed.
58    *
59    * @return true if all Requests have succeeded
60    */

61   boolean didSuiteSucceed();
62
63   /**
64    * Returns a List of all responses that failed
65    * validation.
66    *
67    * @return List of failed Responses
68    */

69   List JavaDoc getFailedResponses();
70 }
71
Popular Tags