public class SessionManager
extends java.lang.Object
implements java.io.Closeable
getSession() the current session will have its connection verified,
and will reconnect if necessary.| Constructor and Description |
|---|
SessionManager(SessionFactory sessionFactory)
Creates a SessionManager for the supplied
sessionFactory. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.jcraft.jsch.Session |
getSession()
Returns a connected session.
|
SessionFactory |
getSessionFactory()
Returns the session factory used by this manager.
|
java.lang.String |
toString() |
public SessionManager(SessionFactory sessionFactory)
sessionFactory.sessionFactory - The session factorypublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic com.jcraft.jsch.Session getSession()
throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchException - If unable to connect the sessionpublic SessionFactory getSessionFactory()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 pastdev.com. All Rights Reserved.