Yes, definitely.    I always thought being able to be asynchronous is nice,
but not the easiest way, especially for the client, where the use case for
real asynchronous clients is much less than for the server side.  I think
we already have a JIRA issue to provide an easier to use synchronous API on
the client side, and that could definitely be part of it.

On Tue, Oct 30, 2012 at 10:16 AM, Emmanuel Lécharny <[email protected]>wrote:

> Hi Guillaume,
>
> we had similar problem when we designed the LDAP API, but we decided to
> change the way users should get data, depending on the mode. Asynchronous
> mode is not really expected to be the main mode by the average Joe user, so
> we made the getSession() a synchronous method, and we added a
> getAsyncSession() method for those who wanted to get a Future and deal with
> it later.
>
> Would it be an option for SSHd ?
>
>
> Le 10/30/12 9:38 AM, Guillaume Nodet a écrit :
>
>  The API is asynchronous.
>> You need to use
>>
>>     ClientSession session = client.connect(host,
>> port).await().getSession();
>>
>> On Mon, Oct 29, 2012 at 6:38 PM, Jonathan Welzel <[email protected]>
>> wrote:
>>
>>  I have been trying to set up a SSH Client using SSHD, but I'm unable to
>>> obtain a session from the client. It's always null.
>>>
>>> SshClient client = SshClient.setUpDefaultClient()**;
>>> client.start();
>>> ClientSession session = client.connect("10.47.10.57", 22).getSession();
>>> //
>>> session is always null
>>>
>>> I'm able to connect using Putty, so what's wrong?
>>>
>>> --
>>> Jonathan Welzel
>>>
>>>
>>
>>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>


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

Reply via email to