dev@grizzly.java.net

About async read, write inteface and UDPConnectorHandler's blocking write

From: Bongjae Chang <carryel_at_korea.com>
Date: Thu, 14 May 2009 19:32:24 +0900

Hi,

I have several proposals and questions.

(1)
CacheableConnector doesn't implement AsyncQueueWritable and AsyncQueueReadable interface.

I think that it is not difficult that CacheableConnector implements AsyncQueueWritable and AsyncQueueReadable interfaces.

What do you think?

(2)
XXXConnectorHandler already implements AsyncQueueWritable and AsyncQueueReadable interfaces except for CacheableConnector, so how about moving two interfaces to ConnectorHandler interface like this?
----
public interface ConnectorHandler extends Handler, Closeable, AsyncQueueWritable, AsyncQueueReadable {
...
}
----

Then, does ConnectorHandler owe too many duties?

(3)
UDPConnectorHandler doesn't support a blocking write like this.
----
public long write(ByteBuffer byteBuffer, boolean blocking) throws IOException {
    ...
    if( blocking) {
        throw new IllegalStateException("Blocking mode not supported");
    } else {
        ...
    }
}
----

I am curious to know the reason.

Please advice me.

Thanks.

--
Bongjae Chang