public class MRUBundleFileList extends Object implements EventDispatcher<Object,Object,BundleFile>
Constructor and Description |
---|
MRUBundleFileList() |
MRUBundleFileList(int fileLimit) |
Modifier and Type | Method and Description |
---|---|
void |
add(BundleFile bundleFile)
Adds a BundleFile which is about to be opened to the MRU list.
|
void |
dispatchEvent(Object eventListener,
Object listenerObject,
int eventAction,
BundleFile eventObject)
This method is called once for each listener.
|
boolean |
isClosing(BundleFile bundleFile)
Returns true if this MRUBundleFileList is currently closing the specified bundle file on the current thread.
|
boolean |
isEnabled() |
boolean |
remove(BundleFile bundleFile)
Removes a bundle file which is about to be closed
|
void |
shutdown()
Closes the bundle file closer thread for the MRU list
|
void |
use(BundleFile bundleFile)
Increments the use stamp of a bundle file
|
public MRUBundleFileList()
public MRUBundleFileList(int fileLimit)
public void add(BundleFile bundleFile)
bundleFile
- the bundle file about to be opened.public boolean remove(BundleFile bundleFile)
bundleFile
- the bundle file about to be closedpublic void use(BundleFile bundleFile)
bundleFile
- the bundle file to increment the use stamp forpublic final void dispatchEvent(Object eventListener, Object listenerObject, int eventAction, BundleFile eventObject)
EventDispatcher
The method should properly log/handle any exceptions thrown by the called listener. The EventManager will ignore any Throwable thrown by this method in order to continue delivery of the event to the next listener.
dispatchEvent
in interface EventDispatcher<Object,Object,BundleFile>
eventListener
- This is the key in the Map.Entry for the listener.
The implementation of this method must cast it to the appropriate listener
class for the event to be delivered and the appropriate listener method
must then be called.listenerObject
- This is the value in the Map.Entry for the listener.eventAction
- This value was passed to the ListenerQueue object via one of its
dispatchEvent* method calls. It can provide information (such
as which listener method to call) so that the EventDispatcher
can complete the delivery of the event to the listener.eventObject
- This object was passed to the ListenerQueue object via one of its
dispatchEvent* method calls. This object was created by the event source and
is passed to this method. It should contain all the necessary information (such
as what event object to pass) so that this method
can complete the delivery of the event to the listener.
This is typically the actual event object.public void shutdown()
public boolean isClosing(BundleFile bundleFile)
bundleFile
- the bundle filepublic boolean isEnabled()
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.