Package org.eclipse.net4j.util.om.monitor

# Class TimeoutMonitor

java.lang.Object
org.eclipse.net4j.util.om.monitor.AbstractMonitor
org.eclipse.net4j.util.om.monitor.Monitor
org.eclipse.net4j.util.om.monitor.TimeoutMonitor

All Implemented Interfaces:
  `OMMonitor`, `OMMonitorProgress`

public class TimeoutMonitor extends Monitor

Since:
  2.0
Author:
  Eike Stepper

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.net4j.util.om.monitor.AbstractMonitor

`AbstractMonitor.AsyncTimerTask`

## Nested classes/interfaces inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor

`OMMonitor.Async, OMMonitor.AsyncMonitor`

## Field Summary

### Fields inherited from class org.eclipse.net4j.util.om.monitor.Monitor

`DEFAULT_ASYNC_SCHEDULE_PERIOD`

### Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor

`DEFAULT_TIME_FACTOR, THOUSAND`

### Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorProgress

`HUNDRED, ONE, TEN, ZERO`

## Constructor Summary

Constructors
Constructor
Description
`TimeoutMonitor(long timeout)`

## Method Summary

Modifier and Type
Method
Description
`OMMonitor`
`begin(double totalWork)`
`void`
`cancel(RuntimeException cancelException)`
`void`
`checkCanceled()`
`void`
`done()`
`OMMonitor`
`fork(double work)`
`OMMonitor.Async`
`forkAsync(double work)`
`long`
`getTimeout()`
`protected void`
`handleTimeout(long untouched)`
`boolean`
`isCanceled()`
`void`
`setTimeout(long timeout)`
`void`
`touch()`
`void`
`worked(double work)`

### Methods inherited from class org.eclipse.net4j.util.om.monitor.Monitor

`cancel, getAsyncSchedulePeriod, getTimer, scheduleAtFixedRate`

### Methods inherited from class org.eclipse.net4j.util.om.monitor.AbstractMonitor

`begin, createAsyncTimerTask, createNestedMonitor, fork, forkAsync, getTotalWork, getWork, getWorkPercent, hasBegun, percent, worked`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TimeoutMonitor

public TimeoutMonitor(long timeout)

## Method Details

### getTimeout

public long getTimeout()

### setTimeout

public void setTimeout(long timeout)

### touch

public void touch()

### begin

public OMMonitor begin(double totalWork)

Specified by:
  `begin` in interface `OMMonitor`
Overrides:
  `begin` in class `AbstractMonitor`

### worked

public void worked(double work)

Specified by:
  `worked` in interface `OMMonitor`
Overrides:
  `worked` in class `AbstractMonitor`

### fork

public OMMonitor fork(double work)

Specified by:
  `fork` in interface `OMMonitor`
Overrides:
  `fork` in class `AbstractMonitor`

### forkAsync

public OMMonitor.Async forkAsync(double work)

Specified by:
  `forkAsync` in interface `OMMonitor`
Overrides:
  `forkAsync` in class `AbstractMonitor`

### done

public void done()

Specified by:
  `done` in interface `OMMonitor`
Overrides:
  `done` in class `AbstractMonitor`

### cancel

public void cancel(RuntimeException cancelException)

Overrides:
  `cancel` in class `Monitor`

### isCanceled

public boolean isCanceled()

Specified by:
  `isCanceled` in interface `OMMonitor`
Overrides:
  `isCanceled` in class `Monitor`

### checkCanceled

public void checkCanceled() throws MonitorCanceledException

Specified by:
  `checkCanceled` in interface `OMMonitor`
Overrides:
  `checkCanceled` in class `Monitor`
Throws:
  `MonitorCanceledException`

### handleTimeout

protected void handleTimeout(long untouched)