You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Tai Phuoc Tran <tp...@tma.com.vn> on 2012/10/17 14:13:52 UTC

SSHD support readline as MINA

Hi,

I'm currently working on project that use mina as io fwk. Currently, we 
need to move to use apache sshd, however with new architecture of sshd 
which based on stream. And messages are send character by character 
without any handle of deleting characters (when hit backspace)

In Mina, we just simple implement 
IoHandlerAdapter.messageReceived(IoSession, Object) -> then we have 
Object that contains a string (not character).

I know we can use jline, and do similar thing as in karaf project do in 
order to handle a incoming command. However, we need to maintain these 
code, and I don't like it, I expect it should be covered by Apache Mina 
SSHD.

Any ideal that we've already had a package to adapt with apache sshd to 
provide such basic feature ?

Regards,
Tai

Re: SSHD support readline as MINA

Posted by Guillaume Nodet <gn...@gmail.com>.
On Wed, Oct 17, 2012 at 2:13 PM, Tai Phuoc Tran <tp...@tma.com.vn> wrote:

> Hi,
>
> I'm currently working on project that use mina as io fwk. Currently, we
> need to move to use apache sshd, however with new architecture of sshd
> which based on stream. And messages are send character by character without
> any handle of deleting characters (when hit backspace)
>
>
Which sshd library were you using before that mina sshd ?


> In Mina, we just simple implement IoHandlerAdapter.**messageReceived(IoSession,
> Object) -> then we have Object that contains a string (not character).
>

Mmh, that's really not how sshd works.


>
> I know we can use jline, and do similar thing as in karaf project do in
> order to handle a incoming command. However, we need to maintain these
> code, and I don't like it, I expect it should be covered by Apache Mina
> SSHD.
>

You don't like jline code or you don't line maintaining it ?  Jline 2 is a
bit more complicated than the old version.  You could use the old one if
you want a simpler code.


>
> Any ideal that we've already had a package to adapt with apache sshd to
> provide such basic feature ?
>
>
No.  I think jline is the de facto readline library in java and used by
lots of projects beyond karaf.


> Regards,
> Tai
>



-- 
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com