You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by rksdivakar <sd...@gmail.com> on 2013/12/12 17:47:42 UTC

Retrieving user data from Telnet in Apache Mina

Hi All,

I am new to this Mina Framework. Exploring the Framework and its good to
learn.

I have a requirement where in the user will be validated in the validated by
following scenario:

1. user enters username via telnet. On validating the username a message is
displayed stating "valid user".
2. then user will enter password where, it will be checked in the properties
file and get validated.

Could only please share me tho logic behind this via telnet.

Via messageRecieved(IoSession session, Object message) method i am receiving
the username through String msg = message.toString();

How can i get the password?

Is it possible to retrieve the value from session object??

Please help.. Thanks in advance!!!!



--
View this message in context: http://apache-mina.10907.n7.nabble.com/Retrieving-user-data-from-Telnet-in-Apache-Mina-tp40722.html
Sent from the Apache MINA Developer Forum mailing list archive at Nabble.com.

Re: Retrieving user data from Telnet in Apache Mina

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 12/13/13 4:02 AM, rksdivakar a écrit :
> Jeff Can u please provide me an example for better clarity...

You have plenty examples on
http://mina.apache.org/mina-project/documentation.html#examples


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


RE: Retrieving user data from Telnet in Apache Mina

Posted by Steve Ulrich <st...@proemion.com>.
Google for "state machine". Think about, how communication looks like between server and client (google: "Message Exchange Pattern", typically request-response)
Then look again at what MINA can do for you. It's a framework to help implement what you want to do. But you need to know what you want do.

Looks like you're doing this for the first time. If time is no problem, first try it with plain IO. This helps you understand, how the communication is working under the hood. It shouldn't be a big problem to port to MINA afterwards.

regards

STeve

> rksdivakar [mailto:sdivakar.gct@gmail.com] wrote:
>
> Jeff Can u please provide me an example for better clarity...
>




Re: Retrieving user data from Telnet in Apache Mina

Posted by rksdivakar <sd...@gmail.com>.
Jeff Can u please provide me an example for better clarity...



--
View this message in context: http://apache-mina.10907.n7.nabble.com/Retrieving-user-data-from-Telnet-in-Apache-Mina-tp40722p40726.html
Sent from the Apache MINA Developer Forum mailing list archive at Nabble.com.

Re: Retrieving user data from Telnet in Apache Mina

Posted by Jeff MAURY <je...@jeffmaury.com>.
The password would normally be received in the following message. You
should probably manage a state for that.

Jeff


On Thu, Dec 12, 2013 at 5:47 PM, rksdivakar <sd...@gmail.com> wrote:

> Hi All,
>
> I am new to this Mina Framework. Exploring the Framework and its good to
> learn.
>
> I have a requirement where in the user will be validated in the validated
> by
> following scenario:
>
> 1. user enters username via telnet. On validating the username a message is
> displayed stating "valid user".
> 2. then user will enter password where, it will be checked in the
> properties
> file and get validated.
>
> Could only please share me tho logic behind this via telnet.
>
> Via messageRecieved(IoSession session, Object message) method i am
> receiving
> the username through String msg = message.toString();
>
> How can i get the password?
>
> Is it possible to retrieve the value from session object??
>
> Please help.. Thanks in advance!!!!
>
>
>
> --
> View this message in context:
> http://apache-mina.10907.n7.nabble.com/Retrieving-user-data-from-Telnet-in-Apache-Mina-tp40722.html
> Sent from the Apache MINA Developer Forum mailing list archive at
> Nabble.com.
>



-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury