Java Doc for Session.java in  » IDE-Netbeans » ant » org » netbeans » api » debugger » 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 » IDE Netbeans » ant » org.netbeans.api.debugger 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.api.debugger.Session

Session
final public class Session implements ContextProvider(Code)
Session visually represents one process or application. It should be simple bean with properties like process ID, session name, etc. All other functionality is deleagted to current debugger engine.


Description
Functionality Properties: Session has two standard read only properties - name ( Session.getName ) and location name ( Session.getLocationName ).

Management of languages and engines: Debugger Core supports debugging in different languages. It means that each session can be debugged using different languages and org.netbeans.api.debugger.DebuggerEngine s. Session manages list of supported languages ( Session.getSupportedLanguages ) and current language ( Session.getCurrentLanguage ). Current language can be changed ( Session.setCurrentLanguage ). Each language corresponds to one org.netbeans.api.debugger.DebuggerEngine ( Session.getEngineForLanguage ). So, the current language defines current debuggger engine ( Session.getCurrentEngine ) A support for a new debugger language can be added during a start of debugging only. See org.netbeans.api.debugger.DebuggerManager.startDebugging and org.netbeans.spi.debugger.DebuggerEngineProvider

Support for aditional services: Session is final class. The standard method how to extend its functionality is using lookup methods ( Session.lookup and Session.lookupFirst ). There are two ways how to register some service provider for some type of Session:
  • Register 'live' instance of service provider during creation of new instance of Session (see method org.netbeans.spi.debugger.SessionProvider.getServices ).
  • Register service provider in Manifest-inf/debugger/<type ID> folder. See Debugger SPI for more information about registration.

Support for listening: Session propagates all changes to java.beans.PropertyChangeListener .
Clinents / Providers This class is final, so it does not have any external provider. Debugger Core and UI modules are clients of this class.
Lifecycle A new instance of Session class can be created and registerred to org.netbeans.api.debugger.DebuggerManager during the process of starting of debugging (see org.netbeans.api.debugger.DebuggerManager.startDebugging ). Session is removed automatically from org.netbeans.api.debugger.DebuggerManager when the number of "supported languages" ( Session.getSupportedLanguages ) is zero.
Evolution No method should be removed from this class, but some functionality can be added in future.

author:
   Jan Jancura



Field Summary
final public static  StringPROP_CURRENT_LANGUAGE
     Name of property for current language.
final public static  StringPROP_SUPPORTED_LANGUAGES
     Name of property for the set of supported languages.
 LookupprivateLookup
    

Constructor Summary
 Session(String name, String locationName, String id, Object[] services, Lookup diLookup)
    

Method Summary
 voidaddLanguage(String language, DebuggerEngine engine)
    
public  voidaddPropertyChangeListener(PropertyChangeListener l)
     Adds a property change listener.
public  voidaddPropertyChangeListener(String propertyName, PropertyChangeListener l)
     Adds a property change listener.
public  DebuggerEnginegetCurrentEngine()
     Returns current debugger engine for this session.
public  StringgetCurrentLanguage()
     Returns current language for this session.
public  DebuggerEnginegetEngineForLanguage(String language)
     Return DebuggerEngine registerred for given language or null.
public  StringgetLocationName()
     Returns name of location this session is running on.
 LookupgetLookup()
    
public  StringgetName()
     Returns display name of this session.
public  String[]getSupportedLanguages()
     Returns set of all languages supported by this session.
public  voidkill()
     Kills all registerred engines / languages.
public  List<? extends T>lookup(String folder, Class<T> service)
     Returns list of services of given type from given folder.
public  TlookupFirst(String folder, Class<T> service)
     Returns one service of given type from given folder.
 voidremoveEngine(DebuggerEngine engine)
    
 voidremoveLanguage(String language, DebuggerEngine engine)
    
public  voidremovePropertyChangeListener(PropertyChangeListener l)
     Removes a property change listener.
public  voidremovePropertyChangeListener(String propertyName, PropertyChangeListener l)
     Removes a property change listener.
public  voidsetCurrentLanguage(String language)
     Sets current language for this session.
public  StringtoString()
     Returns string representation of this session.

Field Detail
PROP_CURRENT_LANGUAGE
final public static String PROP_CURRENT_LANGUAGE(Code)
Name of property for current language.



PROP_SUPPORTED_LANGUAGES
final public static String PROP_SUPPORTED_LANGUAGES(Code)
Name of property for the set of supported languages.



privateLookup
Lookup privateLookup(Code)




Constructor Detail
Session
Session(String name, String locationName, String id, Object[] services, Lookup diLookup)(Code)




Method Detail
addLanguage
void addLanguage(String language, DebuggerEngine engine)(Code)



addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)(Code)
Adds a property change listener.
Parameters:
  l - the listener to add



addPropertyChangeListener
public void addPropertyChangeListener(String propertyName, PropertyChangeListener l)(Code)
Adds a property change listener.
Parameters:
  propertyName - a name of property to listen on
Parameters:
  l - the listener to add



getCurrentEngine
public DebuggerEngine getCurrentEngine()(Code)
Returns current debugger engine for this session. current debugger engine for this session



getCurrentLanguage
public String getCurrentLanguage()(Code)
Returns current language for this session. current language for this session



getEngineForLanguage
public DebuggerEngine getEngineForLanguage(String language)(Code)
Return DebuggerEngine registerred for given language or null. DebuggerEngine registerred for given language or null



getLocationName
public String getLocationName()(Code)
Returns name of location this session is running on. name of location this session is running on



getLookup
Lookup getLookup()(Code)



getName
public String getName()(Code)
Returns display name of this session. display name of this session



getSupportedLanguages
public String[] getSupportedLanguages()(Code)
Returns set of all languages supported by this session. set of all languages supported by this session
See Also:   org.netbeans.spi.debugger.DebuggerEngineProvider



kill
public void kill()(Code)
Kills all registerred engines / languages. This utility method calls
doAction (DebuggerEngine.ACTION_KILL)
method on all registerred DebuggerEngines.



lookup
public List<? extends T> lookup(String folder, Class<T> service)(Code)
Returns list of services of given type from given folder.
Parameters:
  service - a type of service to look for list of services of given type



lookupFirst
public T lookupFirst(String folder, Class<T> service)(Code)
Returns one service of given type from given folder.
Parameters:
  service - a type of service to look for ne service of given type



removeEngine
void removeEngine(DebuggerEngine engine)(Code)



removeLanguage
void removeLanguage(String language, DebuggerEngine engine)(Code)



removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)(Code)
Removes a property change listener.
Parameters:
  l - the listener to remove



removePropertyChangeListener
public void removePropertyChangeListener(String propertyName, PropertyChangeListener l)(Code)
Removes a property change listener.
Parameters:
  propertyName - a name of property to stop listening on
Parameters:
  l - the listener to remove



setCurrentLanguage
public void setCurrentLanguage(String language)(Code)
Sets current language for this session. Language should be refisterred for this session.
Parameters:
  language - current language
See Also:   org.netbeans.spi.debugger.DebuggerEngineProvider



toString
public String toString()(Code)
Returns string representation of this session. string representation of this session



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.