org.apache.directory.server.ldap.handlers
Class SearchTimeLimitingMonitor

java.lang.Object
  extended by org.apache.directory.server.ldap.handlers.SearchTimeLimitingMonitor
All Implemented Interfaces:
ClosureMonitor

public class SearchTimeLimitingMonitor
extends java.lang.Object
implements ClosureMonitor

A ClosureMonitor implementation which takes into account a time limit.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
SearchTimeLimitingMonitor(long timeToLive, java.util.concurrent.TimeUnit unit)
          Creates a new instance of SearchTimeLimitingMonitor.
 
Method Summary
 void checkNotClosed()
           
 void close()
           
 void close(java.lang.Exception cause)
           
 void close(java.lang.String cause)
           
 java.lang.Exception getCause()
           
 boolean isClosed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchTimeLimitingMonitor

public SearchTimeLimitingMonitor(long timeToLive,
                                 java.util.concurrent.TimeUnit unit)
Creates a new instance of SearchTimeLimitingMonitor.

Parameters:
timeToLive - the time before changing state to closed.
unit - the time units for the timeToLive parameter
See Also:
TimeUnit}
Method Detail

checkNotClosed

public void checkNotClosed()
                    throws java.lang.Exception
Specified by:
checkNotClosed in interface ClosureMonitor
Throws:
java.lang.Exception

close

public void close()
Specified by:
close in interface ClosureMonitor

close

public void close(java.lang.String cause)
Specified by:
close in interface ClosureMonitor

close

public void close(java.lang.Exception cause)
Specified by:
close in interface ClosureMonitor

getCause

public java.lang.Exception getCause()
Specified by:
getCause in interface ClosureMonitor

isClosed

public boolean isClosed()
Specified by:
isClosed in interface ClosureMonitor


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.