OpenNMS API 1.2.3

org.opennms.core.fiber
Interface PausableFiber

All Superinterfaces:
Fiber
All Known Subinterfaces:
NotifdQueueHandler
All Known Implementing Classes:
Actiond, Capsd, Collectd, DefaultQueueHandler, Dhcpd, Discovery, Eventd, EventQueueProcessor, Executor, Executor, Notifd, OutageManager, PingManager, PingManager.Pinger, Poller, ReplyReceiver, RTCManager, Scheduler, Scheduler, Scheduler, Scriptd, Threshd, Trapd, TrapQueueProcessor, Vacuumd, Vulnscand, Xmlrpcd

public interface PausableFiber
extends Fiber

This interface defines an extension to the core Fiberinterface and adds the methods for pausing and resuming an executable context. The base interface class defines an execution environment, this interface extends the core interface to provide methods for suspending and resuming the Fiber.

Author:
Brian Weaver , OpenNMS

Field Summary
static int PAUSE_PENDING
          This state is used to define when a Fiber has begun the process of pausing its operations.
static int PAUSED
          This state is used to denote a paused, or otherwise suspended Fiber.
static int RESUME_PENDING
          This state is used to denote a Fiber recovering from a paused state to a running status.
 
Fields inherited from interface org.opennms.core.fiber.Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
 
Method Summary
 void pause()
          This method is used to suspend a currently running Fiber.
 void resume()
          This method is used to resume a suspeneded Fiber.
 
Methods inherited from interface org.opennms.core.fiber.Fiber
getName, getStatus, start, stop
 

Field Detail

PAUSE_PENDING

public static final int PAUSE_PENDING
This state is used to define when a Fiber has begun the process of pausing its operations. This is the intermedate period where the thread is no longer in the RUNNING status, but not yet to a PAUSED status.

See Also:
Constant Field Values

PAUSED

public static final int PAUSED
This state is used to denote a paused, or otherwise suspended Fiber. When a Fiber is in this state it should not be preforming any work.

See Also:
Constant Field Values

RESUME_PENDING

public static final int RESUME_PENDING
This state is used to denote a Fiber recovering from a paused state to a running status. During this status the Fiber is reinitializing any necessary internal elements to re-enter the RUNNING state.

See Also:
Constant Field Values
Method Detail

pause

public void pause()
This method is used to suspend a currently running Fiber. When invoked the Fiber will begin the transition to a PAUSED status after changing its internal state, if applicable.


resume

public void resume()
This method is used to resume a suspeneded Fiber. If the thread is already running then this method should have no effect on the current Fiber.


OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.