|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclasspathhelper.eclipse.ui.AbstractClassPathModel
classpathhelper.eclipse.tomcat.listener.ui.TomcatClassPathListener
Class responsible for providing the Tomcat class loaders based on the configured preferences.
This class listens to the PreferenceStore
for changes
to events that result in either a new version/location for the
Tomcat instance or a new app within the current instance.
This class also monitors files (classes/jars) used by the in-use classloader for updates/deletes/additions. If a change is detected this class will send out a new classloader to reflect the changes.
This listener caches classloaders so that switching between Tomcat applications doesn't force the recalculating of the classpath when returning to a classloader hierarchy that has already been visited.
Constructor Summary | |
TomcatClassPathListener()
Constructor (registers the listener with the property store). |
Method Summary | |
void |
fileChanged(FileChangeMonitor monitor,
FileChangedEvent[] evts)
Callback method indicating file(s) have changed. |
protected CGClassLoader |
getCurrentClassLoader()
Internal method used to obtain the current classloader for AbstractClassPathModel.addClassPathChangeListener(IClassPathChangeListener) . |
void |
propertyChange(PropertyChangeEvent evt)
|
protected void |
sendClassPathEvent()
Internal method that looks at the current tomcat properties and fires a change event if the properties warrant it. |
void |
startClassPathListening()
Method called to indicate that this model is the selected model and should start sending classpath change events. |
void |
stopClassPathListening()
Method called to indicate that this model is nolonger the selected model and can clean up any listeners it has started (as well as any caching. |
Methods inherited from class classpathhelper.eclipse.ui.AbstractClassPathModel |
addClassPathChangeListener, fireClassPathChangeEvent, getNumberOfListeners, removeClassPathChangeListener, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TomcatClassPathListener()
Method Detail |
protected void sendClassPathEvent()
protected CGClassLoader getCurrentClassLoader()
AbstractClassPathModel
AbstractClassPathModel.addClassPathChangeListener(IClassPathChangeListener)
.
If not class loader exists, this method should return null.
getCurrentClassLoader
in class AbstractClassPathModel
public void startClassPathListening()
IClassPathModel
Method called to indicate that this model is the selected model and should start sending classpath change events. If a model needs to attach any listeners this is a good point to do so.
A model should also use this call send its initial
class loader via its IClassPathChangeListener
objects.
startClassPathListening
in interface IClassPathModel
public void stopClassPathListening()
IClassPathModel
stopClassPathListening
in interface IClassPathModel
public void fileChanged(FileChangeMonitor monitor, FileChangedEvent[] evts)
IFileChangeListener
fileChanged
in interface IFileChangeListener
monitor
- The monitor these changes are from.evts
- An array of the events representing all
the file changes.public void propertyChange(PropertyChangeEvent evt)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |