mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Irving, Dave" <dave.irv...@logicacmg.com>
Subject NIO channel "commands" or something mad like that....
Date Thu, 01 Jun 2006 12:59:29 GMT
Hi,

Just brainstorming really, but here's the deal...
Suppose I want to transfer the contents of a file through mina.
Right now, I have to do this directly by reading in the file and writing
it out through the session.
However, what would be nice would be if I could make use of
FileChannel#transferTo(WritableByteChannel,...).

How cool would that be?

But, of course, there are write ordering issues and such like. So even
if I could grab hold of the channel somehow, I couldn't just transfer to
it - as mina might already be doing some queued writes.

So Im thinking maybe something like a channel "command" or something?

session.perform(SomeKindOfChannelCommand);

Mina queues it, just like a write, and then invokes it when its time
comes.
Obviously a lot more thought would be needed on this (e.g. what
"SomeKindOfchannelCommand" actually looks like, what the invocation
semantics are - blocking / non blocking etc).

Any thoughts? Is this just a stupid idea....?

Dave


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

Mime
View raw message