|
org.netbeans.api.debugger/1 1.7.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.api.debugger.Session
public final class Session
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 (getName() ) and
location name (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 DebuggerEngine s. Session manages list
of supported languages (getSupportedLanguages() ) and current
language (getCurrentLanguage() ). Current language can be changed
(setCurrentLanguage(java.lang.String) ).
Each language corresponds to one
DebuggerEngine
(getEngineForLanguage(java.lang.String) ). So, the current language
defines current debuggger engine (getCurrentEngine() )
A support for a new debugger language can be added during a start of
debugging only. See
DebuggerManager.startDebugging(org.netbeans.api.debugger.DebuggerInfo) and
DebuggerEngineProvider
Support for aditional services: Session is final class. The standard method how to extend its functionality is using lookup methods ( lookup and
lookupFirst(java.lang.String, java.lang.Class) ).
There are two ways how to register some service provider for some
type of Session:
Support for listening: Session propagates all changes to 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
DebuggerManager during the process
of starting of debugging (see
DebuggerManager.startDebugging(org.netbeans.api.debugger.DebuggerInfo) ).
Session is removed automatically from
DebuggerManager when the
number of "supported languages" (getSupportedLanguages() ) is zero.
|
Evolution | No method should be removed from this class, but some functionality can be added in future. |
Field Summary | |
---|---|
static String |
PROP_CURRENT_LANGUAGE
Name of property for current language. |
static String |
PROP_SUPPORTED_LANGUAGES
Name of property for the set of supported languages. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a property change listener. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener l)
Adds a property change listener. |
DebuggerEngine |
getCurrentEngine()
Returns current debugger engine for this session. |
String |
getCurrentLanguage()
Returns current language for this session. |
DebuggerEngine |
getEngineForLanguage(String language)
Return DebuggerEngine registerred for given language or null. |
String |
getLocationName()
Returns name of location this session is running on. |
String |
getName()
Returns display name of this session. |
String[] |
getSupportedLanguages()
Returns set of all languages supported by this session. |
void |
kill()
Kills all registerred engines / languages. |
List |
lookup(String folder,
Class service)
Returns list of services of given type from given folder. |
Object |
lookupFirst(String folder,
Class service)
Returns one service of given type from given folder. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a property change listener. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener l)
Removes a property change listener. |
void |
setCurrentLanguage(String language)
Sets current language for this session. |
String |
toString()
Returns string representation of this session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROP_CURRENT_LANGUAGE
public static final String PROP_SUPPORTED_LANGUAGES
Method Detail |
---|
public String getName()
public String getLocationName()
public DebuggerEngine getCurrentEngine()
public String getCurrentLanguage()
public String[] getSupportedLanguages()
DebuggerEngineProvider
public List lookup(String folder, Class service)
service
- a type of service to look for
public Object lookupFirst(String folder, Class service)
service
- a type of service to look for
public void kill()
doAction (DebuggerEngine.ACTION_KILL)method on all registerred DebuggerEngines.
public DebuggerEngine getEngineForLanguage(String language)
public void setCurrentLanguage(String language)
language
- current languageDebuggerEngineProvider
public String toString()
public void addPropertyChangeListener(PropertyChangeListener l)
l
- the listener to addpublic void removePropertyChangeListener(PropertyChangeListener l)
l
- the listener to removepublic void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
propertyName
- a name of property to listen onl
- the listener to addpublic void removePropertyChangeListener(String propertyName, PropertyChangeListener l)
propertyName
- a name of property to stop listening onl
- the listener to remove
|
org.netbeans.api.debugger/1 1.7.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |