Hi

Did you look at the camel-mina2 api? AFAIR the code is similar to mina
1.x, so hopefully you can do the same.

On Thu, Feb 13, 2014 at 4:30 PM, Bart <b.buc...@phxtecno.com> wrote:
> Hi,
> I have simple mina2 listener defined in spring bean:
> <camel:endpoint id="hl7Listener"
> uri="mina2:tcp://192.168.1.195:8812?sync=false&codec=#hl7codec&minaLogger=true&disconnectOnNoReply=false&noReplyLogLevel=DEBUG"/>
>
> And I'm connecting to this listener using HAPI HL7 test panel few clients. I
> have also a web page that shows some statistics. I would like to show on
> this page if there is any client connected with listener. I though that
> since this is TCP I would be able to get somehow sessions count from
> endpoint but I cannot find a way to do it in mina2. In mina (1) I found that
> you can do something like:
> IoAcceptor acceptor = hl7Listener.getAcceptor();
> Set<IoSession> sessions =
> acceptor.getManagedSessions(hl7Listener.getEndpointUri());
>
> and with sessions.size() I had count of how many clients are actually
> connected to this endpoint. Besides that I was able to simply use
> session.write() to write message to client.
>
> Is there any possibility to get sessions with Mina2Endpoint?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Mina2-and-HL7-listener-tp5747265.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to