activemq-cpp-3.6.0
decaf::util::concurrent::Callable< V > Class Template Reference

A task that returns a result and may throw an exception. More...

#include <src/main/decaf/util/concurrent/Callable.h>

Inheritance diagram for decaf::util::concurrent::Callable< V >:

Public Member Functions

virtual ~Callable ()
virtual V call ()=0
 Computes a result, or throws an exception if unable to do so.
- Public Member Functions inherited from decaf::util::concurrent::CallableType
virtual ~CallableType ()

Detailed Description

template<typename V>
class decaf::util::concurrent::Callable< V >

A task that returns a result and may throw an exception.

Implementors define a single method with no arguments called call. This interface differs from the Runnable interface in that a Callable object can return a result and is allowed to throw an exceptions from its call method.

The Executors class contains utility methods to convert from other common forms to Callable classes.

Since
1.0

Constructor & Destructor Documentation

template<typename V>
virtual decaf::util::concurrent::Callable< V >::~Callable ( )
inlinevirtual

Member Function Documentation

template<typename V>
virtual V decaf::util::concurrent::Callable< V >::call ( )
pure virtual

Computes a result, or throws an exception if unable to do so.

Returns
Computed Result.
Exceptions
ExceptionIf unable to compute a result.

The documentation for this class was generated from the following file: