Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler Class Reference

Public Member Functions

 EventUpdateHandler (Runnable onUpdate, UpdateGovernor governor)
 
void register ()
 
void unregister ()
 

Protected Member Functions

boolean isRefreshRequired (ModuleDataEvent evt)
 
boolean isRefreshRequired (ModuleContentEvent evt)
 
boolean isRefreshRequired (AbstractFile evt)
 
boolean isRefreshRequired (IngestJobEvent evt)
 
boolean isRefreshRequiredForCaseEvent (PropertyChangeEvent evt)
 
void onRefresh ()
 

Private Attributes

final Set< Case.Events > caseEvents
 
final PropertyChangeListener caseEventsListener
 
final UpdateGovernor governor
 
final Set< IngestJobEventingestEvents
 
final PropertyChangeListener ingestJobEventsListener
 
final Runnable onUpdate
 
final RefreshThrottler refreshThrottler
 

Detailed Description

Handles ingest and case events, and determines whether they should trigger an update.

Definition at line 36 of file EventUpdateHandler.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.EventUpdateHandler ( Runnable  onUpdate,
UpdateGovernor  governor 
)

Member Function Documentation

boolean org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.isRefreshRequired ( ModuleDataEvent  evt)
protected

Handles whether or not a ModuleDataEvent should trigger an update.

Parameters
evtThe ModuleDataEvent.
Returns
True if an update should occur.

Definition at line 120 of file EventUpdateHandler.java.

References org.sleuthkit.autopsy.datasourcesummary.uiutils.UpdateGovernor.isRefreshRequired().

boolean org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.isRefreshRequired ( ModuleContentEvent  evt)
protected

Handles whether or not a ModuleContentEvent should trigger an update.

Parameters
evtThe ModuleContentEvent.
Returns
True if an update should occur.

Definition at line 131 of file EventUpdateHandler.java.

References org.sleuthkit.autopsy.datasourcesummary.uiutils.UpdateGovernor.isRefreshRequired().

boolean org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.isRefreshRequired ( AbstractFile  evt)
protected

Handles whether or not a newly added AbstractFile should trigger an update.

Parameters
evtThe AbstractFile.
Returns
True if an update should occur.

Definition at line 143 of file EventUpdateHandler.java.

References org.sleuthkit.autopsy.datasourcesummary.uiutils.UpdateGovernor.isRefreshRequired().

boolean org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.isRefreshRequired ( IngestJobEvent  evt)
protected

Handles whether or not a IngestJobEvent should trigger an update.

Parameters
evtThe IngestJobEvent.
Returns
True if an update should occur.

Definition at line 154 of file EventUpdateHandler.java.

References org.sleuthkit.autopsy.datasourcesummary.uiutils.UpdateGovernor.isRefreshRequired().

boolean org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.isRefreshRequiredForCaseEvent ( PropertyChangeEvent  evt)
protected

Handles whether or not a case event should trigger an update.

Parameters
evtThe case event.
Returns
True if an update should occur.

Definition at line 165 of file EventUpdateHandler.java.

References org.sleuthkit.autopsy.datasourcesummary.uiutils.UpdateGovernor.isRefreshRequiredForCaseEvent().

void org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.onRefresh ( )
protected

Method called that triggers refresh.

Definition at line 172 of file EventUpdateHandler.java.

void org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.register ( )
void org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.unregister ( )

Member Data Documentation

final Set<Case.Events> org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.caseEvents
private
final PropertyChangeListener org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.caseEventsListener
private
Initial value:
= (evt) -> {
}
}

Handler for case event updates.

Definition at line 70 of file EventUpdateHandler.java.

final UpdateGovernor org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.governor
private
final Set<IngestJobEvent> org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.ingestEvents
private

Definition at line 91 of file EventUpdateHandler.java.

final PropertyChangeListener org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.ingestJobEventsListener
private
Initial value:
= (evt) -> {
if (evt == null) {
return;
}
String eventName = evt.getPropertyName();
for (IngestJobEvent ingestEvt : IngestJobEvent.values()) {
if (ingestEvt.name().equals(eventName) && isRefreshRequired(ingestEvt)) {
}
}
}

Definition at line 76 of file EventUpdateHandler.java.

final Runnable org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.onUpdate
private
final RefreshThrottler org.sleuthkit.autopsy.datasourcesummary.uiutils.EventUpdateHandler.refreshThrottler
private
Initial value:
= new RefreshThrottler(new RefreshThrottler.Refresher() {
@Override
public void refresh() {
EventUpdateHandler.this.onRefresh();
}
@Override
public boolean isRefreshRequired(PropertyChangeEvent evt) {
String eventType = evt.getPropertyName();
if (Case.isCaseOpen()) {
if (IngestManager.IngestModuleEvent.DATA_ADDED.toString().equals(eventType) && evt.getOldValue() instanceof ModuleDataEvent) {
ModuleDataEvent dataEvent = (ModuleDataEvent) evt.getOldValue();
return EventUpdateHandler.this.isRefreshRequired(dataEvent);
} else if (IngestManager.IngestModuleEvent.CONTENT_CHANGED.toString().equals(eventType) && evt.getOldValue() instanceof ModuleContentEvent) {
ModuleContentEvent contentEvent = (ModuleContentEvent) evt.getOldValue();
return EventUpdateHandler.this.isRefreshRequired(contentEvent);
} else if (IngestManager.IngestModuleEvent.FILE_DONE.toString().equals(eventType) && evt.getNewValue() instanceof AbstractFile) {
AbstractFile analyzedFile = (AbstractFile) evt.getNewValue();
return EventUpdateHandler.this.isRefreshRequired(analyzedFile);
}
}
return false;
}
})

The refresh throttler that handles ingest events.

Definition at line 41 of file EventUpdateHandler.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2022 Basis Technology. Generated on: Fri Sep 30 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.