org.apache.wiki
Interface Watchable


public interface Watchable

A watchdog needs something to watch. If you wish to be watched, implement this interface.


Method Summary
 String getName()
          Returns a human-readable name of this Watchable.
 boolean isAlive()
          Returns true, if this Watchable is still alive and can be watched; otherwise false.
 void timeoutExceeded(String state)
          This is a callback which is called whenever your expected completion time is exceeded.
 

Method Detail

timeoutExceeded

void timeoutExceeded(String state)
This is a callback which is called whenever your expected completion time is exceeded. The current state of the stack is available.

Parameters:
state - The state in which your Watchable is currently.

getName

String getName()
Returns a human-readable name of this Watchable. Used in logging.

Returns:
The name of the Watchable.

isAlive

boolean isAlive()
Returns true, if this Watchable is still alive and can be watched; otherwise false. For example, a stopped Thread is not very interesting to watch.

Returns:
the result


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.