com.cafesoft.core.lifecycle
Class LifecycleEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.cafesoft.core.lifecycle.LifecycleEvent
All Implemented Interfaces:
Serializable

public final class LifecycleEvent
extends EventObject

Notifies listeners of significant changes on a component that implements the Lifecycle interface.

Since:
12/1/01
See Also:
Serialized Form

Field Summary
static String START_EVENT
          The LifecycleEvent type for the "component start" event.
static String STOP_EVENT
          The LifecycleEvent type for the "component stop" event.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LifecycleEvent(Lifecycle lifecycle, String type)
          Construct a new LifecycleEvent with the specified parameters.
LifecycleEvent(Lifecycle lifecycle, String type, Object data)
          Construct a new LifecycleEvent with the specified parameters.
 
Method Summary
 Object getData()
          Return the event data of this event.
 Lifecycle getLifecycle()
          Return the Lifecycle on which this event occurred.
 String getType()
          Return the event type of this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

START_EVENT

public static final String START_EVENT
The LifecycleEvent type for the "component start" event.

See Also:
Constant Field Values

STOP_EVENT

public static final String STOP_EVENT
The LifecycleEvent type for the "component stop" event.

See Also:
Constant Field Values
Constructor Detail

LifecycleEvent

public LifecycleEvent(Lifecycle lifecycle,
                      String type)
Construct a new LifecycleEvent with the specified parameters.

Parameters:
lifecycle - component on which this event occurred
type - event type (required)

LifecycleEvent

public LifecycleEvent(Lifecycle lifecycle,
                      String type,
                      Object data)
Construct a new LifecycleEvent with the specified parameters.

Parameters:
lifecycle - Component on which this event occurred
type - Event type (required)
data - Event data (if any)
Method Detail

getData

public Object getData()
Return the event data of this event.

Returns:
the even data of this event

getLifecycle

public Lifecycle getLifecycle()
Return the Lifecycle on which this event occurred.

Returns:
the Lifecycle on which this event occurred

getType

public String getType()
Return the event type of this event.

Returns:
the event type of this event


Generated on 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.