KickJava   Java API By Example, From Geeks To Geeks.

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


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.state;
20
21
22 /**
23  * User: ozzy
24  * Date: Mar 10, 2003
25  * Time: 10:10:37 AM
26  */

27 public interface Session {
28
29     /**
30      * returns true if session started, false if the session is already started. An excepion is thrown
31      * if an error occurs
32      *
33      * @return
34      * @throws SessionFailedException
35      */

36     boolean sessionStart() throws SessionFailedException;
37
38     /**
39      * Returns true if the session was ended or throws an exception if an error occured or the session
40      * failed to end.
41      * @return
42      * @throws SessionFailedException
43      */

44     boolean sessionEnd() throws SessionFailedException;
45
46     /**
47      * Returns true if the session was ended or throws an exception if an error occured or the session
48      * failed to end.
49      *
50      * @param loopTimeout wait time before checking to see if any running tests have completed.
51      * @param hardTimeout wait time before giving up on any running tests.
52      * @return
53      * @throws SessionFailedException
54      */

55     boolean sessionEnd( long loopTimeout, long hardTimeout ) throws SessionFailedException;
56
57     String JavaDoc getSessionName();
58
59     String JavaDoc getTestUser();
60
61     int testCount();
62
63     // session has been started, new tests may or may not be startable
64
boolean isSessionStarted();
65
66     // all tests have been persisted, no new tests may be started.
67
boolean isSessionFinished();
68
69 }
70
Popular Tags