Poco::RemotingNG::TCP

class TimerTask

Library: RemotingNG/TCP
Package: TCP
Header: Poco/RemotingNG/TCP/Timer.h

Description

A task that can be scheduled for one-time or repeated execution by a Timer.

This is an abstract class. Subclasses must override the run() member function to implement the actual task logic.

Inheritance

Direct Base Classes: Poco::RefCountedObject, Poco::Runnable

All Base Classes: Poco::RefCountedObject, Poco::Runnable

Known Derived Classes: Poco::RemotingNG::TCP::Listener::EventSubscription

Member Summary

Member Functions: cancel, isCancelled

Inherited Functions: duplicate, referenceCount, release, run

Types

Ptr

typedef Poco::AutoPtr < TimerTask > Ptr;

Constructors

TimerTask

TimerTask();

Creates the TimerTask.

Destructor

~TimerTask protected virtual

~TimerTask();

Destroys the TimerTask.

Member Functions

cancel

void cancel();

Cancels the execution of the timer. If the task has been scheduled for one-time execution and has not yet run, or has not yet been scheduled, it will never run. If the task has been scheduled for repeated execution, it will never run again. If the task is running when this call occurs, the task will run to completion, but will never run again.

isCancelled inline

bool isCancelled() const;

Returns true if and only if the TimerTask has been cancelled by a call to cancel().