JThreadKitTM
v1.1.0
(public members only)

com.jthreadkit
Interface TimedOutExceptionOption

All Known Subinterfaces:
BasicFIFO, ObjectFIFO, SizeMonitored, SizeMonitoredCollection, SizeMonitoredList, SizeMonitoredMap, SizeMonitoredSet, SizeMonitoredSortedMap, SizeMonitoredSortedSet
All Known Implementing Classes:
SyncBoolean, SyncInteger

public interface TimedOutExceptionOption

This interface is implemented by classes that want to allow users the option of throwing a TimedOutException upon a timeout instead of using a return value.


Method Summary
 boolean isUseTimedOutExceptionSet()
          Used to determine whether or not TimedOutException will be thrown by methods when timout periods expire.
 void setUseTimedOutException(boolean useException)
          Used to change the timeout behavior of methods on the implementing classes.
 

Method Detail

setUseTimedOutException

public void setUseTimedOutException(boolean useException)
                             throws ShutdownException
Used to change the timeout behavior of methods on the implementing classes. If this option is set to true methods will throw a TimedOutException when the specified timeout period expires. If this option is not set, methods usually signal a timeout through a return value. Use isUseTimedOutExceptionSet() to check the current setting.
Parameters:
useException - if true is passed then TimedOutException will be thrown after timeouts, if false is passed, timeouts do not result in exceptions.
Throws:
ShutdownException - if this object has already been shutdown.

isUseTimedOutExceptionSet

public boolean isUseTimedOutExceptionSet()
Used to determine whether or not TimedOutException will be thrown by methods when timout periods expire. The setUseTimedOutException() method is used to change this setting.
Returns:
true if timeouts will result in exceptions being thrown, false otherwise.

JThreadKitTM
v1.1.0
(public members only)

© Copyright 2000-2001 Programix Incorporated. All rights reserved. JThreadKit home