Package com.tangosol.util
Class ServiceEvent
java.lang.Object
java.util.EventObject
com.tangosol.util.ServiceEvent
- All Implemented Interfaces:
 Serializable
An event which indicates that a Service state has changed:
 
- a service is starting
 - a service has started
 - a service is stopping
 - a service has stopped
 
- Author:
 - jh 2007.11.12
 - See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThis event indicates that a service has been resumed.static final intThis event indicates that a service has started.static final intThis event indicates that a service is starting.static final intThis event indicates that a service has stopped.static final intThis event indicates that a service is stopping.static final intThis event indicates that a service has been suspended.Fields inherited from class java.util.EventObject
source - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidDispatch this event to the specified listeners collection.voiddispatch(EventListener[] aListeners) Dispatch this event to the specified array of listeners.intgetId()Return this event's ID.Return the Service that fired the event.toString()Returns a String representation of this ServiceEvent object.Methods inherited from class java.util.EventObject
getSource 
- 
Field Details
- 
SERVICE_STARTING
public static final int SERVICE_STARTINGThis event indicates that a service is starting.- See Also:
 
 - 
SERVICE_STARTED
public static final int SERVICE_STARTEDThis event indicates that a service has started.- See Also:
 
 - 
SERVICE_STOPPING
public static final int SERVICE_STOPPINGThis event indicates that a service is stopping.- See Also:
 
 - 
SERVICE_STOPPED
public static final int SERVICE_STOPPEDThis event indicates that a service has stopped.- See Also:
 
 - 
SERVICE_SUSPENDED
public static final int SERVICE_SUSPENDEDThis event indicates that a service has been suspended.- See Also:
 
 - 
SERVICE_RESUMED
public static final int SERVICE_RESUMEDThis event indicates that a service has been resumed.- See Also:
 
 
 - 
 - 
Constructor Details
- 
ServiceEvent
Constructs a new ServiceEvent.- Parameters:
 service- the Service that fired the eventnId- this event's ID, one of the SERVICE_* enum values
 
 - 
 - 
Method Details
- 
getId
public int getId()Return this event's ID.- Returns:
 - the event ID, one of the SERVICE_* enum values
 
 - 
getService
Return the Service that fired the event.- Returns:
 - the Service
 
 - 
toString
Returns a String representation of this ServiceEvent object.- Overrides:
 toStringin classEventObject- Returns:
 - a String representation of this ServiceEvent object
 
 - 
dispatch
Dispatch this event to the specified listeners collection.- Parameters:
 listeners- the listeners collection- Throws:
 ClassCastException- if any of the targets is not an instance of the ServiceListener interface
 - 
dispatch
Dispatch this event to the specified array of listeners.- Parameters:
 aListeners- the array of listeners- Throws:
 ClassCastException- if any of the targets is not an instance of ServiceListener interface
 
 -