template class Poco::ActiveResultHolder<void>

Overview

#include <ActiveResult.h>

template <>
class ActiveResultHolder<void>: public Poco::RefCountedObject
{
public:
    // methods

    void
    wait();

    bool
    tryWait(long milliseconds);

    void
    wait(long milliseconds);

    void
    notify();

    bool
    failed() const;

    std::string
    error() const;

    Exception*
    exception() const;

    void
    error(const Exception& exc);

    void
    error(const std::string& msg);
};

Inherited Members

public:
    // methods

    void
    duplicate() const;

    void
    release() const;

    int
    referenceCount() const;

Detailed Documentation

Methods

void
wait()

Pauses the caller until the result becomes available.

bool
tryWait(long milliseconds)

Waits up to the specified interval for the result to become available.

Returns true if the result became available, false otherwise.

void
wait(long milliseconds)

Waits up to the specified interval for the result to become available.

Throws a TimeoutException if the result did not became available.

void
notify()

Notifies the invoking thread that the result became available.

bool
failed() const

Returns true if the active method failed (and threw an exception).

Information about the exception can be obtained by calling error().

std::string
error() const

If the active method threw an exception, a textual representation of the exception is returned.

An empty string is returned if the active method completed successfully.

Exception*
exception() const

If the active method threw an exception, a clone of the exception object is returned, otherwise null.

void
error(const Exception& exc)

Sets the exception.

void
error(const std::string& msg)

Sets the exception.