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

Public Member Functions

 AutopsyEventPublisher ()
 
void addSubscriber (Set< String > eventNames, PropertyChangeListener subscriber)
 
void addSubscriber (String eventName, PropertyChangeListener subscriber)
 
void closeRemoteEventChannel ()
 
void openRemoteEventChannel (String channelName) throws AutopsyEventException
 
void publish (AutopsyEvent event)
 
void publishLocally (AutopsyEvent event)
 
void publishRemotely (AutopsyEvent event)
 
void removeSubscriber (Set< String > eventNames, PropertyChangeListener subscriber)
 
void removeSubscriber (String eventName, PropertyChangeListener subscriber)
 

Private Member Functions

void stopRemotePublisher ()
 

Private Attributes

String currentChannelName
 
final LocalEventPublisher localPublisher
 
RemoteEventPublisher remotePublisher
 

Static Private Attributes

static final Logger logger = Logger.getLogger(AutopsyEventPublisher.class.getName())
 
static final int MAX_REMOTE_EVENT_PUBLISH_TRIES = 1
 

Detailed Description

Provides thread-safe support for publishing events to registered subscribers on both this Autopsy node and other Autopsy nodes. Subscribers are constrained to be PropertyChangeListeners to integrate with the legacy use of JavaBeans PropertyChangeEvents and PropertyChangeListeners as an application event system.

Definition at line 37 of file AutopsyEventPublisher.java.

Constructor & Destructor Documentation

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

Constructs an object for publishing events to registered subscribers on both this Autopsy node and other Autopsy nodes. Communication with other nodes is not turned on by default - call openRemoteEventChannel() after construction.

Definition at line 54 of file AutopsyEventPublisher.java.

Member Function Documentation

void org.sleuthkit.autopsy.events.AutopsyEventPublisher.addSubscriber ( Set< String >  eventNames,
PropertyChangeListener  subscriber 
)
void org.sleuthkit.autopsy.events.AutopsyEventPublisher.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 109 of file AutopsyEventPublisher.java.

void org.sleuthkit.autopsy.events.AutopsyEventPublisher.closeRemoteEventChannel ( )

Closes the event channel used for publishing events to and receiving events from other Autopsy nodes.

Definition at line 88 of file AutopsyEventPublisher.java.

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

Referenced by org.sleuthkit.autopsy.casemodule.Case.changeCurrentCase(), and org.sleuthkit.autopsy.events.AutopsyEventPublisher.openRemoteEventChannel().

void org.sleuthkit.autopsy.events.AutopsyEventPublisher.openRemoteEventChannel ( String  channelName) throws AutopsyEventException

Opens the event channel used for publishing events to and receiving events from other Autopsy nodes. Only one channel may be open at a time.

Parameters
channelNameThe name of the event channel.
Exceptions
AutopsyEventExceptionif the channel was not opened.

Definition at line 66 of file AutopsyEventPublisher.java.

References org.sleuthkit.autopsy.events.AutopsyEventPublisher.closeRemoteEventChannel(), and org.sleuthkit.autopsy.core.UserPreferences.getMessageServiceConnectionInfo().

Referenced by org.sleuthkit.autopsy.casemodule.Case.changeCurrentCase(), and org.sleuthkit.autopsy.events.AutopsyEventPublisher.publishRemotely().

void org.sleuthkit.autopsy.events.AutopsyEventPublisher.publish ( AutopsyEvent  event)
void org.sleuthkit.autopsy.events.AutopsyEventPublisher.publishLocally ( AutopsyEvent  event)

Publishes an event to this Autopsy node only.

Parameters
eventThe event to publish.

Definition at line 148 of file AutopsyEventPublisher.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.changeCurrentCase(), org.sleuthkit.autopsy.events.AutopsyEventPublisher.publish(), and org.sleuthkit.autopsy.core.ServicesMonitor.setServiceStatus().

void org.sleuthkit.autopsy.events.AutopsyEventPublisher.publishRemotely ( AutopsyEvent  event)
void org.sleuthkit.autopsy.events.AutopsyEventPublisher.removeSubscriber ( Set< String >  eventNames,
PropertyChangeListener  subscriber 
)
void org.sleuthkit.autopsy.events.AutopsyEventPublisher.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 129 of file AutopsyEventPublisher.java.

void org.sleuthkit.autopsy.events.AutopsyEventPublisher.stopRemotePublisher ( )
private

Stops the remote event publisher, but does not reset the current channel name.

Definition at line 182 of file AutopsyEventPublisher.java.

Referenced by org.sleuthkit.autopsy.events.AutopsyEventPublisher.closeRemoteEventChannel(), and org.sleuthkit.autopsy.events.AutopsyEventPublisher.publishRemotely().

Member Data Documentation

String org.sleuthkit.autopsy.events.AutopsyEventPublisher.currentChannelName
private
final LocalEventPublisher org.sleuthkit.autopsy.events.AutopsyEventPublisher.localPublisher
private

Definition at line 44 of file AutopsyEventPublisher.java.

final Logger org.sleuthkit.autopsy.events.AutopsyEventPublisher.logger = Logger.getLogger(AutopsyEventPublisher.class.getName())
staticprivate

Composed of thread-safe objects.

Definition at line 42 of file AutopsyEventPublisher.java.

final int org.sleuthkit.autopsy.events.AutopsyEventPublisher.MAX_REMOTE_EVENT_PUBLISH_TRIES = 1
staticprivate

Definition at line 43 of file AutopsyEventPublisher.java.

RemoteEventPublisher org.sleuthkit.autopsy.events.AutopsyEventPublisher.remotePublisher
private

Definition at line 45 of file AutopsyEventPublisher.java.


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

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