Autopsy  4.7.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.core.ServicesMonitor Class Reference

Classes

class  CrashDetectionTask
 
enum  Service
 
class  ServicesMonitorException
 
enum  ServiceStatus
 

Public Member Functions

void addSubscriber (PropertyChangeListener subscriber)
 
void addSubscriber (Set< String > eventNames, PropertyChangeListener subscriber)
 
void addSubscriber (String eventName, PropertyChangeListener subscriber)
 
String getServiceStatus (String service) throws ServicesMonitorException
 
void removeSubscriber (Set< String > eventNames, PropertyChangeListener subscriber)
 
void removeSubscriber (String eventName, PropertyChangeListener subscriber)
 
void removeSubscriber (PropertyChangeListener subscriber)
 
void setServiceStatus (String service, String status, String details)
 

Static Public Member Functions

static synchronized ServicesMonitor getInstance ()
 

Private Member Functions

 ServicesMonitor ()
 
void checkAllServices ()
 
void checkDatabaseConnectionStatus ()
 
void checkKeywordSearchServerConnectionStatus ()
 
void checkMessagingServerConnectionStatus ()
 
void checkServiceStatus (String service)
 

Private Attributes

AutopsyEventPublisher eventPublisher
 
final ScheduledThreadPoolExecutor periodicTasksExecutor
 
final ConcurrentHashMap< String, String > statusByService
 

Static Private Attributes

static final long CRASH_DETECTION_INTERVAL_MINUTES = 15
 
static ServicesMonitor instance = new ServicesMonitor()
 
static final Logger logger = Logger.getLogger(ServicesMonitor.class.getName())
 
static final int NUMBER_OF_PERIODIC_TASK_THREADS = 1
 
static final String PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"
 
static final Set< String > servicesList
 

Detailed Description

This class periodically checks availability of collaboration resources - remote database, remote keyword search server, messaging service - and reports status updates to the user in case of a gap in service.

Definition at line 49 of file ServicesMonitor.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.core.ServicesMonitor.ServicesMonitor ( )
private

Start periodic task that check the availability of key collaboration services.

Definition at line 133 of file ServicesMonitor.java.

References org.sleuthkit.autopsy.core.ServicesMonitor.checkAllServices().

Referenced by org.sleuthkit.autopsy.core.ServicesMonitor.getInstance().

Member Function Documentation

void org.sleuthkit.autopsy.core.ServicesMonitor.addSubscriber ( PropertyChangeListener  subscriber)

Adds an event subscriber to this publisher. Subscriber will be subscribed to all events from this publisher.

Parameters
subscriberThe subscriber to add.

Definition at line 312 of file ServicesMonitor.java.

References org.sleuthkit.autopsy.events.AutopsyEventPublisher.addSubscriber().

Referenced by org.sleuthkit.autopsy.ingest.IngestManager.subscribeToServiceMonitorEvents().

void org.sleuthkit.autopsy.core.ServicesMonitor.addSubscriber ( Set< String >  eventNames,
PropertyChangeListener  subscriber 
)

Adds an event subscriber to this publisher.

Parameters
eventNamesThe events the subscriber is interested in.
subscriberThe subscriber to add.

Definition at line 322 of file ServicesMonitor.java.

References org.sleuthkit.autopsy.events.AutopsyEventPublisher.addSubscriber().

void org.sleuthkit.autopsy.core.ServicesMonitor.addSubscriber ( String  eventName,
PropertyChangeListener  subscriber 
)

Adds an event subscriber to this publisher.

Parameters
eventNameThe event the subscriber is interested in.
subscriberThe subscriber to add.

Definition at line 332 of file ServicesMonitor.java.

References org.sleuthkit.autopsy.events.AutopsyEventPublisher.addSubscriber().

void org.sleuthkit.autopsy.core.ServicesMonitor.checkAllServices ( )
private
void org.sleuthkit.autopsy.core.ServicesMonitor.checkDatabaseConnectionStatus ( )
private
void org.sleuthkit.autopsy.core.ServicesMonitor.checkKeywordSearchServerConnectionStatus ( )
private
void org.sleuthkit.autopsy.core.ServicesMonitor.checkMessagingServerConnectionStatus ( )
private
void org.sleuthkit.autopsy.core.ServicesMonitor.checkServiceStatus ( String  service)
private
static synchronized ServicesMonitor org.sleuthkit.autopsy.core.ServicesMonitor.getInstance ( )
static
String org.sleuthkit.autopsy.core.ServicesMonitor.getServiceStatus ( String  service) throws ServicesMonitorException

Get last status update for a service.

Parameters
serviceName of the service.
Returns
ServiceStatus Status for the service.
Exceptions
ServicesMonitorExceptionIf service name is null or service doesn't exist.

Definition at line 203 of file ServicesMonitor.java.

References org.sleuthkit.autopsy.core.ServicesMonitor.checkServiceStatus().

Referenced by org.sleuthkit.autopsy.ingest.IngestManager.startIngestJob().

void org.sleuthkit.autopsy.core.ServicesMonitor.removeSubscriber ( Set< String >  eventNames,
PropertyChangeListener  subscriber 
)

Removes an event subscriber from this publisher.

Parameters
eventNamesThe events the subscriber is no longer interested in.
subscriberThe subscriber to remove.

Definition at line 342 of file ServicesMonitor.java.

References org.sleuthkit.autopsy.events.AutopsyEventPublisher.removeSubscriber().

void org.sleuthkit.autopsy.core.ServicesMonitor.removeSubscriber ( String  eventName,
PropertyChangeListener  subscriber 
)

Removes an event subscriber from this publisher.

Parameters
eventNameThe event the subscriber is no longer interested in.
subscriberThe subscriber to remove.

Definition at line 352 of file ServicesMonitor.java.

References org.sleuthkit.autopsy.events.AutopsyEventPublisher.removeSubscriber().

void org.sleuthkit.autopsy.core.ServicesMonitor.removeSubscriber ( PropertyChangeListener  subscriber)

Removes an event subscriber to this publisher. Subscriber will be removed from all event notifications from this publisher.

Parameters
subscriberThe subscriber to remove.

Definition at line 362 of file ServicesMonitor.java.

References org.sleuthkit.autopsy.events.AutopsyEventPublisher.removeSubscriber().

void org.sleuthkit.autopsy.core.ServicesMonitor.setServiceStatus ( String  service,
String  status,
String  details 
)

Member Data Documentation

final long org.sleuthkit.autopsy.core.ServicesMonitor.CRASH_DETECTION_INTERVAL_MINUTES = 15
staticprivate

Definition at line 57 of file ServicesMonitor.java.

AutopsyEventPublisher org.sleuthkit.autopsy.core.ServicesMonitor.eventPublisher
private

Definition at line 51 of file ServicesMonitor.java.

ServicesMonitor org.sleuthkit.autopsy.core.ServicesMonitor.instance = new ServicesMonitor()
staticprivate

Call constructor on start-up so that the first check of services is done as soon as possible.

Definition at line 73 of file ServicesMonitor.java.

Referenced by org.sleuthkit.autopsy.core.ServicesMonitor.getInstance().

final Logger org.sleuthkit.autopsy.core.ServicesMonitor.logger = Logger.getLogger(ServicesMonitor.class.getName())
staticprivate

Definition at line 52 of file ServicesMonitor.java.

final int org.sleuthkit.autopsy.core.ServicesMonitor.NUMBER_OF_PERIODIC_TASK_THREADS = 1
staticprivate

Definition at line 56 of file ServicesMonitor.java.

final String org.sleuthkit.autopsy.core.ServicesMonitor.PERIODIC_TASK_THREAD_NAME = "services-monitor-periodic-task-%d"
staticprivate

Definition at line 55 of file ServicesMonitor.java.

final ScheduledThreadPoolExecutor org.sleuthkit.autopsy.core.ServicesMonitor.periodicTasksExecutor
private

Definition at line 53 of file ServicesMonitor.java.

final Set<String> org.sleuthkit.autopsy.core.ServicesMonitor.servicesList
staticprivate
Initial value:
= Stream.of(ServicesMonitor.Service.values())
.map(Service::toString)
.collect(Collectors.toSet())

Definition at line 59 of file ServicesMonitor.java.

final ConcurrentHashMap<String, String> org.sleuthkit.autopsy.core.ServicesMonitor.statusByService
private

The service monitor maintains a mapping of each service to it's last status update.

Definition at line 67 of file ServicesMonitor.java.


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

Copyright © 2012-2016 Basis Technology. Generated on: Mon Jun 18 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.