edu.emory.mathcs.h2o
Interface Pluglet.Suspendible

Enclosing interface:
Pluglet

public static interface Pluglet.Suspendible

Optional interface to be implemented by the pluglet that wishes to be notified before being suspended and after being resumed.


Method Summary
 void resume()
          Invoked by the kernel after the pluglet was resumed.
 void suspend()
          Invoked by the kernel when the pluglet is about to be suspended.
 

Method Detail

suspend

public void suspend()
Invoked by the kernel when the pluglet is about to be suspended. After this method returns, new remote invocations are blocked, pending invocations are granted kernel and policy-specific grace period to complete and are frozen afterwards. All threads created (implicitly or explicitly) by the Pluglet.start() method or by client-invoked methods are suspended.


resume

public void resume()
Invoked by the kernel after the pluglet was resumed. At this time, all threads suspended by PlugletContext.suspend() method are resumed. After this method returns, pluglet goes into "ACTIVE" state and remote calls are enabled again, unless there has been another suspend or destroy request, in which case Pluglet.stop() or Pluglet.destroy() method may be invoked before remote calls were enabled.