KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > ime > MessageExchangeLifecycle


1 /*
2  * Copyright 2001-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 package org.apache.axis.ime;
17
18 /**
19  * Interface that may be provided by MessageExchange impl's
20  * to allow users to control the lifecycle of the "stuff"
21  * going on under the covers
22  *
23  * @author James M Snell (jasnell@us.ibm.com)
24  */

25 public interface MessageExchangeLifecycle {
26
27     /**
28      * Initialize the lifecycle. (Create threads, etc)
29      */

30     public void init();
31
32     /**
33      * Cleanup
34      */

35     public void cleanup()
36            throws InterruptedException JavaDoc ;
37
38     /**
39      * Performs a "safe shutdown", allowing all
40      * current activities to complete.
41      */

42     public void shutdown();
43
44     /**
45      * Performs an "unsafe shutdown", interrupting
46      * all current activities without letting
47      * them complete
48      */

49     public void shutdown(boolean force);
50
51     /**
52      * Block indefinitely until shutdown is
53      * complete.
54      */

55     public void awaitShutdown()
56             throws InterruptedException JavaDoc;
57
58     /**
59      * Block for the specified amount of time
60      * or until shutdown is complete
61      */

62     public void awaitShutdown(long timeout)
63             throws InterruptedException JavaDoc;
64
65 }
66
Popular Tags