Patent ID: 8799924
Filing Date: 2014-08-05
Classification: G06F

Abstract:
1. A computer readable storage medium comprising a computer readable program stored on a tangible storage device for applying timed operations to non-timed functions, wherein the computer readable program when executed on a computer causes the computer to: discover, by parsing source code, a caller calling a function, wherein the function does not perform timed operations; encapsulate the function in a timed method adapter; call the timed method adapter in place of the function from the caller, passing the timed method adapter an object and an argument for the function; call a set invoker from the timed method adapter, passing the set invoker the object, the function, and the argument for the function; call an invoke thread from the set invoker; return from the set invoker to the timed method adapter; wait for an execution result from the function at the timed method adapter, monitoring for an expiration of a timeout; invoke the function from the invoke thread, passing the function the object and the argument; if the function returns the execution result before expiration of the timeout, return the execution result to the caller; and if the timeout expires before the function returns the execution result, direct the invoke thread to cancel the function and return a timeout exception to the caller.