Java Doc for SessionManager.java in  » Database-Client » squirrel-sql-2.6.5a » net » sourceforge » squirrel_sql » client » session » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » squirrel sql 2.6.5a » net.sourceforge.squirrel_sql.client.session 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sourceforge.squirrel_sql.client.session.SessionManager

All known Subclasses:   net.sourceforge.squirrel_sql.client.session.MockSessionManager,
SessionManager
public class SessionManager (Code)
This class manages sessions.
author:
   Colin Bell



Constructor Summary
public  SessionManager(IApplication app)
     Ctor.

Method Summary
public  voidaddAllowedSchemaChecker(IAllowedSchemaChecker allowedSchemaChecker)
    
public  voidaddSessionListener(ISessionListener lis)
    
public  booleanareAllSchemasAllowed(ISession session)
    
public  voidclearAllowedSchemaCache(ISession session)
    
public synchronized  booleancloseAllSessions()
     Closes all currently open sessions. true if all sessions closed else false.
throws:
  SQLException - Thrown if an error closing the SQL connection.
public synchronized  booleancloseSession(ISession session)
     Close a session.
public synchronized  ISessioncreateSession(IApplication app, ISQLDriver driver, SQLAlias alias, SQLConnection conn, String user, String password)
     Create a new session.
protected  voidfireAllSessionsClosed()
    
protected  voidfireConnectionClosedForReconnect(Session session)
    
protected  voidfireReconnectFailed(Session session)
    
protected  voidfireReconnected(Session session)
    
protected  voidfireSessionActivated(ISession session)
    
protected  voidfireSessionAdded(ISession session)
    
protected  voidfireSessionClosed(ISession session)
    
protected  voidfireSessionClosing(ISession session)
    
protected  voidfireSessionFinalized(IIdentifier sessionIdentifier)
    
public synchronized  ISessiongetActiveSession()
     Retrieve the session that is currently activated within the session manager.
public  String[]getAllowedSchemas(ISession session)
    
public  String[]getAllowedSchemas(ISQLConnection con, ISQLAliasExt alias)
     Note: This Method does not cache allowed Schemas.
public synchronized  ISession[]getConnectedSessions()
     Retrieve an array of all the sessions currently connected.
public synchronized  ISessiongetNextSession(ISession session)
     Get the next session opened after the passed one.
public synchronized  ISessiongetPreviousSession(ISession session)
     Get the next session opened before the passed one.
public  ISessiongetSession(IIdentifier sessionID)
     Retrieve the session for the passed identifier.
public  voidremoveSessionListener(ISessionListener lis)
    
public  voidsetActiveSession(ISession session)
    


Constructor Detail
SessionManager
public SessionManager(IApplication app)(Code)
Ctor.
Parameters:
  app - Application API.
throws:
  IllegalArgumentException - Thrown if null IApplication passed.




Method Detail
addAllowedSchemaChecker
public void addAllowedSchemaChecker(IAllowedSchemaChecker allowedSchemaChecker)(Code)



addSessionListener
public void addSessionListener(ISessionListener lis)(Code)
Adds a session listener
Parameters:
  lis - The listener to add.



areAllSchemasAllowed
public boolean areAllSchemasAllowed(ISession session)(Code)



clearAllowedSchemaCache
public void clearAllowedSchemaCache(ISession session)(Code)



closeAllSessions
public synchronized boolean closeAllSessions()(Code)
Closes all currently open sessions. true if all sessions closed else false.
throws:
  SQLException - Thrown if an error closing the SQL connection. The sessionwill still be closed even though the connection may not havebeen.



closeSession
public synchronized boolean closeSession(ISession session)(Code)
Close a session.
Parameters:
  session - Session to close. true if session was closed else false.
throws:
  IllegalArgumentException - Thrown if nullISession passed.



createSession
public synchronized ISession createSession(IApplication app, ISQLDriver driver, SQLAlias alias, SQLConnection conn, String user, String password)(Code)
Create a new session.
Parameters:
  app - Application API.
Parameters:
  driver - JDBC driver for session.
Parameters:
  alias - Defines URL to database.
Parameters:
  conn - Connection to database.
Parameters:
  user - User name connected with.
Parameters:
  password - Password for user
throws:
  IllegalArgumentException - Thrown if IApplication, ISQLDriver, ISQLAlias,or SQLConnection is passed as null.



fireAllSessionsClosed
protected void fireAllSessionsClosed()(Code)
Fired when all the session have been closed (removed) from the session manager



fireConnectionClosedForReconnect
protected void fireConnectionClosedForReconnect(Session session)(Code)



fireReconnectFailed
protected void fireReconnectFailed(Session session)(Code)



fireReconnected
protected void fireReconnected(Session session)(Code)



fireSessionActivated
protected void fireSessionActivated(ISession session)(Code)
Fired when the active session changed



fireSessionAdded
protected void fireSessionAdded(ISession session)(Code)
Fired when a session is connected (added) to the session manager



fireSessionClosed
protected void fireSessionClosed(ISession session)(Code)
Fired when a session is closed (removed) from the session manager



fireSessionClosing
protected void fireSessionClosing(ISession session)(Code)
Fired when a session is about to close from the session manager



fireSessionFinalized
protected void fireSessionFinalized(IIdentifier sessionIdentifier)(Code)



getActiveSession
public synchronized ISession getActiveSession()(Code)
Retrieve the session that is currently activated within the session manager. Any new sql worksheets etc will be created against this session



getAllowedSchemas
public String[] getAllowedSchemas(ISession session)(Code)



getAllowedSchemas
public String[] getAllowedSchemas(ISQLConnection con, ISQLAliasExt alias)(Code)
Note: This Method does not cache allowed Schemas. It is preferable to use getAllowedSchemas(ISession) if a Session is avaialable.



getConnectedSessions
public synchronized ISession[] getConnectedSessions()(Code)
Retrieve an array of all the sessions currently connected. array of all connected sessions.



getNextSession
public synchronized ISession getNextSession(ISession session)(Code)
Get the next session opened after the passed one. The next session or the first one if the passed one isthe last session.



getPreviousSession
public synchronized ISession getPreviousSession(ISession session)(Code)
Get the next session opened before the passed one. The previous session or the last one if the passed one isthe first session.



getSession
public ISession getSession(IIdentifier sessionID)(Code)
Retrieve the session for the passed identifier.
Parameters:
  sessionID - ID of session we are trying to retrieve.
throws:
  IllegalArgumentException - Thrown if null IIdentifier passed.



removeSessionListener
public void removeSessionListener(ISessionListener lis)(Code)
Removes a session listener
Parameters:
  lis - The listener to remove.



setActiveSession
public void setActiveSession(ISession session)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.