On 8/11/07, Igor Grigoryev <[EMAIL PROTECTED]> wrote: > > Hello, > I'm new to MINA and I need any design recommendations you can provide. > > I'm trying to implement data acquisition server that receives data from > GPRS-enabled devices. Those devices maintain persistent TCP connections for > registering, sending requests and some data on server. > > The server in turn must have possibility to send configuration commands to > those devices. I'm planing to write GUI administration utility that will > interact with server by RMI or CORBA means to provide administrator with > remote device configuration. > > So the question is: "How should I inject request from configuration > utility into specific IoSession associated with specific device?" > > As for now I have no other idea than to put IoSessions into global > collection like TreeMap<ClientId,IoSession> after registering on server. And > then use IoSession.write() to inject requests, generated by remote > configuration utility RMI or CORBA call. > > Can you advise me with more elegant solution?
You can also get the set of currently connected sessions by calling IoAcceptor.getManagedSessions(). Except that, your approach looks OK to me. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
