edu.utexas.its.eis.tools.qwicap.servlet
Interface QwicapBlockingListener


public interface QwicapBlockingListener

A QwicapBlockingListener provides a mechanism by which an application can be notified just before and after Qwicap blocks in one of its prompt or redirect methods. Such notifications allow applications, for instance, to automatically release and re-acquire resources like database connections which they might not want to leave tied-up while waiting for the user to supply input, or for an abandoned session to time-out.

Invocations of qwicapBlocked and qwicapUnblocked are always paired, and are never nested. If an invocation of qwicapBlocked throws an exception, the corresponding invocation of qwicapUnblocked will not be performed. The exception will not prevent Qwicap from blocking, because Qwicap will catch, log and discard the exception.

Author:
Chris W. Johnson

Method Summary
 Object qwicapBlocked(BlockingDescription BlockInfo)
          Invoked just before Qwicap blocks to await a user's response to a prompt or redirect invocation.
 void qwicapUnblocked(BlockingDescription BlockInfo, Object YourObject)
          Invoked just after Qwicap unblocks, but before it returns to your application's code.
 

Method Detail

qwicapBlocked

Object qwicapBlocked(BlockingDescription BlockInfo)
Invoked just before Qwicap blocks to await a user's response to a prompt or redirect invocation. This method may return any object, or null. Whatever it returns is passed to the next invocation of your qwicapUnblocked method as the YourObject parameter.

Parameters:
BlockInfo - A description of the event that is causing blocking to occur.
Returns:
Any object, or null. This value will be passed to your qwicapUnblocked method as the YourObject parameter the next time that method is invoked. You may use (or not use) this mechanism in any manner that you wish.

qwicapUnblocked

void qwicapUnblocked(BlockingDescription BlockInfo,
                     Object YourObject)
Invoked just after Qwicap unblocks, but before it returns to your application's code.

Parameters:
BlockInfo - A description of the event that caused blocking to occur.
YourObject - The object, or null that was returned by the previous invocation of your qwicapBlocked method. You may use (or not use) this mechanism in any manner that you wish.