org.identityconnectors.framework.impl.api
Class MethodTimeoutProxy

java.lang.Object
  extended by org.identityconnectors.framework.impl.api.MethodTimeoutProxy
All Implemented Interfaces:
InvocationHandler

public class MethodTimeoutProxy
extends Object
implements InvocationHandler

General-purpose timeout proxy for providing timeouts on all methods on the underlying object. Currently just used for APIOperations, but could wrap any object. NOTE: this is not used for search because search needs timeout on an element by element basis. Moreover, it would be unsafe for search since the thread could continue to return elements after it has timed out and we need to guarantee that not happen.


Constructor Summary
MethodTimeoutProxy(Object target, long timeoutMillis)
          Create a new MethodTimeoutProxy
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodTimeoutProxy

public MethodTimeoutProxy(Object target,
                          long timeoutMillis)
Create a new MethodTimeoutProxy

Parameters:
target - The object we are wrapping
timeoutMillis -
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable


Copyright © 2011. All Rights Reserved.