com.bluemarsh.jswat
Class DefaultManager
java.lang.Object
|
+--com.bluemarsh.jswat.DefaultManager
- All Implemented Interfaces:
- Manager, SessionListener
- Direct Known Subclasses:
- BreakpointManager, CommandManager, ContextManager, MacroManager, MonitorManager, PathManager, VMEventManager
- public class DefaultManager
- extends java.lang.Object
- implements Manager
Class DefaultManager provides empty implementations of the API required
by all the Manager interface. Managers are used to control a subset of
features in JSwat, such as breakpoints, source files, debugging context,
etc. This Manager API makes it easy for the Session class to deal with
several managers at once, and to handle future Managers.
Try to avoid circular dependencies between Managers when possible.
Unpredictable behavior can occur if one manager's init calls on
a second manager, which calls on the first manager (which has not
completed its initialization).
- Version:
- 1.0 6/24/00
- Author:
- Nathan Fiedler
Field Summary |
protected static JSwat |
swat
Instance of JSwat. |
Constructor Summary |
DefaultManager()
All Manager subclasses must provide a no-argument constructor. |
Method Summary |
void |
activate(Session session)
Called when the Session is about to begin an active debugging
session. |
void |
close(Session session)
Called when the Session is about to close down. |
void |
deactivate(Session session)
Called when the Session is about to end an active debugging
session. |
void |
init(Session session)
Called after the Session has instantiated this mananger. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
swat
protected static JSwat swat
- Instance of JSwat.
DefaultManager
public DefaultManager()
- All Manager subclasses must provide a no-argument constructor.
This is used to instantiate the Managers at startup.
There is only ever one instance of any given Manager.
To avoid circular dependencies, do not call
Session.getManager()
from within the constructor.
- See Also:
init(com.bluemarsh.jswat.Session)
activate
public void activate(Session session)
- Called when the Session is about to begin an active debugging
session. That is, JSwat is about to debug a debuggee VM.
Managers are not activated in any particular order.
- Specified by:
activate
in interface Manager
- Parameters:
session
- Session being activated.
close
public void close(Session session)
- Called when the Session is about to close down.
- Specified by:
close
in interface Manager
- Parameters:
session
- Session being closed.
deactivate
public void deactivate(Session session)
- Called when the Session is about to end an active debugging
session. That is, JSwat is about to terminate the connection
with the debuggee VM.
Managers are not deactivated in any particular order.
- Specified by:
deactivate
in interface Manager
- Parameters:
session
- Session being deactivated.
init
public void init(Session session)
- Called after the Session has instantiated this mananger.
To avoid problems with circular dependencies between managers,
iniitialize data members before calling
Session.getManager()
.
- Specified by:
init
in interface Manager
- Parameters:
session
- Session initializing this manager.