KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > tools > testrecorder > server > FilterData


1 /*
2  * Copyright 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  * $Header:$
17  */

18
19 package org.apache.beehive.netui.tools.testrecorder.server;
20
21 import org.apache.beehive.netui.tools.testrecorder.server.state.PlaybackSession;
22 import org.apache.beehive.netui.tools.testrecorder.server.state.SessionFailedException;
23 import org.apache.beehive.netui.tools.testrecorder.server.state.RecordSession;
24 import org.apache.beehive.netui.tools.testrecorder.shared.RequestData;
25 import org.apache.beehive.netui.tools.testrecorder.shared.ResponseData;
26
27 import javax.servlet.ServletResponse JavaDoc;
28 import javax.servlet.ServletRequest JavaDoc;
29 import javax.servlet.ServletException JavaDoc;
30 import java.io.IOException JavaDoc;
31
32 /**
33  * User: ozzy
34  * Date: Jul 8, 2004
35  * Time: 3:28:25 PM
36  */

37 public interface FilterData {
38
39     void init() throws SessionFailedException;
40
41     ServletRequest JavaDoc getRequest();
42
43     ServletResponse JavaDoc getResponse();
44
45     ServletResponse JavaDoc getNewResponse();
46
47     String JavaDoc getReqURI();
48
49     boolean isNewRequest();
50
51     boolean isSkipFilter();
52
53     public boolean isTestException();
54
55     String JavaDoc getTestId();
56
57     boolean isPlayback();
58
59     PlaybackSession getPlaybackSession();
60
61     void setPlaybackSession( PlaybackSession playbackSession );
62
63     boolean isRecording();
64
65     boolean isNewRecording();
66
67     RecordSession getRecordingSession();
68
69     void setRecordingSession( RecordSession recordSession );
70
71     void clearRecording();
72
73     RequestData getReqData();
74
75     ResponseData getRespData();
76
77     void setRespData( boolean replaceSessionId ) throws SessionFailedException;
78
79     void addTestException( Throwable JavaDoc e );
80
81     int getTestExceptionCount();
82
83     /**
84      * return the first test exception if one exists.
85      *
86      * @return the first test exception or null if no exceptions exist
87      */

88     Throwable JavaDoc getTestException();
89
90     Throwable JavaDoc getTestException( int i );
91
92     void addSessionException( Throwable JavaDoc e );
93
94     int getSessionExceptionCount();
95
96     Throwable JavaDoc getSessionException( int i );
97
98     /**
99      * rethrow the first test exception if it exists.
100      *
101      * @throws IOException
102      * @throws ServletException
103      */

104     void throwTestException() throws IOException JavaDoc, ServletException JavaDoc;
105
106 }
107
Popular Tags