Package twisted :: Package internet :: Module interfaces :: Class IDelayedCall

[frames | no frames]

## Class IDelayedCall

    Interface --+
                |
               IDelayedCall

A scheduled call.

There are probably other useful methods we can add to this interface; suggestions are welcome.

Method Summary
| ``active`(self)` Return a bool representing whether or not this call has been called or cancelled.
| ``cancel`(self)` Cancel the scheduled call.
| ``delay`(self, secondsLater)` Delay the scheduled call.
| ``getTime`(self)` Get time when delayed call will happen.
| ``reset`(self, secondsFromNow)` Reset the scheduled call's timer.

Method Details

### active(self)

  Returns:
    A bool representing whether or not this call has been called or cancelled. (True == This DelayedCall has not been called or cancelled. False, otherwise).

### cancel(self)

Cancel the scheduled call.

  Raises:
    `twisted.internet.error.AlreadyCalled` - if the call has already happened.
    `twisted.internet.error.AlreadyCancelled` - if the call has already been cancelled.

### delay(self, secondsLater)

Delay the scheduled call.

  Parameters:
    `secondsLater` - how many seconds from its current firing time to delay
  Raises:
    `twisted.internet.error.AlreadyCalled` - if the call has already happened.
    `twisted.internet.error.AlreadyCancelled` - if the call has already been cancelled.

### getTime(self)

Get time when delayed call will happen.

  Returns:
    time in seconds since epoch (a float).

### reset(self, secondsFromNow)

Reset the scheduled call's timer.

  Parameters:
    `secondsFromNow` - how many seconds from now it should fire, equivalent to `self.cancel()` and then doing another `reactor.callLater(secondsLater, ...)`
  Raises:
    `twisted.internet.error.AlreadyCalled` - if the call has already happened.
    `twisted.internet.error.AlreadyCancelled` - if the call has already been cancelled.

Generated by Epydoc 2.0 on Sat May 15 20:07:42 2004 | http://epydoc.sf.net