org.bushe.swing.event
Enum PublicationStatus

java.lang.Object
  extended by java.lang.Enum<PublicationStatus>
      extended by org.bushe.swing.event.PublicationStatus
All Implemented Interfaces:
Serializable, Comparable<PublicationStatus>

public enum PublicationStatus
extends Enum<PublicationStatus>

The status of an event as it makes its way from publication through processing by subscribers.

EventServices are required to stamp any event object or payload that implements the EventStatusTracker with the corresponding EventStatus as the event object is processed. The EventService is not required to set the Unpublished state.


Enum Constant Summary
Completed
          Called when all subscribers have finished handling the event publication.
Initiated
          Set directly after publication on an EventService.
Publishing
          Set while the event is sent to it's subscribers.
Queued
          State set after veto test is passed before the event is send to any subscribers.
Unpublished
          Recommended default.
Vetoed
          End status for events that are vetoed and never sent to subscribers.
 
Method Summary
static PublicationStatus valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PublicationStatus[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Unpublished

public static final PublicationStatus Unpublished
Recommended default.


Initiated

public static final PublicationStatus Initiated
Set directly after publication on an EventService.


Vetoed

public static final PublicationStatus Vetoed
End status for events that are vetoed and never sent to subscribers.


Queued

public static final PublicationStatus Queued
State set after veto test is passed before the event is send to any subscribers.


Publishing

public static final PublicationStatus Publishing
Set while the event is sent to it's subscribers. EventService implementations such as the ThreadSafeEventService and the SwingEventService will transition from Queued to Publishing immediately. Others implementations that call subscribers on threads different from veto subscribers are free to leave an event in the Queued state and wait until the event is passed to the thread(s) that subscribers are called on to set the Publishing state


Completed

public static final PublicationStatus Completed
Called when all subscribers have finished handling the event publication.

Method Detail

values

public static PublicationStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PublicationStatus c : PublicationStatus.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PublicationStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


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