KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > serverless > ChannelState


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.jms.serverless;
8
9 import org.jboss.logging.Logger;
10
11 /**
12  * An object whose lock is used to control the Connection Management Thread. Has a binary state
13  * (open/not open).
14  *
15  * @author Ovidiu Feodorov <ovidiu@jboss.org>
16  * @version $Revision: 1.1 $ $Date: 2004/04/15 22:54:19 $
17  *
18  **/

19 public class ChannelState {
20
21     private static final Logger log = Logger.getLogger(ChannelState.class);
22
23     private boolean open;
24
25     public ChannelState() {
26         open = false;
27     }
28
29     public synchronized boolean isOpen() {
30         return open;
31     }
32
33     public synchronized boolean isNotOpen() {
34         return !open;
35     }
36
37     public synchronized void setOpen(boolean b) {
38         open = b;
39     }
40
41 }
42
Popular Tags