Class PauseHandler
java.lang.Object
com.ning.http.client.providers.grizzly.PauseHandler
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidMarks the underlyingFilterChainContextso that the event filter knows that should pause the event processing after the current action.voidresume()Resumes the event processing with the action saved when paused.
-
Constructor Details
-
PauseHandler
public PauseHandler(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
-
-
Method Details
-
requestPause
public void requestPause()Marks the underlyingFilterChainContextso 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 callingresume(). -
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.
-