AsynchronousByteCharChannel and Timeouts

Gili cowwoc at bbs.darktech.org
Fri Jul 31 07:46:45 PDT 2009


I just defined such an interface. Let me know what you think:

http://n2.nabble.com/file/n3363044/AsynchronousByteChannelTimeouts.java
AsynchronousByteChannelTimeouts.java 

Gili


Gili wrote:
> 
> Hi,
> 
> Is it possible to move the timeout-related methods out of
> AsynchronousSocketChannel into their own  interface? I want
> AsynchronousByteCharChannel (character/line reader on top of an
> AsynchronousByteChannel) to be able to function on top of
> AsynchronousByteChannels that support timeouts. AsynchronousSocketChannel
> is one such channel, but so is SerialPortChannel which I've implemented on
> my end.
> 
> The methods in question are:
> 
>   void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment,
> CompletionHandler<Integer, ? super A> handler);
>   void write(ByteBuffer src, long timeout, TimeUnit unit, A attachment,
> CompletionHandler<Integer, ? super A> handler);
> 
> Thanks,
> Gili
> 

-- 
View this message in context: http://n2.nabble.com/AsynchronousByteCharChannel-and-Timeouts-tp3363004p3363044.html
Sent from the nio-discuss mailing list archive at Nabble.com.



More information about the nio-discuss mailing list