mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Bosteels" <mbosteels....@gmail.com>
Subject Re: Basic Development Question
Date Thu, 28 Feb 2008 08:31:57 GMT

On Thu, Feb 28, 2008 at 2:54 AM, Aviator <aviator_01@hotmail.com> wrote:

> Hello  I'm somewhat new to MINA. Currently using V2.0 on Win XP. I was
> wondering what the correct approach would be for trying to do the following:
> I have a simple server which accepts client connections (very much like
> the one in the MINA v2.0 Quick Start Guide). Suppose some event is
> triggered within the server in a separate event thread (from the threads
> managing the client sessions). Suppose this event is time based (happens
> everyday at 12:00pm) and is a simple message which is to be sent to a
> specific client saying 'Lunch Time'. What is the correct approach needed for
> this event thread to contact the appropriate client session to send the
> message 'Lunch Time'? Is it as simple as the event thread performing a
> session.write(aObject) for the appropriate client

yes, that should work.

> or is there some more amazing way to achieve this? For example, can the
> event thread inform the client session that there is a message which needs
> to be sent and let the client session's thread actually do the write?

I don't think there is a mechanism like that. And I think the first approach
is easier, no ?


> Thanks
> _________________________________________________________________

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message