The CompletionHandler<V,A> Interface in Asynchronous context

Alan Bateman Alan.Bateman at Sun.COM
Thu Nov 12 07:28:37 PST 2009


向雅 wrote:
> I mean add the additional completed method for EOF, and only for EOF.
>
> :
>   
OK, I think I understand now - you're suggesting that we add 
ReadCompletionHandler that extends CompletionHandler and defines a 
one-arg completed method. The two-arg completed method is invoked when 
bytes are read and the one-arg when EOF is reached. Couldn't you just 
implement CompletionHandler and do the dispatching in the completed method?

-Alan.


More information about the nio-dev mailing list