org.apache.commons.messenger
Class Lock

java.lang.Object
  extended by org.apache.commons.messenger.Lock

public class Lock
extends Object

Lock is a simple lock.

Version:
$Revision: 155459 $
Author:
James Strachan

Constructor Summary
Lock()
           
 
Method Summary
 void acquire()
          Acquires the lock, blocking until the lock can be acquired
 boolean hasLock()
           
 void release()
          Release the lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lock

public Lock()
Method Detail

acquire

public void acquire()
Acquires the lock, blocking until the lock can be acquired

Throws:
InterruptedException

release

public void release()
             throws javax.jms.JMSException
Release the lock.

Throws:
javax.jms.JMSException

hasLock

public boolean hasLock()
Returns:


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.