Class PauseHandler

java.lang.Object
com.ning.http.client.providers.grizzly.PauseHandler

public class PauseHandler extends Object
Handler to pause/resume event processing. Useful when an AsyncHandler's resources are saturated, and it can't handle a piece of content temporarily. If the handler uses the requestPause() method, it's also responsible for calling resume() when it could handle the part correctly.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PauseHandler(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Marks the underlying FilterChainContext so that the event filter knows that should pause the event processing after the current action.
    void
    Resumes the event processing with the action saved when paused.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PauseHandler

      public PauseHandler(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
  • Method Details

    • requestPause

      public void requestPause()
      Marks the underlying FilterChainContext so that the event filter knows that should pause the event processing after the current action. If the user calls this method, it's responsible to resume the event processing by calling resume().
    • resume

      public void resume()
      Resumes the event processing with the action saved when paused. If a pause action wasn't saved yet (because this method is called before the actual pause happens), it doesn't call resume.