org.ow2.dragon.util
Class AbstractTimeout<T>

java.lang.Object
  extended by org.ow2.dragon.util.AbstractTimeout<T>

public abstract class AbstractTimeout<T>
extends java.lang.Object

Author:
ofabre - eBM Websourcing

Constructor Summary
protected AbstractTimeout()
           
 
Method Summary
protected abstract  T command()
          Method to execute with a timeout limit
protected abstract  void commandTimeOut(T result)
          Method executed if timout occured but result is ok
 T execute(int timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTimeout

protected AbstractTimeout()
Method Detail

execute

public T execute(int timeout)
          throws java.util.concurrent.TimeoutException
Throws:
java.util.concurrent.TimeoutException

commandTimeOut

protected abstract void commandTimeOut(T result)
Method executed if timout occured but result is ok

Parameters:
result - the result object

command

protected abstract T command()
Method to execute with a timeout limit

Returns:
the result Object


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.