org.apache.sshd.common.session
Class AbstractSessionFactory

java.lang.Object
  extended by org.apache.mina.core.service.IoHandlerAdapter
      extended by org.apache.sshd.common.AbstractSessionIoHandler
          extended by org.apache.sshd.common.session.AbstractSessionFactory
All Implemented Interfaces:
org.apache.mina.core.service.IoHandler
Direct Known Subclasses:
SessionFactory, SessionFactory

public abstract class AbstractSessionFactory
extends AbstractSessionIoHandler

An abstract base factory of sessions.

Author:
Apache MINA SSHD Project

Field Summary
protected  List<SessionListener> listeners
           
 
Constructor Summary
AbstractSessionFactory()
           
 
Method Summary
 void addListener(SessionListener listener)
          Add a session |listener|.
protected  AbstractSession createSession(org.apache.mina.core.session.IoSession ioSession)
           
protected abstract  AbstractSession doCreateSession(org.apache.mina.core.session.IoSession ioSession)
           
 void removeListener(SessionListener listener)
          Remove a session |listener|.
 
Methods inherited from class org.apache.sshd.common.AbstractSessionIoHandler
exceptionCaught, messageReceived, sessionClosed, sessionCreated
 
Methods inherited from class org.apache.mina.core.service.IoHandlerAdapter
messageSent, sessionIdle, sessionOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected final List<SessionListener> listeners
Constructor Detail

AbstractSessionFactory

public AbstractSessionFactory()
Method Detail

createSession

protected AbstractSession createSession(org.apache.mina.core.session.IoSession ioSession)
                                 throws Exception
Specified by:
createSession in class AbstractSessionIoHandler
Throws:
Exception

doCreateSession

protected abstract AbstractSession doCreateSession(org.apache.mina.core.session.IoSession ioSession)
                                            throws Exception
Throws:
Exception

addListener

public void addListener(SessionListener listener)
Add a session |listener|.

Parameters:
listener - the session listener to add

removeListener

public void removeListener(SessionListener listener)
Remove a session |listener|.

Parameters:
listener - the session listener to remove


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.