org.bushe.swing.event
Class AbstractEventServiceEvent

java.lang.Object
  extended by org.bushe.swing.event.AbstractEventServiceEvent
All Implemented Interfaces:
EventServiceEvent, PublicationStatusTracker
Direct Known Subclasses:
ObjectEvent, SubscriberTimingEvent

public abstract class AbstractEventServiceEvent
extends Object
implements EventServiceEvent, PublicationStatusTracker

Convenience base class for EventServiceEvents in the application. Provides the convenience of holding the event source publication and event status. It is not necessary to use this event class when using an EventService.


Field Summary
protected  Object stateLock
           
 
Constructor Summary
AbstractEventServiceEvent(Object source)
          Default constructor
 
Method Summary
 PublicationStatus getPublicationStatus()
          Implementations of this method must be made thread safe.
 Object getSource()
           
 void setPublicationStatus(PublicationStatus status)
          Implementations of this method must be made thread safe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stateLock

protected final Object stateLock
Constructor Detail

AbstractEventServiceEvent

public AbstractEventServiceEvent(Object source)
Default constructor

Parameters:
source - the source of the event
Method Detail

getSource

public Object getSource()
Specified by:
getSource in interface EventServiceEvent
Returns:
the source of this event

getPublicationStatus

public PublicationStatus getPublicationStatus()
Description copied from interface: PublicationStatusTracker
Implementations of this method must be made thread safe.

Specified by:
getPublicationStatus in interface PublicationStatusTracker
Returns:
last value set by setPublicationStatus(), or PublicationStatus.Unpublished if setPublicationStatus was never called.

setPublicationStatus

public void setPublicationStatus(PublicationStatus status)
Description copied from interface: PublicationStatusTracker
Implementations of this method must be made thread safe.

Specified by:
setPublicationStatus in interface PublicationStatusTracker
Parameters:
status - the status of the event during it's current publication


Copyright © 2011 Bushe Enterprises, Inc.. All Rights Reserved.