com.sun.grizzly.tcp
Interface CompletionHandler<E>


public interface CompletionHandler<E>

A handler for consuming the result of an Response.suspend() operation. A Response.suspend() defined in this package allow a completion handler to be specified to consume the result of Response.resume() or Response.cancel() operation. The resumed(E) method is invoked when Response.resume() resumes successfully. The CompletionHandler#cancelled() method is invoked when the Response.cancel() is invoked or when the timeout expires. The implementations of these methods should resume in a timely manner so as to avoid keeping the invoking thread from dispatching to other completion handlers.

Author:
Jeanfrancois Arcand

Method Summary
 void cancelled(E attachment)
          Invoked when an Response.cancel() is invoked or when a timeout expire.
 void resumed(E attachment)
          Invoked when an operation has resumed Response.resume()
 

Method Detail

resumed

void resumed(E attachment)
Invoked when an operation has resumed Response.resume()


cancelled

void cancelled(E attachment)
Invoked when an Response.cancel() is invoked or when a timeout expire.



Copyright © 2012 Oracle Corporation. All Rights Reserved.