Package ghidra.framework.store
Class FileSystemListenerList
- java.lang.Object
-
- ghidra.framework.store.FileSystemListenerList
-
- All Implemented Interfaces:
FileSystemListener
public class FileSystemListenerList extends java.lang.Object implements FileSystemListener
FileSystemListenerList
maintains a list of FileSystemListener's. This class, acting as a FileSystemListener, simply relays each callback to all FileSystemListener's within its list. Employs either a synchronous and asynchronous notification mechanism.
-
-
Constructor Summary
Constructors Constructor Description FileSystemListenerList(boolean enableAsynchronousDispatching)
Construct FileSystemListenerList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(FileSystemListener listener)
Add a listener to this list.void
clear()
Remove all listeners from this list.void
dispose()
void
folderCreated(java.lang.String parentPath, java.lang.String folderName)
Forwards folderCreated callback to all listeners within this list.void
folderDeleted(java.lang.String parentPath, java.lang.String folderName)
Forwards folderDeleted callback to all listeners within this list.void
folderMoved(java.lang.String parentPath, java.lang.String folderName, java.lang.String newParentPath)
Forwards folderMoved callback to all listeners within this list.void
folderRenamed(java.lang.String parentPath, java.lang.String folderName, java.lang.String newFolderName)
Forwards folderRenamed callback to all listeners within this list.boolean
isProcessingEvents()
Returns true if this class is processing events or needs to process events that are in its event queue.void
itemChanged(java.lang.String parentPath, java.lang.String itemName)
Forwards itemChanged callback to all listeners within this list.void
itemCreated(java.lang.String parentPath, java.lang.String itemName)
Forwards itemCreated callback to all listeners within this list.void
itemDeleted(java.lang.String parentPath, java.lang.String itemName)
Forwards itemDeleted callback to all listeners within this list.void
itemMoved(java.lang.String parentPath, java.lang.String name, java.lang.String newParentPath, java.lang.String newName)
Forwards itemMoved callback to all listeners within this list.void
itemRenamed(java.lang.String parentPath, java.lang.String itemName, java.lang.String newName)
Forwards itemRenamed callback to all listeners within this list.void
remove(FileSystemListener listener)
Remove a listener from this list.void
syncronize()
Forwards syncronize callback to all listeners within this list.
-
-
-
Constructor Detail
-
FileSystemListenerList
public FileSystemListenerList(boolean enableAsynchronousDispatching)
Construct FileSystemListenerList- Parameters:
enableAsyncronousDispatching
- if true a seperate dispatch thread will be used to notify listeners. If false, blocking notification will be performed.
-
-
Method Detail
-
dispose
public void dispose()
-
add
public void add(FileSystemListener listener)
Add a listener to this list.- Parameters:
listener
-
-
remove
public void remove(FileSystemListener listener)
Remove a listener from this list.- Parameters:
listener
-
-
clear
public void clear()
Remove all listeners from this list.
-
itemMoved
public void itemMoved(java.lang.String parentPath, java.lang.String name, java.lang.String newParentPath, java.lang.String newName)
Forwards itemMoved callback to all listeners within this list.- Specified by:
itemMoved
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder that used to contain the item.newParentPath
- the path of the folder that the item was moved to.newName
- the new name of the item.- See Also:
ghidra.framework.store.FileSystemListener#itemMoved(java.lang.String, java.lang.String, java.lang.String)
-
itemRenamed
public void itemRenamed(java.lang.String parentPath, java.lang.String itemName, java.lang.String newName)
Forwards itemRenamed callback to all listeners within this list.- Specified by:
itemRenamed
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder that contains the renamed itemitemName
- the old name of the item.- See Also:
FileSystemListener.itemRenamed(java.lang.String, java.lang.String, java.lang.String)
-
itemDeleted
public void itemDeleted(java.lang.String parentPath, java.lang.String itemName)
Forwards itemDeleted callback to all listeners within this list.- Specified by:
itemDeleted
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder that contained the deleted item.itemName
- the name of the item that was deleted.- See Also:
FileSystemListener.itemDeleted(java.lang.String, java.lang.String)
-
folderRenamed
public void folderRenamed(java.lang.String parentPath, java.lang.String folderName, java.lang.String newFolderName)
Forwards folderRenamed callback to all listeners within this list.- Specified by:
folderRenamed
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder containing the folder that was renamed.folderName
- the old name of the folder.newFolderName
- the new name of the folder.- See Also:
FileSystemListener.folderRenamed(java.lang.String, java.lang.String, java.lang.String)
-
folderMoved
public void folderMoved(java.lang.String parentPath, java.lang.String folderName, java.lang.String newParentPath)
Forwards folderMoved callback to all listeners within this list.- Specified by:
folderMoved
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder that used to contain the moved folder.folderName
- the name of the folder that was moved.newParentPath
- the path of the folder that now contains the moved folder.- See Also:
FileSystemListener.folderMoved(java.lang.String, java.lang.String, java.lang.String)
-
folderDeleted
public void folderDeleted(java.lang.String parentPath, java.lang.String folderName)
Forwards folderDeleted callback to all listeners within this list.- Specified by:
folderDeleted
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder that contained the deleted folder.folderName
- the name of the folder that was deleted.- See Also:
FileSystemListener.folderDeleted(java.lang.String, java.lang.String)
-
itemCreated
public void itemCreated(java.lang.String parentPath, java.lang.String itemName)
Forwards itemCreated callback to all listeners within this list.- Specified by:
itemCreated
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder that contains the new item.itemName
- the name of the new item.- See Also:
FileSystemListener.itemCreated(java.lang.String, java.lang.String)
-
folderCreated
public void folderCreated(java.lang.String parentPath, java.lang.String folderName)
Forwards folderCreated callback to all listeners within this list.- Specified by:
folderCreated
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder that contains the new folderfolderName
- the name of the new folder- See Also:
FileSystemListener.folderCreated(java.lang.String, java.lang.String)
-
itemChanged
public void itemChanged(java.lang.String parentPath, java.lang.String itemName)
Forwards itemChanged callback to all listeners within this list.- Specified by:
itemChanged
in interfaceFileSystemListener
- Parameters:
parentPath
- the path of the folder containing the item.itemName
- the name of the item that has changed.- See Also:
FileSystemListener.itemChanged(java.lang.String, java.lang.String)
-
syncronize
public void syncronize()
Forwards syncronize callback to all listeners within this list.- Specified by:
syncronize
in interfaceFileSystemListener
- See Also:
FileSystemListener.syncronize()
-
isProcessingEvents
public boolean isProcessingEvents()
Returns true if this class is processing events or needs to process events that are in its event queue.- Returns:
- true if this class is processing events or needs to process events that are in its event queue.
-
-