Thanks, is there any plan in the future to add the concepts of user managers 
and event handlers as seen in Apache FtpServer?

-----Original Message-----
From: Guillaume Nodet [mailto:[email protected]] 
Sent: Monday, June 04, 2012 4:59 PM
To: [email protected]
Subject: Re: [Apache SSHD] Question about session

If you extend SshServer, you can do something like:

        List<AbstractSession> sessions = new ArrayList<AbstractSession>();
        for (IoSession ioSession : acceptor.getManagedSessions().values()) {
            AbstractSession session =
AbstractSession.getSession(ioSession, true);
            if (session != null) {
                sessions.add(session);
            }
        }

You can also customize the SessionFactory with your own derived class and use it
   sshd.setSessionFactory(xxx)
which should allow you to customize sessions at creation time, but does not 
really solve the original problem.

If you raise a JIRA issue, we can easily add a getActiveSessions() which would 
do the first snippet of code.

On Mon, Jun 4, 2012 at 9:38 PM, Wright, Omari <[email protected]> wrote:
> How do I retrieve a list of active sessions using Apache SSHD?



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

Reply via email to